diff mbox series

[pynfs,09/10] st_flex: We can't return the layout without a layout stateid

Message ID 20201217003516.75438-10-loghyr@hammerspace.com (mailing list archive)
State New
Headers show
Series Misc Fixes, primarily LAYOUTRETURN | expand

Commit Message

Thomas Haynes Dec. 17, 2020, 12:35 a.m. UTC
Signed-off-by: Tom Haynes <loghyr@hammerspace.com>
---
 nfs4.1/server41tests/st_flex.py | 2 ++
 1 file changed, 2 insertions(+)
diff mbox series

Patch

diff --git a/nfs4.1/server41tests/st_flex.py b/nfs4.1/server41tests/st_flex.py
index 596c75e..c6df68f 100644
--- a/nfs4.1/server41tests/st_flex.py
+++ b/nfs4.1/server41tests/st_flex.py
@@ -605,6 +605,8 @@  def layoutget_return(sess, fh, open_stateid, allowed_errors=NFS4_OK,
                         0, NFS4_UINT64_MAX, 4196, open_stateid, 0xffff)]
     res = sess.compound(ops)
     check(res, allowed_errors)
+    if nfsstat4[res.status] is not NFS4_OK:
+        return [res] # We can't return the layout without a stateid!
     layout_stateid = res.resarray[-1].logr_stateid
 
     # Return layout