This is the result of testing my changes in linux:
$ ./testserver.py --maketree 192.168.178.20:/tmp currentstateid
.....
**************************************************
CSID1 st_current_stateid.testOpenAndClose : PASS
CSID2 st_current_stateid.testLockLockU : PASS
CSID3 st_current_stateid.testOpenWriteClose : PASS
CSID4 st_current_stateid.testLockWriteLocku : PASS
CSID5 st_current_stateid.testOpenPutrootfhClose : PASS
CSID6 st_current_stateid.testCloseNoStateid : PASS
CSID7 st_current_stateid.testOpenLayoutGet : FAILURE
OP_LAYOUTGET should return NFS4_OK, instead got
NFS4ERR_NOTSUPP
CSID8 st_current_stateid.testOpenSetattr : PASS
CSID9 st_current_stateid.testOpenFreestateidClose : PA
**************************************************
$
Tigran Mkrtchyan (5):
client: move current stateid test into a dedicated module
client: test current stateid processing on PUTROOTFH
client: test current stateid processing with OPEN+LAYOUTGET in a
single compound
client: test current stateid processing with OPEN and SETATTR
client: test OPEN+FREE_STETEID+CLOSE in a single compound
nfs4.1/server41tests/__init__.py | 1 +
nfs4.1/server41tests/st_current_stateid.py | 161 ++++++++++++++++++++++++++++
nfs4.1/server41tests/st_open.py | 76 -------------
3 files changed, 162 insertions(+), 76 deletions(-)
create mode 100644 nfs4.1/server41tests/st_current_stateid.py
--
1.7.7.5
On Sun, Jan 15, 2012 at 08:05:23PM +0100, Tigran Mkrtchyan wrote:
>
> This is the result of testing my changes in linux:
>
> $ ./testserver.py --maketree 192.168.178.20:/tmp currentstateid
> .....
>
> **************************************************
> CSID1 st_current_stateid.testOpenAndClose : PASS
> CSID2 st_current_stateid.testLockLockU : PASS
> CSID3 st_current_stateid.testOpenWriteClose : PASS
> CSID4 st_current_stateid.testLockWriteLocku : PASS
> CSID5 st_current_stateid.testOpenPutrootfhClose : PASS
> CSID6 st_current_stateid.testCloseNoStateid : PASS
> CSID7 st_current_stateid.testOpenLayoutGet : FAILURE
> OP_LAYOUTGET should return NFS4_OK, instead got
> NFS4ERR_NOTSUPP
We should fix pynfs41 so no pnfs-dependent tests are run without "pnfs"
being explicitly asked for on the commandline....
--b.
> CSID8 st_current_stateid.testOpenSetattr : PASS
> CSID9 st_current_stateid.testOpenFreestateidClose : PA
>
> **************************************************
> $
>
> Tigran Mkrtchyan (5):
> client: move current stateid test into a dedicated module
> client: test current stateid processing on PUTROOTFH
> client: test current stateid processing with OPEN+LAYOUTGET in a
> single compound
> client: test current stateid processing with OPEN and SETATTR
> client: test OPEN+FREE_STETEID+CLOSE in a single compound
>
> nfs4.1/server41tests/__init__.py | 1 +
> nfs4.1/server41tests/st_current_stateid.py | 161 ++++++++++++++++++++++++++++
> nfs4.1/server41tests/st_open.py | 76 -------------
> 3 files changed, 162 insertions(+), 76 deletions(-)
> create mode 100644 nfs4.1/server41tests/st_current_stateid.py
>
> --
> 1.7.7.5
>
Signed-off-by: Tigran Mkrtchyan <[email protected]>
---
nfs4.1/server41tests/st_current_stateid.py | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/nfs4.1/server41tests/st_current_stateid.py b/nfs4.1/server41tests/st_current_stateid.py
index 3732907..fb0c360 100644
--- a/nfs4.1/server41tests/st_current_stateid.py
+++ b/nfs4.1/server41tests/st_current_stateid.py
@@ -146,3 +146,16 @@ def testOpenSetattr(t, env):
res = sess.compound( open_op +
[ op.setattr(current_stateid, {FATTR4_SIZE: size})])
check(res, NFS4_OK)
+
+def testOpenFreestateidClose(t, env):
+ """test current state id processing by having OPEN, FREE_STATEID and CLOSE
+ in a single compound
+
+ FLAGS: currentstateid all
+ CODE: CSID9
+ """
+ sess1 = env.c1.new_client_session(env.testname(t))
+
+ open_op = open_create_file_op(sess1, env.testname(t), open_create=OPEN4_CREATE)
+ res = sess1.compound(open_op + [op.free_stateid(current_stateid), op.close(0, current_stateid)])
+ checklist(res, [NFS4ERR_STALE_STATEID, NFS4ERR_BAD_STATEID])
--
1.7.7.5
On Tue, Jan 24, 2012 at 12:53 PM, Benny Halevy <[email protected]> wrote:
> On 2012-01-15 21:05, Tigran Mkrtchyan wrote:
>> This is the result of testing my changes in linux:
>>
>> $ ./testserver.py --maketree 192.168.178.20:/tmp currentstateid
>> .....
>>
>> **************************************************
>> CSID1 st_current_stateid.testOpenAndClose : PASS
>> CSID2 st_current_stateid.testLockLockU : PASS
>> CSID3 st_current_stateid.testOpenWriteClose : PASS
>> CSID4 st_current_stateid.testLockWriteLocku : PASS
>> CSID5 st_current_stateid.testOpenPutrootfhClose : PASS
>> CSID6 st_current_stateid.testCloseNoStateid : PASS
>> CSID7 st_current_stateid.testOpenLayoutGet : FAILURE
>> OP_LAYOUTGET should return NFS4_OK, instead got
>> NFS4ERR_NOTSUPP
>
> I guess this is not against my kernel but rather against Bruce's / mainline?
Yes, This is against Bruce's tree. With your I get LAYOUT_TRYLATER :-D
Tigran.
>
> Benny
>
>> CSID8 st_current_stateid.testOpenSetattr : PASS
>> CSID9 st_current_stateid.testOpenFreestateidClose : PA
>>
>> **************************************************
>> $
>>
>> Tigran Mkrtchyan (5):
>> client: move current stateid test into a dedicated module
>> client: test current stateid processing on PUTROOTFH
>> client: test current stateid processing with OPEN+LAYOUTGET in a
>> single compound
>> client: test current stateid processing with OPEN and SETATTR
>> client: test OPEN+FREE_STETEID+CLOSE in a single compound
>>
>> nfs4.1/server41tests/__init__.py | 1 +
>> nfs4.1/server41tests/st_current_stateid.py | 161 ++++++++++++++++++++++++++++
>> nfs4.1/server41tests/st_open.py | 76 -------------
>> 3 files changed, 162 insertions(+), 76 deletions(-)
>> create mode 100644 nfs4.1/server41tests/st_current_stateid.py
>>
-- kofemann
/** caffeinated mutations of the core personality */
On Sun, Jan 15, 2012 at 21:54, J. Bruce Fields <[email protected]> wrote:
> On Sun, Jan 15, 2012 at 08:05:23PM +0100, Tigran Mkrtchyan wrote:
>>
>> This is the result of testing my changes in linux:
>>
>> $ ./testserver.py --maketree 192.168.178.20:/tmp currentstateid
>> .....
>>
>> **************************************************
>> CSID1 st_current_stateid.testOpenAndClose : PASS
>> CSID2 st_current_stateid.testLockLockU : PASS
>> CSID3 st_current_stateid.testOpenWriteClose : PASS
>> CSID4 st_current_stateid.testLockWriteLocku : PASS
>> CSID5 st_current_stateid.testOpenPutrootfhClose : PASS
>> CSID6 st_current_stateid.testCloseNoStateid : PASS
>> CSID7 st_current_stateid.testOpenLayoutGet : FAILURE
>> OP_LAYOUTGET should return NFS4_OK, instead got
>> NFS4ERR_NOTSUPP
>
> We should fix pynfs41 so no pnfs-dependent tests are run without "pnfs"
> being explicitly asked for on the commandline....
Well, echange_id has this information. pynfs have to respect it.
Tigran.
>
> --b.
>
>> CSID8 st_current_stateid.testOpenSetattr : PASS
>> CSID9 st_current_stateid.testOpenFreestateidClose : PA
>>
>> **************************************************
>> $
>>
>> Tigran Mkrtchyan (5):
>> client: move current stateid test into a dedicated module
>> client: test current stateid processing on PUTROOTFH
>> client: test current stateid processing with OPEN+LAYOUTGET in a
>> single compound
>> client: test current stateid processing with OPEN and SETATTR
>> client: test OPEN+FREE_STETEID+CLOSE in a single compound
>>
>> nfs4.1/server41tests/__init__.py | 1 +
>> nfs4.1/server41tests/st_current_stateid.py | 161 ++++++++++++++++++++++++++++
>> nfs4.1/server41tests/st_open.py | 76 -------------
>> 3 files changed, 162 insertions(+), 76 deletions(-)
>> create mode 100644 nfs4.1/server41tests/st_current_stateid.py
>>
>> --
>> 1.7.7.5
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to [email protected]
> More majordomo info at http://vger.kernel.org/majordomo-info.html
On 2012-01-15 21:05, Tigran Mkrtchyan wrote:
> This is the result of testing my changes in linux:
>
> $ ./testserver.py --maketree 192.168.178.20:/tmp currentstateid
> .....
>
> **************************************************
> CSID1 st_current_stateid.testOpenAndClose : PASS
> CSID2 st_current_stateid.testLockLockU : PASS
> CSID3 st_current_stateid.testOpenWriteClose : PASS
> CSID4 st_current_stateid.testLockWriteLocku : PASS
> CSID5 st_current_stateid.testOpenPutrootfhClose : PASS
> CSID6 st_current_stateid.testCloseNoStateid : PASS
> CSID7 st_current_stateid.testOpenLayoutGet : FAILURE
> OP_LAYOUTGET should return NFS4_OK, instead got
> NFS4ERR_NOTSUPP
I guess this is not against my kernel but rather against Bruce's / mainline?
Benny
> CSID8 st_current_stateid.testOpenSetattr : PASS
> CSID9 st_current_stateid.testOpenFreestateidClose : PA
>
> **************************************************
> $
>
> Tigran Mkrtchyan (5):
> client: move current stateid test into a dedicated module
> client: test current stateid processing on PUTROOTFH
> client: test current stateid processing with OPEN+LAYOUTGET in a
> single compound
> client: test current stateid processing with OPEN and SETATTR
> client: test OPEN+FREE_STETEID+CLOSE in a single compound
>
> nfs4.1/server41tests/__init__.py | 1 +
> nfs4.1/server41tests/st_current_stateid.py | 161 ++++++++++++++++++++++++++++
> nfs4.1/server41tests/st_open.py | 76 -------------
> 3 files changed, 162 insertions(+), 76 deletions(-)
> create mode 100644 nfs4.1/server41tests/st_current_stateid.py
>
Applied the pynfs changes, thanks!
--b.
On Sun, Jan 15, 2012 at 08:05:23PM +0100, Tigran Mkrtchyan wrote:
>
> This is the result of testing my changes in linux:
>
> $ ./testserver.py --maketree 192.168.178.20:/tmp currentstateid
> .....
>
> **************************************************
> CSID1 st_current_stateid.testOpenAndClose : PASS
> CSID2 st_current_stateid.testLockLockU : PASS
> CSID3 st_current_stateid.testOpenWriteClose : PASS
> CSID4 st_current_stateid.testLockWriteLocku : PASS
> CSID5 st_current_stateid.testOpenPutrootfhClose : PASS
> CSID6 st_current_stateid.testCloseNoStateid : PASS
> CSID7 st_current_stateid.testOpenLayoutGet : FAILURE
> OP_LAYOUTGET should return NFS4_OK, instead got
> NFS4ERR_NOTSUPP
> CSID8 st_current_stateid.testOpenSetattr : PASS
> CSID9 st_current_stateid.testOpenFreestateidClose : PA
>
> **************************************************
> $
>
> Tigran Mkrtchyan (5):
> client: move current stateid test into a dedicated module
> client: test current stateid processing on PUTROOTFH
> client: test current stateid processing with OPEN+LAYOUTGET in a
> single compound
> client: test current stateid processing with OPEN and SETATTR
> client: test OPEN+FREE_STETEID+CLOSE in a single compound
>
> nfs4.1/server41tests/__init__.py | 1 +
> nfs4.1/server41tests/st_current_stateid.py | 161 ++++++++++++++++++++++++++++
> nfs4.1/server41tests/st_open.py | 76 -------------
> 3 files changed, 162 insertions(+), 76 deletions(-)
> create mode 100644 nfs4.1/server41tests/st_current_stateid.py
>
> --
> 1.7.7.5
>
Signed-off-by: Tigran Mkrtchyan <[email protected]>
---
nfs4.1/server41tests/__init__.py | 1 +
nfs4.1/server41tests/st_current_stateid.py | 86 ++++++++++++++++++++++++++++
nfs4.1/server41tests/st_open.py | 76 ------------------------
3 files changed, 87 insertions(+), 76 deletions(-)
create mode 100644 nfs4.1/server41tests/st_current_stateid.py
diff --git a/nfs4.1/server41tests/__init__.py b/nfs4.1/server41tests/__init__.py
index eb92538..2bedb57 100644
--- a/nfs4.1/server41tests/__init__.py
+++ b/nfs4.1/server41tests/__init__.py
@@ -20,4 +20,5 @@ __all__ = ["st_exchange_id.py", # draft 21
"st_block.py",
## "st_debug.py",
## "st_loop",
+ "st_current_stateid.py",
]
diff --git a/nfs4.1/server41tests/st_current_stateid.py b/nfs4.1/server41tests/st_current_stateid.py
new file mode 100644
index 0000000..1f24ec9
--- /dev/null
+++ b/nfs4.1/server41tests/st_current_stateid.py
@@ -0,0 +1,86 @@
+from st_create_session import create_session
+from nfs4_const import *
+
+from environment import check, checklist, fail, create_file, open_file, close_file
+from environment import open_create_file_op
+from nfs4_type import open_owner4, openflag4, createhow4, open_claim4
+from nfs4_type import creatverfattr, fattr4, stateid4, locker4, lock_owner4
+from nfs4_type import open_to_lock_owner4
+import nfs4_ops as op
+import threading
+
+
+current_stateid = stateid4(1, '\0' * 12)
+
+def testOpenAndClose(t, env):
+ """test current state id processing by having OPEN and CLOSE
+ in a single compound
+
+ FLAGS: currentstateid all
+ CODE: CSID1
+ """
+ sess1 = env.c1.new_client_session(env.testname(t))
+
+ open_op = open_create_file_op(sess1, env.testname(t), open_create=OPEN4_CREATE)
+ res = sess1.compound(open_op + [op.close(0, current_stateid)])
+ check(res, NFS4_OK)
+
+def testLockLockU(t, env):
+ """test current state id processing by having LOCK and LOCKU
+ in a single compound
+
+ FLAGS: currentstateid all
+ CODE: CSID2
+ """
+ sess1 = env.c1.new_client_session(env.testname(t))
+
+ res = create_file(sess1, env.testname(t))
+ check(res)
+ fh = res.resarray[-1].object
+ stateid = res.resarray[-2].stateid
+
+ open_to_lock_owner = open_to_lock_owner4( 0, stateid, 0, lock_owner4(0, "lock1"))
+ lock_owner = locker4(open_owner=open_to_lock_owner, new_lock_owner=True)
+ lock_ops = [ op.lock(WRITE_LT, False, 0, NFS4_UINT64_MAX, lock_owner),
+ op.locku(WRITE_LT, 0, current_stateid, 0, NFS4_UINT64_MAX) ]
+ res = sess1.compound([op.putfh(fh)] + lock_ops)
+ check(res, NFS4_OK)
+
+def testOpenWriteClose(t, env):
+ """test current state id processing by having OPEN, WRITE and CLOSE
+ in a single compound
+
+ FLAGS: currentstateid all
+ CODE: CSID3
+ """
+ sess1 = env.c1.new_client_session(env.testname(t))
+
+ data = "write test data"
+ open_op = open_create_file_op(sess1, env.testname(t), open_create=OPEN4_CREATE)
+ res = sess1.compound(open_op + [op.write(current_stateid, 5, FILE_SYNC4, data),
+ op.close(0, current_stateid)])
+ check(res, NFS4_OK)
+
+def testLockWriteLocku(t, env):
+ """test current state id processing by having LOCK, WRITE and LOCKU
+ in a single compound
+
+ FLAGS: currentstateid all
+ CODE: CSID4
+ """
+ sess1 = env.c1.new_client_session(env.testname(t))
+
+ res = create_file(sess1, env.testname(t))
+ check(res)
+ fh = res.resarray[-1].object
+ stateid = res.resarray[-2].stateid
+
+ data = "write test data"
+ open_to_lock_owner = open_to_lock_owner4( 0, stateid, 0, lock_owner4(0, "lock1"))
+ lock_owner = locker4(open_owner=open_to_lock_owner, new_lock_owner=True)
+ lock_ops = [ op.lock(WRITE_LT, False, 0, NFS4_UINT64_MAX, lock_owner),
+ op.write(current_stateid, 5, FILE_SYNC4, data),
+ op.locku(WRITE_LT, 0, current_stateid, 0, NFS4_UINT64_MAX),
+ op.close(0, stateid)]
+ res = sess1.compound([op.putfh(fh)] + lock_ops)
+ check(res, NFS4_OK)
diff --git a/nfs4.1/server41tests/st_open.py b/nfs4.1/server41tests/st_open.py
index 1c51f71..895916a 100644
--- a/nfs4.1/server41tests/st_open.py
+++ b/nfs4.1/server41tests/st_open.py
@@ -240,79 +240,3 @@ def testOPENClaimFH(t, env):
if res.resarray[-1].data != desired:
fail("Expected %r, got %r" % (desired, res.resarray[-1].data))
-def testOpenAndClose(t, env):
- """test current state id processing by having OPEN and CLOSE
- in a single compound
-
- FLAGS: currentstateid open all
- CODE: OPEN31
- """
- current_stateid = stateid4(1, '\0' * 12)
- sess1 = env.c1.new_client_session(env.testname(t))
-
- open_op = open_create_file_op(sess1, env.testname(t), open_create=OPEN4_CREATE)
- res = sess1.compound(open_op + [op.close(0, current_stateid)])
- check(res, NFS4_OK)
-
-def testLockLockU(t, env):
- """test current state id processing by having LOCK and LOCKU
- in a single compound
-
- FLAGS: currentstateid open all
- CODE: OPEN32
- """
- current_stateid = stateid4(1, '\0' * 12)
- sess1 = env.c1.new_client_session(env.testname(t))
-
- res = create_file(sess1, env.testname(t))
- check(res)
- fh = res.resarray[-1].object
- stateid = res.resarray[-2].stateid
-
- open_to_lock_owner = open_to_lock_owner4( 0, stateid, 0, lock_owner4(0, "lock1"))
- lock_owner = locker4(open_owner=open_to_lock_owner, new_lock_owner=True)
- lock_ops = [ op.lock(WRITE_LT, False, 0, NFS4_UINT64_MAX, lock_owner),
- op.locku(WRITE_LT, 0, current_stateid, 0, NFS4_UINT64_MAX) ]
- res = sess1.compound([op.putfh(fh)] + lock_ops)
- check(res, NFS4_OK)
-
-def testOpenWriteClose(t, env):
- """test current state id processing by having OPEN, WRITE and CLOSE
- in a single compound
-
- FLAGS: currentstateid open all
- CODE: OPEN33
- """
- current_stateid = stateid4(1, '\0' * 12)
- sess1 = env.c1.new_client_session(env.testname(t))
-
- data = "write test data"
- open_op = open_create_file_op(sess1, env.testname(t), open_create=OPEN4_CREATE)
- res = sess1.compound(open_op + [op.write(current_stateid, 5, FILE_SYNC4, data),
- op.close(0, current_stateid)])
- check(res, NFS4_OK)
-
-def testLockWriteLocku(t, env):
- """test current state id processing by having LOCK, WRITE and LOCKU
- in a single compound
-
- FLAGS: currentstateid open all
- CODE: OPEN34
- """
- current_stateid = stateid4(1, '\0' * 12)
- sess1 = env.c1.new_client_session(env.testname(t))
-
- res = create_file(sess1, env.testname(t))
- check(res)
- fh = res.resarray[-1].object
- stateid = res.resarray[-2].stateid
-
- data = "write test data"
- open_to_lock_owner = open_to_lock_owner4( 0, stateid, 0, lock_owner4(0, "lock1"))
- lock_owner = locker4(open_owner=open_to_lock_owner, new_lock_owner=True)
- lock_ops = [ op.lock(WRITE_LT, False, 0, NFS4_UINT64_MAX, lock_owner),
- op.write(current_stateid, 5, FILE_SYNC4, data),
- op.locku(WRITE_LT, 0, current_stateid, 0, NFS4_UINT64_MAX),
- op.close(0, stateid)]
- res = sess1.compound([op.putfh(fh)] + lock_ops)
- check(res, NFS4_OK)
--
1.7.7.5
Signed-off-by: Tigran Mkrtchyan <[email protected]>
---
nfs4.1/server41tests/st_current_stateid.py | 31 ++++++++++++++++++++++++++++
1 files changed, 31 insertions(+), 0 deletions(-)
diff --git a/nfs4.1/server41tests/st_current_stateid.py b/nfs4.1/server41tests/st_current_stateid.py
index 1f24ec9..e2da451 100644
--- a/nfs4.1/server41tests/st_current_stateid.py
+++ b/nfs4.1/server41tests/st_current_stateid.py
@@ -84,3 +84,34 @@ def testLockWriteLocku(t, env):
op.close(0, stateid)]
res = sess1.compound([op.putfh(fh)] + lock_ops)
check(res, NFS4_OK)
+
+def testOpenPutrootfhClose(t, env):
+ """test current state id processing by having OPEN, PUTROOTFH and CLOSE
+ in a single compound
+
+ FLAGS: currentstateid all
+ CODE: CSID5
+ """
+ sess1 = env.c1.new_client_session(env.testname(t))
+
+ open_op = open_create_file_op(sess1, env.testname(t), open_create=OPEN4_CREATE)
+ res = sess1.compound(open_op + [op.putrootfh(), op.close(0, current_stateid)])
+ checklist(res, [NFS4ERR_STALE_STATEID, NFS4ERR_BAD_STATEID])
+
+def testCloseNoStateid(t, env):
+ """test current state id processing by having CLOSE
+ without operation which provides stateid
+
+ FLAGS: currentstateid all
+ CODE: CSID6
+ """
+ sess1 = env.c1.new_client_session(env.testname(t))
+
+ res = create_file(sess1, env.testname(t))
+ check(res)
+ fh = res.resarray[-1].object
+ stateid = res.resarray[-2].stateid
+
+ res = sess1.compound([op.putfh(fh), op.close(0, current_stateid)])
+ checklist(res, [NFS4ERR_STALE_STATEID, NFS4ERR_BAD_STATEID])
+
--
1.7.7.5
Signed-off-by: Tigran Mkrtchyan <[email protected]>
---
nfs4.1/server41tests/st_current_stateid.py | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/nfs4.1/server41tests/st_current_stateid.py b/nfs4.1/server41tests/st_current_stateid.py
index e2da451..788c095 100644
--- a/nfs4.1/server41tests/st_current_stateid.py
+++ b/nfs4.1/server41tests/st_current_stateid.py
@@ -115,3 +115,19 @@ def testCloseNoStateid(t, env):
res = sess1.compound([op.putfh(fh), op.close(0, current_stateid)])
checklist(res, [NFS4ERR_STALE_STATEID, NFS4ERR_BAD_STATEID])
+def testOpenLayoutGet(t, env):
+ """test current state id processing by having OPEN and LAYOUTGET
+ in a single compound
+
+ FLAGS: currentstateid all
+ CODE: CSID7
+ """
+ sess = env.c1.new_client_session(env.testname(t),
+ flags=EXCHGID4_FLAG_USE_PNFS_MDS)
+
+ open_op = open_create_file_op(sess, env.testname(t), open_create=OPEN4_CREATE)
+ res = sess.compound( open_op +
+ [op.layoutget(False, LAYOUT4_NFSV4_1_FILES, LAYOUTIOMODE4_RW,
+ 0, 8192, 8192, current_stateid, 0xffff)])
+ check(res, NFS4_OK)
+
--
1.7.7.5
Signed-off-by: Tigran Mkrtchyan <[email protected]>
---
nfs4.1/server41tests/st_current_stateid.py | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/nfs4.1/server41tests/st_current_stateid.py b/nfs4.1/server41tests/st_current_stateid.py
index 788c095..3732907 100644
--- a/nfs4.1/server41tests/st_current_stateid.py
+++ b/nfs4.1/server41tests/st_current_stateid.py
@@ -131,3 +131,18 @@ def testOpenLayoutGet(t, env):
0, 8192, 8192, current_stateid, 0xffff)])
check(res, NFS4_OK)
+def testOpenSetattr(t, env):
+ """test current state id processing by having OPEN and SETATTR
+ in a single compound
+
+ FLAGS: currentstateid all
+ CODE: CSID8
+ """
+ size = 8
+ sess = env.c1.new_client_session(env.testname(t),
+ flags=EXCHGID4_FLAG_USE_PNFS_MDS)
+
+ open_op = open_create_file_op(sess, env.testname(t), open_create=OPEN4_CREATE)
+ res = sess.compound( open_op +
+ [ op.setattr(current_stateid, {FATTR4_SIZE: size})])
+ check(res, NFS4_OK)
--
1.7.7.5