Linux NFS development
 help / color / mirror / Atom feed
* [PATCH 1/3] client: test OPEN+WRITE+CLOSE in a single compound
@ 2011-12-12 20:26 Tigran Mkrtchyan
  2011-12-12 20:26 ` [PATCH 2/3] client: test LOCK+WRITE+LOCKU " Tigran Mkrtchyan
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Tigran Mkrtchyan @ 2011-12-12 20:26 UTC (permalink / raw)
  To: linux-nfs; +Cc: Tigran Mkrtchyan


Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
---
 nfs4.1/server41tests/st_open.py |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/nfs4.1/server41tests/st_open.py b/nfs4.1/server41tests/st_open.py
index 1c965b2..c809c95 100644
--- a/nfs4.1/server41tests/st_open.py
+++ b/nfs4.1/server41tests/st_open.py
@@ -275,3 +275,19 @@ def testLockLockU(t, env):
 	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: 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)
\ No newline at end of file
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 2/3] client: test LOCK+WRITE+LOCKU in a single compound
  2011-12-12 20:26 [PATCH 1/3] client: test OPEN+WRITE+CLOSE in a single compound Tigran Mkrtchyan
@ 2011-12-12 20:26 ` Tigran Mkrtchyan
  2011-12-12 20:26 ` [PATCH 3/3] client: group test with currentstateid tougheter Tigran Mkrtchyan
  2011-12-12 22:42 ` [PATCH 1/3] client: test OPEN+WRITE+CLOSE in a single compound J. Bruce Fields
  2 siblings, 0 replies; 6+ messages in thread
From: Tigran Mkrtchyan @ 2011-12-12 20:26 UTC (permalink / raw)
  To: linux-nfs; +Cc: Tigran Mkrtchyan


Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
---
 nfs4.1/server41tests/st_open.py |   27 ++++++++++++++++++++++++++-
 1 files changed, 26 insertions(+), 1 deletions(-)

diff --git a/nfs4.1/server41tests/st_open.py b/nfs4.1/server41tests/st_open.py
index c809c95..6c991c8 100644
--- a/nfs4.1/server41tests/st_open.py
+++ b/nfs4.1/server41tests/st_open.py
@@ -290,4 +290,29 @@ def testOpenWriteClose(t, env):
     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)
\ No newline at end of file
+    check(res, NFS4_OK)
+
+def testLockWriteLocku(t, env):
+    """test current state id processing by having LOCK, WRITE and LOCKU
+       in a single compound
+
+    FLAGS: 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH 3/3] client: group test with currentstateid tougheter
  2011-12-12 20:26 [PATCH 1/3] client: test OPEN+WRITE+CLOSE in a single compound Tigran Mkrtchyan
  2011-12-12 20:26 ` [PATCH 2/3] client: test LOCK+WRITE+LOCKU " Tigran Mkrtchyan
@ 2011-12-12 20:26 ` Tigran Mkrtchyan
  2011-12-12 22:42 ` [PATCH 1/3] client: test OPEN+WRITE+CLOSE in a single compound J. Bruce Fields
  2 siblings, 0 replies; 6+ messages in thread
From: Tigran Mkrtchyan @ 2011-12-12 20:26 UTC (permalink / raw)
  To: linux-nfs; +Cc: Tigran Mkrtchyan


Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
---
 nfs4.1/server41tests/st_open.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/nfs4.1/server41tests/st_open.py b/nfs4.1/server41tests/st_open.py
index 6c991c8..1c51f71 100644
--- a/nfs4.1/server41tests/st_open.py
+++ b/nfs4.1/server41tests/st_open.py
@@ -244,7 +244,7 @@ def testOpenAndClose(t, env):
     """test current state id processing by having OPEN and CLOSE
        in a single compound
 
-    FLAGS: open all
+    FLAGS: currentstateid open all
     CODE: OPEN31
     """
     current_stateid = stateid4(1, '\0' * 12)
@@ -258,7 +258,7 @@ def testLockLockU(t, env):
     """test current state id processing by having LOCK and LOCKU
        in a single compound
 
-    FLAGS: open all
+    FLAGS: currentstateid open all
     CODE: OPEN32
     """
     current_stateid = stateid4(1, '\0' * 12)
@@ -280,7 +280,7 @@ def testOpenWriteClose(t, env):
     """test current state id processing by having OPEN, WRITE and CLOSE
        in a single compound
 
-    FLAGS: open all
+    FLAGS: currentstateid open all
     CODE: OPEN33
     """
     current_stateid = stateid4(1, '\0' * 12)
@@ -296,7 +296,7 @@ def testLockWriteLocku(t, env):
     """test current state id processing by having LOCK, WRITE and LOCKU
        in a single compound
 
