4.0 server tests: add open/lock/open/downgrade test

This particular sequence was problematic for some versions of the Linux
server.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
nfs4.1 client callback handling: fix CB_SEQUENCE sequence id in replies

The nfs4.1 client is responding with a seqid one more than that in the
reply.  How did we go this long without noticing that?

Note also the the CB_SEQUENCE is doing no checking of the sequenceid
sent to us by the server.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Update nfs4.1 xdr file

The 4.1 xdr file is out of date (in particular, it's missing
NFS4ERR_DELEG_REVOKED).

Updated using:

	wget -O - http://www.rfc-editor.org/rfc/rfc5662.txt |
		grep '^ *///' | sed 's?^ */// ??' |
		sed 's?^ *///$??' >nfs4.1/nfs4.x

However, some changes are required to make it work, those those were
also applied and a diff from upstream stashed in nfs4.1/nfs4.x.diff.

Also, note FATTR4_FS_LAYOUT_TYPE and FATTR4_LAYOUT_TYPE both grew an "S"
in the new .x file, so nfs4lib.py required some minor fixes.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
4.1 server tests: SEQ4_STATUS_RECALLABLE_STATE_REVOKED test

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
server tests: allow NOTDIR/ISDIR on rename

The rfc3530 behavior we're insisting on here looks to me like a mistake,
or at least not necessarily a good idea: a server on a posix filesystem
(or with posix clients) more likely wants to return the posix-specified
errors.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
4.1 server tests: support other minor versions

So you can run tests with minor version 4.2, for example, by using
--minorversion=2.

This is a bit primitive.  Eventually we'll need it to vary behavior and
applicable tests based on minorversion.

Also, it shouldn't really allow --minorversion=0.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
server41tests: create_sessions should always specify cb_sec

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
server41tests: remove unused function

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
4.1 server tests: callback_sec_parms4 definition needed

Fixes "NameError: global name 'callback_sec_parms4' is not defined" on
REBT1.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
4.1 server tests: fix REBT1 sleeptime calculation

We can hit the "finally" clause before sleeptime is initialized, causing
a "UnboundLocalError: local variable 'sleeptime' referenced before
assignment" followed by later tests failing with unexpected
NFS4ERR_GRACE.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
4.1 server tests: try harder to get read delegation

The recent linux server has stopped giving out read delegations on open
creates.  I think this is a reasonable heuristic (files that have just
been created are likely to be modified soon).  In any case, it can't
hurt for pynfs to try the open one more time.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Make mode 000 tests expect NFS4_OK when run as root

They will warn if NFS4ERR_ACCESS is returned.

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Make some tests runable by request

Ganesha can pass several tests that were made inoperable.
The original FLAGS: for these were commented out and FLAGS:
is left blank so these tests only run if requested for.

Plus a few tests had duplicate names.

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Make LOOK10 accept MSG_ACCEPTED: GARBAGE_ARGS as well as NFS4ERR_BADXDR

The Ganesha server does XDR for the whole request before starting to
process COMPOUND. As a result, LOOK10 causes an XDR failure that Ganesha
responds at RPC layer and never gets to NFS layer to return NFS4ERR_BADXDR.

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
Relax mode000 checks when root to allow for root squash

When run as root, allow either NFS4_OK or NFS4ERR_ACCESS.

Signed-off-by: Frank S. Filz <ffilz@us.ibm.com>
4.0 server tests: add WRITE15 to try various-sized writes

This is a lot of writes, and could take a while.  It might be better to
choose some smaller ranges of likely-problematic values.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
README: remove build_ext setup

I think this step is actually included in the normal build step?

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Merge remote-tracking branch 'upstream/master'
Merge remote-tracking branch 'origin/master'