-    FLAGS: open all
+    FLAGS: currentstateid open all
     CODE: OPEN34
     """
     current_stateid = stateid4(1, '\0' * 12)
-- 
1.7.7


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] client: test OPEN+WRITE+CLOSE in a single compound
  2011-12-12 20:26 [PATCH 1/3] client: test OPEN+WRITE+CLOSE in a single compound Tigran Mkrtchyan
  2011-12-12 20:26 ` [PATCH 2/3] client: test LOCK+WRITE+LOCKU " Tigran Mkrtchyan
  2011-12-12 20:26 ` [PATCH 3/3] client: group test with currentstateid tougheter Tigran Mkrtchyan
@ 2011-12-12 22:42 ` J. Bruce Fields
  2011-12-12 22:43   ` J. Bruce Fields
  2 siblings, 1 reply; 6+ messages in thread
From: J. Bruce Fields @ 2011-12-12 22:42 UTC (permalink / raw)
  To: Tigran Mkrtchyan; +Cc: linux-nfs

I already applied some previous version of these--could you check

	git://linux-nfs.org/~bfields/pynfs.git

and let me know if I got anything wrong?  (If so, incremental patches on
top of that would be appreciated.

Thanks--b.

On Mon, Dec 12, 2011 at 09:26:26PM +0100, Tigran Mkrtchyan wrote:
> 
> Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
> ---
>  nfs4.1/server41tests/st_open.py |   16 ++++++++++++++++
>  1 files changed, 16 insertions(+), 0 deletions(-)
> 
> diff --git a/nfs4.1/server41tests/st_open.py b/nfs4.1/server41tests/st_open.py
> index 1c965b2..c809c95 100644
> --- a/nfs4.1/server41tests/st_open.py
> +++ b/nfs4.1/server41tests/st_open.py
> @@ -275,3 +275,19 @@ def testLockLockU(t, env):
>  	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: 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)
> \ No newline at end of file
> -- 
> 1.7.7
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] client: test OPEN+WRITE+CLOSE in a single compound
  2011-12-12 22:42 ` [PATCH 1/3] client: test OPEN+WRITE+CLOSE in a single compound J. Bruce Fields
@ 2011-12-12 22:43   ` J. Bruce Fields
  2011-12-12 22:44     ` J. Bruce Fields
  0 siblings, 1 reply; 6+ messages in thread
From: J. Bruce Fields @ 2011-12-12 22:43 UTC (permalink / raw)
  To: Tigran Mkrtchyan; +Cc: linux-nfs

On Mon, Dec 12, 2011 at 05:42:19PM -0500, J. Bruce Fields wrote:
> I already applied some previous version of these--could you check
> 
> 	git://linux-nfs.org/~bfields/pynfs.git
> 
> and let me know if I got anything wrong?  (If so, incremental patches on
> top of that would be appreciated.

Oh, sorry, I missed that you're adding the IO.  OK.--b.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1/3] client: test OPEN+WRITE+CLOSE in a single compound
  2011-12-12 22:43   ` J. Bruce Fields
@ 2011-12-12 22:44     ` J. Bruce Fields
  0 siblings, 0 replies; 6+ messages in thread
From: J. Bruce Fields @ 2011-12-12 22:44 UTC (permalink / raw)
  To: Tigran Mkrtchyan; +Cc: linux-nfs

On Mon, Dec 12, 2011 at 05:43:00PM -0500, J. Bruce Fields wrote:
> On Mon, Dec 12, 2011 at 05:42:19PM -0500, J. Bruce Fields wrote:
> > I already applied some previous version of these--could you check
> > 
> > 	git://linux-nfs.org/~bfields/pynfs.git
> > 
> > and let me know if I got anything wrong?  (If so, incremental patches on
> > top of that would be appreciated.
> 
> Oh, sorry, I missed that you're adding the IO.  OK.--b.

All applied and pushed out now, thanks again.--b.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2011-12-12 22:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-12 20:26 [PATCH 1/3] client: test OPEN+WRITE+CLOSE in a single compound Tigran Mkrtchyan
2011-12-12 20:26 ` [PATCH 2/3] client: test LOCK+WRITE+LOCKU " Tigran Mkrtchyan
2011-12-12 20:26 ` [PATCH 3/3] client: group test with currentstateid tougheter Tigran Mkrtchyan
2011-12-12 22:42 ` [PATCH 1/3] client: test OPEN+WRITE+CLOSE in a single compound J. Bruce Fields
2011-12-12 22:43   ` J. Bruce Fields
2011-12-12 22:44     ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox