Misc Fixes, primarily LAYOUTRETURN
Subsystems (2)
cover Misc Fixes, primarily LAYOUTRETURN
Hi Bruce,
Here are a series of patches that Hamerspace has applied to the flex files testing.
Thanks,
Tom
Jean Spector (2):
st_flex.py - Added tests for LAYOUTRETURN with errors st_flex.py - Fixed flag names
Tom Haynes (7):
Close the file for SEQ10b
flexfiles: Fix up the layout error handling to reflect the previous
error
st_flex: Reduce the layoutstats period to make tests finish in a sane
time
st_flex: Fix up test names
st_flex: Only do 100 layoutget/return in loop
st_flex: We can't return the layout without a layout stateid
st_flex: Fixup check for error in layoutget_return()
Trond Myklebust (1):
Fix testFlexLayoutOldSeqid
nfs4.1/server41tests/st_flex.py | 651 +++++++++++++++++++++++++--- nfs4.1/server41tests/st_sequence.py | 5 + 2 files changed, 588 insertions(+), 68 deletions(-)
Signature · 1 line
2.26.2
PATCH 1/10 st_flex.py - Added tests for LAYOUTRETURN with errors
From: Jean Spector <[email protected]>
--- nfs4.1/server41tests/st_flex.py | 417 ++++++++++++++++++++++++++++++++ 1 file changed, 417 insertions(+)
nfs4.1/server41tests/st_flex.py +417 -0
@@ -592,3 +592,420 @@ def testFlexLayoutStatsOverflow(t, env): [15, 392027464946, 0, 0, 0, 0, 0, 0, 0, 10852364288, 0, 10853937152, 90820, 90564, 391147321463, 1129113173731145], [15, 407034683097, 0, 0, 0, 0, 0, 0, 0, 10864914432, 0, 10866487296, 93884, 93628, 406154554429, 1131023767183211]] _LayoutStats(t, env, ls) + +def layoutget_return(sess, fh, open_stateid, layout_iomode=LAYOUTIOMODE4_RW, + layout_error=None, layout_error_op=OP_WRITE): + """ + Perform LAYOUTGET and LAYOUTRETURN + """ + + # Get layout + ops = [op.putfh(fh), + op.layoutget(False, LAYOUT4_FLEX_FILES, layout_iomode, + 0, NFS4_UINT64_MAX, 4196, open_stateid, 0xffff)] + res = sess.compound(ops) + check(res) + layout_stateid = res.resarray[-1].logr_stateid + + # Return layout + if not layout_error: # Return regular layout + ops = [op.putfh(fh), + op.layoutreturn(False, LAYOUT4_FLEX_FILES, LAYOUTIOMODE4_ANY, + layoutreturn4(LAYOUTRETURN4_FILE, + layoutreturn_file4(0, NFS4_UINT64_MAX, + layout_stateid, "")))] + else: # Return layout with error + # Get device id + locb = res.resarray[-1].logr_layout[0].lo_content.loc_body + p = FlexUnpacker(locb) + layout = p.unpack_ff_layout4() + p.done() + + deviceid = layout.ffl_mirrors[0].ffm_data_servers[0].ffds_deviceid + deverr = device_error4(deviceid, layout_error, layout_error_op) + ffioerr = ff_ioerr4(0, NFS4_UINT64_MAX, layout_stateid, [deverr]) + fflr = ff_layoutreturn4([ffioerr], []) + + p = FlexPacker() + p.pack_ff_layoutreturn4(fflr) + + ops = [op.putfh(fh), + op.layoutreturn(False, LAYOUT4_FLEX_FILES, LAYOUTIOMODE4_ANY, + layoutreturn4(LAYOUTRETURN4_FILE, + layoutreturn_file4(0, NFS4_UINT64_MAX, + layout_stateid, + p.get_buffer())))] + + res2 = sess.compound(ops) + check(res2) + return [res, res2] + +def get_layout_cred(logr): + """ + :summary: Returns credentials contained in LAYOUTGET reply + :param logr: LAYOUTGET reply result + :return: List with uid and gid + """ + locb = logr.logr_layout[0].lo_content.loc_body + p = FlexUnpacker(locb) + layout = p.unpack_ff_layout4() + p.done() + uid = layout.ffl_mirrors[0].ffm_data_servers[0].ffds_user + gid = layout.ffl_mirrors[0].ffm_data_servers[0].ffds_group + return [uid, gid] + +def testFlexLayoutReturnNxioRead(t, env): + """ + Send LAYOUTRETURN with NFS4ERR_NXIO for READ + + FLAGS: flex layoutreturn + CODE: FFLORNXIOREAD + """ + name = env.testname(t) + sess = env.c1.new_pnfs_client_session(env.testname(t)) + + # Create the file + res = create_file(sess, name) + check(res) + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + # Return layout with error + layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_READ, NFS4ERR_NXIO, OP_READ) + + # Obtain another layout + layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_READ) + + # Close file + res = close_file(sess, fh, stateid=open_stateid) + check(res) + +def testFlexLayoutReturnNxioWrite(t, env): + """ + Send LAYOUTRETURN with NFS4ERR_NXIO for WRITE + + FLAGS: flex layoutreturn + CODE: FFLORNXIOWRITE + """ + name = env.testname(t) + sess = env.c1.new_pnfs_client_session(env.testname(t)) + + # Create the file + res = create_file(sess, name) + check(res) + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + # Return layout with error + layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_RW, NFS4ERR_NXIO, OP_WRITE) + + # Obtain another layout + layoutget_return(sess, fh, open_stateid) + + # Close file + res = close_file(sess, fh, stateid=open_stateid) + check(res) + +def testFlexLayoutReturnStaleRead(t, env): + """ + Send LAYOUTRETURN with NFS4ERR_STALE for READ + + FLAGS: flex layoutreturn + CODE: FFLORSTALEREAD + """ + name = env.testname(t) + sess = env.c1.new_pnfs_client_session(env.testname(t)) + + # Create the file + res = create_file(sess, name) + check(res) + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + # Return layout with error + layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_READ, NFS4ERR_STALE, OP_READ) + + # Close file + res = close_file(sess, fh, stateid=open_stateid) + check(res) + +def testFlexLayoutReturnStaleWrite(t, env): + """ + Send LAYOUTRETURN with NFS4ERR_STALE for WRITE + + FLAGS: flex layoutreturn + CODE: FFLORSTALEWRITE + """ + name = env.testname(t) + sess = env.c1.new_pnfs_client_session(env.testname(t)) + + # Create the file + res = create_file(sess, name) + check(res) + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + # Return layout with error + layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_RW, NFS4ERR_STALE, OP_WRITE) + + # Close file + res = close_file(sess, fh, stateid=open_stateid) + check(res) + +def testFlexLayoutReturnIoRead(t, env): + """ + Send LAYOUTRETURN with NFS4ERR_IO for READ + + FLAGS: flex layoutreturn + CODE: FFLORIOREAD + """ + name = env.testname(t) + sess = env.c1.new_pnfs_client_session(env.testname(t)) + + # Create the file + res = create_file(sess, name) + check(res) + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + # Return layout with error + layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_READ, NFS4ERR_IO, OP_READ) + + # Close file + res = close_file(sess, fh, stateid=open_stateid) + check(res) + +def testFlexLayoutReturnIoWrite(t, env): + """ + Send LAYOUTRETURN with NFS4ERR_IO for WRITE + + FLAGS: flex layoutreturn + CODE: FFLORIOWRITE + """ + name = env.testname(t) + sess = env.c1.new_pnfs_client_session(env.testname(t)) + + # Create the file + res = create_file(sess, name) + check(res) + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + # Return layout with error + layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_RW, NFS4ERR_IO, OP_WRITE) + + # Close file + res = close_file(sess, fh, stateid=open_stateid) + check(res) + +def testFlexLayoutReturnServerFaultRead(t, env): + """ + Send LAYOUTRETURN with NFS4ERR_SERVERFAULT on READ + + FLAGS: flex layoutreturn + CODE: FFLORSERVERFAULTREAD + """ + name = env.testname(t) + sess = env.c1.new_pnfs_client_session(env.testname(t)) + + # Create the file + res = create_file(sess, name) + check(res) + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + # Return layout with error + layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_READ, NFS4ERR_SERVERFAULT, OP_READ) + + # Close file + res = close_file(sess, fh, stateid=open_stateid) + check(res) + +def testFlexLayoutReturnServerFaultWrite(t, env): + """ + Send LAYOUTRETURN with NFS4ERR_SERVERFAULT on WRITE + + FLAGS: flex layoutreturn + CODE: FFLORSERVERFAULTWRITE + """ + name = env.testname(t) + sess = env.c1.new_pnfs_client_session(env.testname(t)) + + # Create the file + res = create_file(sess, name) + check(res) + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + # Return layout with error + layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_RW, NFS4ERR_SERVERFAULT, OP_WRITE) + + # Close file + res = close_file(sess, fh, stateid=open_stateid) + check(res) + +def testFlexLayoutReturnNospc(t, env): + """ + Send LAYOUTRETURN with NFS4ERR_NOSPC + + FLAGS: flex layoutreturn + CODE: FFLORNOSPC + """ + name = env.testname(t) + sess = env.c1.new_pnfs_client_session(env.testname(t)) + + # Create the file + res = create_file(sess, name) + check(res) + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + # Return layout with error + layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_RW, NFS4ERR_NOSPC, OP_WRITE) + + # Close file + res = close_file(sess, fh, stateid=open_stateid) + check(res) + +def testFlexLayoutReturnFbig(t, env): + """ + Send LAYOUTRETURN with NFS4ERR_FBIG + + FLAGS: flex layoutreturn + CODE: FFLORFBIG + """ + name = env.testname(t) + sess = env.c1.new_pnfs_client_session(env.testname(t)) + + # Create the file + res = create_file(sess, name) + check(res) + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + # Return layout with error + layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_RW, NFS4ERR_FBIG, OP_WRITE) + + # Close file + res = close_file(sess, fh, stateid=open_stateid) + check(res) + +def testFlexLayoutReturnAccessRead(t, env): + """ + Send LAYOUTRETURN with NFS4ERR_ACCESS on READ + + FLAGS: flex layoutreturn + CODE: FFLORACCESSREAD + """ + name = env.testname(t) + sess = env.c1.new_pnfs_client_session(env.testname(t)) + + # Create the file + res = create_file(sess, name) + check(res) + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + # Return layout with error + layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_READ, + NFS4ERR_ACCESS, OP_READ) + + # Close file + res = close_file(sess, fh, stateid=open_stateid) + check(res) + +def testFlexLayoutReturnAccessWrite(t, env): + """ + Send LAYOUTRETURN with NFS4ERR_ACCESS on WRITE + + FLAGS: flex layoutreturn + CODE: FFLORACCESSWRITE + """ + name = env.testname(t) + sess = env.c1.new_pnfs_client_session(env.testname(t)) + + # Create the file + res = create_file(sess, name) + check(res) + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + # Return layout with error + layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_RW, + NFS4ERR_ACCESS, OP_WRITE) + + # Close file + res = close_file(sess, fh, stateid=open_stateid) + check(res) + +def testFlexLayoutReturnDelayRead(t, env): + """ + Send LAYOUTRETURN with NFS4ERR_DELAY on READ + + FLAGS: flex layoutreturn + CODE: FFLORDELAYREAD + """ + name = env.testname(t) + sess = env.c1.new_pnfs_client_session(env.testname(t)) + + # Create the file + res = create_file(sess, name) + check(res) + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + # Return layout with error + layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_READ, NFS4ERR_DELAY, OP_READ) + + # Close file + res = close_file(sess, fh, stateid=open_stateid) + check(res) + +def testFlexLayoutReturnDelayWrite(t, env): + """ + Send LAYOUTRETURN with NFS4ERR_DELAY on WRITE + + FLAGS: flex layoutreturn + CODE: FFLORDELAYWRITE + """ + name = env.testname(t) + sess = env.c1.new_pnfs_client_session(env.testname(t)) + + # Create the file + res = create_file(sess, name) + check(res) + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + # Return layout with error + layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_RW, NFS4ERR_DELAY, OP_WRITE) + + # Close file + res = close_file(sess, fh, stateid=open_stateid) + check(res) + +def testFlexLayoutReturn1K(t, env): + """ + Perform LAYOUTGET and LAYOUTRETURN 1K times with error being returned periodically + + FLAGS: flex layoutreturn + CODE: FFLOR1K + """ + name = env.testname(t) + sess = env.c1.new_pnfs_client_session(env.testname(t)) + count = 1000 # Repeat LAYOUTGET/LAYOUTRETURN count times + layout_error_ratio = 10 # Send an error every layout_error_ratio layout returns + + # Create the file + res = create_file(sess, name) + check(res) + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + for i in xrange(count): + layout_error = None if i % layout_error_ratio else NFS4ERR_ACCESS + layoutget_return(sess, fh, open_stateid, layout_error=layout_error) + + # Close file + res = close_file(sess, fh, stateid=open_stateid) + check(res)
Signature · 1 line
2.26.2
PATCH 2/10 st_flex.py - Fixed flag names
In reply to Tom HaynesFrom: Jean Spector <[email protected]>
--- nfs4.1/server41tests/st_flex.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
nfs4.1/server41tests/st_flex.py +3 -3
@@ -502,7 +502,7 @@ def testFlexLayoutStatsReset(t, env): """These layoutstats are from when the client effectively resets them by having one field be less than the cumulative ancestor - FLAGS: flex layoustats + FLAGS: flex layoutstats CODE: FFLS2 """
@@ -533,7 +533,7 @@ def testFlexLayoutStatsStraight(t, env): to keep the server from detecting the reset. I.e., the client has not lost it all! - FLAGS: flex layoustats + FLAGS: flex layoutstats CODE: FFLS3 """
@@ -562,7 +562,7 @@ def testFlexLayoutStatsOverflow(t, env): """These layoutstats are a write intensive work load in which eventually one stat takes twice longer than the collection period. - FLAGS: flex layoustats + FLAGS: flex layoutstats CODE: FFLS4 """
Signature · 1 line
2.26.2
PATCH 3/10 Close the file for SEQ10b
In reply to Tom Haynes--- nfs4.1/server41tests/st_sequence.py | 5 +++++ 1 file changed, 5 insertions(+)
nfs4.1/server41tests/st_sequence.py +5 -0
@@ -225,6 +225,7 @@ def testReplayCache007(t, env): check(res) fh = res.resarray[-1].object stateid = res.resarray[-2].stateid + ops = env.home + [op.savefh(),\ op.rename(b"%s_1" % env.testname(t), b"%s_2" % env.testname(t))] res1 = sess1.compound(ops, cache_this=False)
@@ -233,6 +234,10 @@ def testReplayCache007(t, env): check(res2, [NFS4_OK, NFS4ERR_RETRY_UNCACHED_REP]) close_file(sess1, fh, stateid=stateid) + # Cleanup + res = sess1.compound([op.putfh(fh), op.close(0, stateid)]) + check(res) + def testOpNotInSession(t, env): """Operations other than SEQUENCE, BIND_CONN_TO_SESSION, EXCHANGE_ID, CREATE_SESSION, and DESTROY_SESSION, MUST NOT appear as the
Signature · 1 line
2.26.2
Re: [pynfs 03/10] Close the file for SEQ10b
Quoted 18 lines · Tom Haynes
Signed-off-by Tom Haynes <[email protected]>--- nfs4.1/server41tests/st_sequence.py | 5 +++++ 1 file changed, 5 insertions(+)nfs4.1/server41tests/st_sequence.py +1
-0@@ -225,6 +225,7 @@ def testReplayCache007(t, env): check(res) fh = res.resarray[-1].object stateid = res.resarray[-2].stateid + ops = env.home + [op.savefh(),\ op.rename(b"%s_1" % env.testname(t), b"%s_2" % env.testname(t))] res1 = sess1.compound(ops, cache_this=False)
nfs4.1/server41tests/st_sequence.py def testReplayCache007(t, env): · line 240
Quoted 7 lines
nfs4.1/server41tests/st_sequence.py +4
-0@@ -233,6 +234,10 @@ def testReplayCache007(t, env): check(res2, [NFS4_OK, NFS4ERR_RETRY_UNCACHED_REP]) close_file(sess1, fh, stateid=stateid) + # Cleanup + res = sess1.compound([op.putfh(fh), op.close(0, stateid)]) + check(res) +
This is giving me:
SEQ10b st_sequence.testReplayCache007 : FAILURE
OP_CLOSE should return NFS4_OK, instead got
NFS4ERR_BAD_STATEID
probably because the file was already closed just above. I'm not sure whta was intended here. Reverting for now.
--b.
Quoted 5 lines
nfs4.1/server41tests/st_sequence.py +0
-0def testOpNotInSession(t, env): """Operations other than SEQUENCE, BIND_CONN_TO_SESSION, EXCHANGE_ID, CREATE_SESSION, and DESTROY_SESSION, MUST NOT appear as theSignature · 1 line
2.26.2
Re: [pynfs 03/10] Close the file for SEQ10b
Quoted 15 lines · J. Bruce Fields
nfs4.1/server41tests/st_sequence.py def testReplayCache007(t, env): · line 240
Quoted 7 lines · Tom Haynes
close_file(sess1, fh, stateid=stateid)nfs4.1/server41tests/st_sequence.py +4
-0+ # Cleanup + res = sess1.compound([op.putfh(fh), op.close(0, stateid)]) + check(res) +This is giving me:
Quoted 8 lines
SEQ10b st_sequence.testReplayCache007 : FAILURE
OP_CLOSEshould returnNFS4_OK, instead got
NFS4ERR_BAD_STATEIDprobably because the file was already closed just above. I'm not sure whta was intended here. Reverting for now.
—b
Ahh, that close is not there in the branch we have internally. And since git took the change, I thought it was still good.
Backing out is cool.
Re: [pynfs 03/10] Close the file for SEQ10b
Quoted 19 lines · Thomas Haynes
Quoted 19 lines · J. Bruce Fields
nfs4.1/server41tests/st_sequence.py def testReplayCache007(t, env): · line 240
Quoted 7 lines · Tom Haynes
close_file(sess1, fh, stateid=stateid)nfs4.1/server41tests/st_sequence.py +4
-0+ # Cleanup + res = sess1.compound([op.putfh(fh), op.close(0, stateid)]) + check(res) +This is giving me:
SEQ10b st_sequence.testReplayCache007 : FAILURE
OP_CLOSEshould returnNFS4_OK, instead got
NFS4ERR_BAD_STATEID
Quoted 8 lines
Quoted 4 lines
probably because the file was already closed just above. I'm not sure whta was intended here. Reverting for now.
—b
Ahh, that close is not there in the branch we have internally. And since git took the change, I thought it was still good.
Backing out is cool.
Oh, I see what happened, thanks for following up.
--b.
PATCH 4/10 flexfiles: Fix up the layout error handling to reflect the previous error
In reply to Tom HaynesWhen a client reports a layout error, the server has the choice on the next LAYOUTGET to:
1) Return NFS4_OK
2) Return NFS4ERR_DELAY as it tries to resolve the issue
3) Return the supplied error and let the client/application handle the issue
--- nfs4.1/server41tests/st_flex.py | 147 ++++++++++++++++++++++++++------ 1 file changed, 122 insertions(+), 25 deletions(-)
nfs4.1/server41tests/st_flex.py +122 -25
@@ -593,8 +593,9 @@ def testFlexLayoutStatsOverflow(t, env): [15, 407034683097, 0, 0, 0, 0, 0, 0, 0, 10864914432, 0, 10866487296, 93884, 93628, 406154554429, 1131023767183211]] _LayoutStats(t, env, ls) -def layoutget_return(sess, fh, open_stateid, layout_iomode=LAYOUTIOMODE4_RW, - layout_error=None, layout_error_op=OP_WRITE): +def layoutget_return(sess, fh, open_stateid, allowed_errors=NFS4_OK, + layout_iomode=LAYOUTIOMODE4_RW, layout_error=None, + layout_error_op=OP_WRITE): """ Perform LAYOUTGET and LAYOUTRETURN """
@@ -604,7 +605,7 @@ def layoutget_return(sess, fh, open_stateid, layout_iomode=LAYOUTIOMODE4_RW, op.layoutget(False, LAYOUT4_FLEX_FILES, layout_iomode, 0, NFS4_UINT64_MAX, 4196, open_stateid, 0xffff)] res = sess.compound(ops) - check(res) + check(res, allowed_errors) layout_stateid = res.resarray[-1].logr_stateid # Return layout
@@ -671,10 +672,10 @@ def testFlexLayoutReturnNxioRead(t, env): open_stateid = res.resarray[-2].stateid # Return layout with error - layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_READ, NFS4ERR_NXIO, OP_READ) + layoutget_return(sess, fh, open_stateid, NFS4_OK, LAYOUTIOMODE4_READ, NFS4ERR_NXIO, OP_READ) - # Obtain another layout - layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_READ) + # Verify error code propagation + layoutget_return(sess, fh, open_stateid, [NFS4_OK, NFS4ERR_DELAY, NFS4ERR_NXIO], LAYOUTIOMODE4_READ) # Close file res = close_file(sess, fh, stateid=open_stateid)
@@ -697,10 +698,10 @@ def testFlexLayoutReturnNxioWrite(t, env): open_stateid = res.resarray[-2].stateid # Return layout with error - layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_RW, NFS4ERR_NXIO, OP_WRITE) + layoutget_return(sess, fh, open_stateid, NFS4_OK, LAYOUTIOMODE4_RW, NFS4ERR_NXIO, OP_WRITE) - # Obtain another layout - layoutget_return(sess, fh, open_stateid) + # Verify error code propagation + layoutget_return(sess, fh, open_stateid, [NFS4_OK, NFS4ERR_DELAY, NFS4ERR_NXIO]) # Close file res = close_file(sess, fh, stateid=open_stateid)
@@ -723,7 +724,10 @@ def testFlexLayoutReturnStaleRead(t, env): open_stateid = res.resarray[-2].stateid # Return layout with error - layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_READ, NFS4ERR_STALE, OP_READ) + layoutget_return(sess, fh, open_stateid, NFS4_OK, LAYOUTIOMODE4_READ, NFS4ERR_STALE, OP_READ) + + # Verify error code propagation + layoutget_return(sess, fh, open_stateid, [NFS4_OK, NFS4ERR_DELAY, NFS4ERR_STALE]) # Close file res = close_file(sess, fh, stateid=open_stateid)
@@ -746,7 +750,10 @@ def testFlexLayoutReturnStaleWrite(t, env): open_stateid = res.resarray[-2].stateid # Return layout with error - layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_RW, NFS4ERR_STALE, OP_WRITE) + layoutget_return(sess, fh, open_stateid, NFS4_OK, LAYOUTIOMODE4_RW, NFS4ERR_STALE, OP_WRITE) + + # Verify error code propagation + layoutget_return(sess, fh, open_stateid, [NFS4_OK, NFS4ERR_DELAY, NFS4ERR_STALE]) # Close file res = close_file(sess, fh, stateid=open_stateid)
@@ -769,7 +776,10 @@ def testFlexLayoutReturnIoRead(t, env): open_stateid = res.resarray[-2].stateid # Return layout with error - layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_READ, NFS4ERR_IO, OP_READ) + layoutget_return(sess, fh, open_stateid, NFS4_OK, LAYOUTIOMODE4_READ, NFS4ERR_IO, OP_READ) + + # Verify error code propagation + layoutget_return(sess, fh, open_stateid, [NFS4_OK, NFS4ERR_DELAY, NFS4ERR_IO]) # Close file res = close_file(sess, fh, stateid=open_stateid)
@@ -792,7 +802,10 @@ def testFlexLayoutReturnIoWrite(t, env): open_stateid = res.resarray[-2].stateid # Return layout with error - layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_RW, NFS4ERR_IO, OP_WRITE) + layoutget_return(sess, fh, open_stateid, NFS4_OK, LAYOUTIOMODE4_RW, NFS4ERR_IO, OP_WRITE) + + # Verify error code propagation + layoutget_return(sess, fh, open_stateid, [NFS4_OK, NFS4ERR_DELAY, NFS4ERR_IO]) # Close file res = close_file(sess, fh, stateid=open_stateid)
@@ -815,7 +828,10 @@ def testFlexLayoutReturnServerFaultRead(t, env): open_stateid = res.resarray[-2].stateid # Return layout with error - layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_READ, NFS4ERR_SERVERFAULT, OP_READ) + layoutget_return(sess, fh, open_stateid, NFS4_OK, LAYOUTIOMODE4_READ, NFS4ERR_SERVERFAULT, OP_READ) + + # Verify error code propagation + layoutget_return(sess, fh, open_stateid, [NFS4_OK, NFS4ERR_DELAY, NFS4ERR_SERVERFAULT]) # Close file res = close_file(sess, fh, stateid=open_stateid)
@@ -838,15 +854,45 @@ def testFlexLayoutReturnServerFaultWrite(t, env): open_stateid = res.resarray[-2].stateid # Return layout with error - layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_RW, NFS4ERR_SERVERFAULT, OP_WRITE) + layoutget_return(sess, fh, open_stateid, NFS4_OK, LAYOUTIOMODE4_RW, NFS4ERR_SERVERFAULT, OP_WRITE) + + # Verify error code propagation + layoutget_return(sess, fh, open_stateid, [NFS4_OK, NFS4ERR_DELAY, NFS4ERR_SERVERFAULT]) + + # Close file + res = close_file(sess, fh, stateid=open_stateid) + check(res) + +def testFlexLayoutReturnNospcRead(t, env): + """ + Send LAYOUTRETURN with NFS4ERR_NOSPC on READ + + FLAGS: flex layoutreturn + CODE: FFLORNOSPC + """ + name = env.testname(t) + sess = env.c1.new_pnfs_client_session(env.testname(t)) + + # Create the file + res = create_file(sess, name) + check(res) + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + # Return layout with error + layoutget_return(sess, fh, open_stateid, NFS4_OK, LAYOUTIOMODE4_RW, NFS4ERR_NOSPC, OP_WRITE) + + # Verify error code propagation + # Unlike with a WRITE, we should see no error + layoutget_return(sess, fh, open_stateid, NFS4_OK, LAYOUTIOMODE4_READ) # Close file res = close_file(sess, fh, stateid=open_stateid) check(res) -def testFlexLayoutReturnNospc(t, env): +def testFlexLayoutReturnNospcWrite(t, env): """ - Send LAYOUTRETURN with NFS4ERR_NOSPC + Send LAYOUTRETURN with NFS4ERR_NOSPC on WRITE FLAGS: flex layoutreturn CODE: FFLORNOSPC
@@ -861,15 +907,45 @@ def testFlexLayoutReturnNospc(t, env): open_stateid = res.resarray[-2].stateid # Return layout with error - layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_RW, NFS4ERR_NOSPC, OP_WRITE) + layoutget_return(sess, fh, open_stateid, NFS4_OK, LAYOUTIOMODE4_RW, NFS4ERR_NOSPC, OP_WRITE) + + # Verify error code propagation + layoutget_return(sess, fh, open_stateid, [NFS4_OK, NFS4ERR_DELAY, NFS4ERR_NOSPC], LAYOUTIOMODE4_RW) + + # Close file + res = close_file(sess, fh, stateid=open_stateid) + check(res) + +def testFlexLayoutReturnFbigRead(t, env): + """ + Send LAYOUTRETURN with NFS4ERR_FBIG on READ + + FLAGS: flex layoutreturn + CODE: FFLORFBIG + """ + name = env.testname(t) + sess = env.c1.new_pnfs_client_session(env.testname(t)) + + # Create the file + res = create_file(sess, name) + check(res) + fh = res.resarray[-1].object + open_stateid = res.resarray[-2].stateid + + # Return layout with error + layoutget_return(sess, fh, open_stateid, NFS4_OK, LAYOUTIOMODE4_RW, NFS4ERR_FBIG, OP_WRITE) + + # Verify error code propagation + # Unlike with a WRITE, we should see no error + layoutget_return(sess, fh, open_stateid, NFS4_OK) # Close file res = close_file(sess, fh, stateid=open_stateid) check(res) -def testFlexLayoutReturnFbig(t, env): +def testFlexLayoutReturnFbigWrite(t, env): """ - Send LAYOUTRETURN with NFS4ERR_FBIG + Send LAYOUTRETURN with NFS4ERR_FBIG on WRITE FLAGS: flex layoutreturn CODE: FFLORFBIG
@@ -884,7 +960,10 @@ def testFlexLayoutReturnFbig(t, env): open_stateid = res.resarray[-2].stateid # Return layout with error - layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_RW, NFS4ERR_FBIG, OP_WRITE) + layoutget_return(sess, fh, open_stateid, NFS4_OK, LAYOUTIOMODE4_RW, NFS4ERR_FBIG, OP_WRITE) + + # Verify error code propagation + layoutget_return(sess, fh, open_stateid, [NFS4_OK, NFS4ERR_DELAY, NFS4ERR_FBIG]) # Close file res = close_file(sess, fh, stateid=open_stateid)
@@ -907,9 +986,12 @@ def testFlexLayoutReturnAccessRead(t, env): open_stateid = res.resarray[-2].stateid # Return layout with error - layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_READ, + layoutget_return(sess, fh, open_stateid, NFS4_OK, LAYOUTIOMODE4_READ, NFS4ERR_ACCESS, OP_READ) + # Verify error code propagation + layoutget_return(sess, fh, open_stateid, [NFS4_OK, NFS4ERR_DELAY, NFS4ERR_ACCESS]) + # Close file res = close_file(sess, fh, stateid=open_stateid) check(res)
@@ -931,9 +1013,12 @@ def testFlexLayoutReturnAccessWrite(t, env): open_stateid = res.resarray[-2].stateid # Return layout with error - layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_RW, + layoutget_return(sess, fh, open_stateid, NFS4_OK, LAYOUTIOMODE4_RW, NFS4ERR_ACCESS, OP_WRITE) + # Verify error code propagation + layoutget_return(sess, fh, open_stateid, [NFS4_OK, NFS4ERR_DELAY, NFS4ERR_ACCESS]) + # Close file res = close_file(sess, fh, stateid=open_stateid) check(res)
@@ -955,7 +1040,10 @@ def testFlexLayoutReturnDelayRead(t, env): open_stateid = res.resarray[-2].stateid # Return layout with error - layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_READ, NFS4ERR_DELAY, OP_READ) + layoutget_return(sess, fh, open_stateid, NFS4_OK, LAYOUTIOMODE4_READ, NFS4ERR_DELAY, OP_READ) + + # Verify error code propagation + layoutget_return(sess, fh, open_stateid, [NFS4_OK, NFS4ERR_DELAY]) # Close file res = close_file(sess, fh, stateid=open_stateid)
@@ -978,7 +1066,10 @@ def testFlexLayoutReturnDelayWrite(t, env): open_stateid = res.resarray[-2].stateid # Return layout with error - layoutget_return(sess, fh, open_stateid, LAYOUTIOMODE4_RW, NFS4ERR_DELAY, OP_WRITE) + layoutget_return(sess, fh, open_stateid, NFS4_OK, LAYOUTIOMODE4_RW, NFS4ERR_DELAY, OP_WRITE) + + # Verify error code propagation + layoutget_return(sess, fh, open_stateid, [NFS4_OK, NFS4ERR_DELAY]) # Close file res = close_file(sess, fh, stateid=open_stateid)
@@ -1006,6 +1097,12 @@ def testFlexLayoutReturn1K(t, env): layout_error = None if i % layout_error_ratio else NFS4ERR_ACCESS layoutget_return(sess, fh, open_stateid, layout_error=layout_error) + # Verify error code propagation + if layout_error: + layoutget_return(sess, fh, open_stateid, [NFS4_OK, NFS4ERR_DELAY, layout_error]) + else: + layoutget_return(sess, fh, open_stateid, NFS4_OK) + # Close file res = close_file(sess, fh, stateid=open_stateid) check(res)
Signature · 1 line
2.26.2
PATCH 5/10 Fix testFlexLayoutOldSeqid
In reply to Tom HaynesFrom: Trond Myklebust <[email protected]>
LAYOUTRETURN should return NFS4ERR_OLD_STATEID when presented with an older layout that wasn't recalled.
--- nfs4.1/server41tests/st_flex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
nfs4.1/server41tests/st_flex.py +1 -1
@@ -169,7 +169,7 @@ def testFlexLayoutOldSeqid(t, env): layoutreturn4(LAYOUTRETURN4_FILE, layoutreturn_file4(0, 0xffffffffffffffff, lo_stateid, "")))] res = sess.compound(ops) - check(res) + check(res, NFS4ERR_OLD_STATEID, "LAYOUTRETURN with an old stateid") res = close_file(sess, fh, stateid=open_stateid) check(res)
Signature · 1 line
2.26.2
PATCH 6/10 st_flex: Reduce the layoutstats period to make tests finish in a sane time
In reply to Tom HaynesWith a 15s sleep period, the three layoutstat tests take a huge time to run.
Reduce the sleep period (and corresponding time columns) to allow the test to still test the functionality, but also run in a more reasonable period.
--- nfs4.1/server41tests/st_flex.py | 127 ++++++++++++++++---------------- 1 file changed, 63 insertions(+), 64 deletions(-)
nfs4.1/server41tests/st_flex.py +63 -64
@@ -506,26 +506,25 @@ def testFlexLayoutStatsReset(t, env): CODE: FFLS2 """ - ls = [[15, 14997377109, 756789248, 0, 756834304, 184774, 184763, 14996867426, 135877046309, 252579840, 0, 252665856, 61686, 61665, 14997307909, 336986104593], - [15, 29997404625, 1527537664, 0, 1527566336, 372941, 372934, 29996142132, 275416132139, 508502016, 0, 508604416, 124171, 124146, 29997293567, 670368077434], - [15, 44999356031, 2331115520, 0, 2331136000, 569125, 569120, 44997516473, 414235887583, 775569408, 0, 775680000, 189375, 189348, 44999096896, 1004056428600], - [15, 60001513873, 3142483968, 0, 3142529024, 767219, 767208, 59999263507, 550956049466, 1044996096, 0, 1045082112, 255147, 255126, 60001232968, 1340163285214], - [15, 75001564615, 3969384448, 0, 3969413120, 969095, 969088, 74999204445, 687761120289, 1320456192, 0, 1320542208, 322398, 322377, 75001158793, 1676193906267], - [15, 90001651970, 4873195520, 0, 4873248768, 1189758, 1189745, 89999194540, 828644696229, 1620467712, 0, 1620545536, 395641, 395622, 90000994588, 2006906488984], - [15, 105001710572, 5816430592, 0, 5816467456, 1420036, 1420027, 104995782871, 979226777566, 1935175680, 0, 1935269888, 472478, 472455, 104999171073, 2326727992588], - [15, 14997245247, 1466019840, 0, 1466097664, 357934, 357915, 15001797989, 277140995467, 487624704, 0, 487677952, 119062, 119049, 14997939745, 179221181962], - [15, 29999503656, 2929393664, 0, 2929500160, 715210, 715184, 30001965158, 554484427501, 974204928, 0, 974229504, 237849, 237843, 29998797328, 359060066193], - [15, 45000138417, 4245204992, 0, 4245245952, 1036437, 1036427, 45005641995, 825579118923, 1411981312, 0, 1412071424, 344744, 344722, 44996637179, 547563519532], - [15, 60000125536, 5545734144, 0, 5545807872, 1353957, 1353939, 60009284822, 1097378466922, 1844367360, 0, 1844400128, 450293, 450285, 59996684404, 735124264647], - [15, 14999894874, 1278164992, 0, 1278226432, 312067, 312052, 15006094174, 270749903934, 425877504, 0, 425947136, 103991, 103974, 15000341906, 189401125380], - [15, 30000017314, 2586595328, 0, 2586648576, 631506, 631493, 30009142707, 540229533389, 860536832, 0, 860614656, 210111, 210092, 29999220098, 379353634204], - [15, 44999991304, 3859476480, 0, 3859574784, 942279, 942255, 45011969088, 808964878766, 1283543040, 0, 1283575808, 313373, 313365, 44999310875, 571777183394], - [15, 60000803942, 5141098496, 0, 5141168128, 1255168, 1255151, 60015665154, 1075012244233, 1709035520, 0, 1709096960, 417260, 417245, 60000142398, 766775808737], - [15, 75000722908, 6431453184, 0, 6431526912, 1570197, 1570179, 75018741381, 1344327593333, 2140831744, 0, 2140889088, 522678, 522664, 75000341374, 957762218131], - [15, 14990345451, 1310584832, 0, 1310654464, 319984, 319967, 14990338511, 276432361830, 436121600, 0, 436183040, 106490, 106475, 14991353202, 182231098560], - [15, 29990415908, 2630619136, 0, 2630701056, 642261, 642241, 29983066936, 554752250256, 875077632, 0, 875126784, 213654, 213642, 29982845793, 362758943732], - [15, 44992404751, 3910578176, 0, 3910664192, 954752, 954731, 44982785073, 827471490050, 1300946944, 0, 1300992000, 317625, 317614, 44985003324, 549721947944]] - + ls = [[1, 999825140, 756789248, 0, 756834304, 184774, 184763, 999791161, 9058469753, 252579840, 0, 252665856, 61686, 61665, 999820527, 22465740306], + [1, 1999826975, 1527537664, 0, 1527566336, 372941, 372934, 1999742808, 18361075475, 508502016, 0, 508604416, 124171, 124146, 1999819571, 44691205162], + [1, 2999957068, 2331115520, 0, 2331136000, 569125, 569120, 2999834431, 27615725838, 775569408, 0, 775680000, 189375, 189348, 2999939793, 66937095240], + [1, 4000100924, 3142483968, 0, 3142529024, 767219, 767208, 3999950900, 36730403297, 1044996096, 0, 1045082112, 255147, 255126, 4000082197, 89344219014], + [1, 5000104307, 3969384448, 0, 3969413120, 969095, 969088, 4999946963, 45850741352, 1320456192, 0, 1320542208, 322398, 322377, 5000077252, 111746260417], + [1, 6000110131, 4873195520, 0, 4873248768, 1189758, 1189745, 5999946302, 55242979748, 1620467712, 0, 1620545536, 395641, 395622, 6000066305, 133793765932], + [1, 7000114038, 5816430592, 0, 5816467456, 1420036, 1420027, 6999718858, 65281785171, 1935175680, 0, 1935269888, 472478, 472455, 6999944738, 155115199505], + [1, 999816349, 1466019840, 0, 1466097664, 357934, 357915, 1000119865, 18476066364, 487624704, 0, 487677952, 119062, 119049, 999862649, 11948078797], + [1, 1999966910, 2929393664, 0, 2929500160, 715210, 715184, 2000131010, 36965628500, 974204928, 0, 974229504, 237849, 237843, 1999919821, 23937337746], + [1, 3000009227, 4245204992, 0, 4245245952, 1036437, 1036427, 3000376133, 55038607928, 1411981312, 0, 1412071424, 344744, 344722, 2999775811, 36504234635], + [1, 4000008369, 5545734144, 0, 5545807872, 1353957, 1353939, 4000618988, 73158564461, 1844367360, 0, 1844400128, 450293, 450285, 3999778960, 49008284309], + [1, 999992991, 1278164992, 0, 1278226432, 312067, 312052, 1000406278, 18049993595, 425877504, 0, 425947136, 103991, 103974, 1000022793, 12626741692], + [1, 2000001154, 2586595328, 0, 2586648576, 631506, 631493, 2000609513, 36015302225, 860536832, 0, 860614656, 210111, 210092, 1999948006, 25290242280], + [1, 2999999420, 3859476480, 0, 3859574784, 942279, 942255, 3000797939, 53930991917, 1283543040, 0, 1283575808, 313373, 313365, 2999954058, 38118478892], + [1, 4000053596, 5141098496, 0, 5141168128, 1255168, 1255151, 4001044343, 71667482948, 1709035520, 0, 1709096960, 417260, 417245, 4000009493, 51118387249], + [1, 5000048193, 6431453184, 0, 6431526912, 1570197, 1570179, 5001249425, 89621839555, 2140831744, 0, 2140889088, 522678, 522664, 5000022758, 63850814542], + [1, 999356363, 1310584832, 0, 1310654464, 319984, 319967, 999355900, 18428824122, 436121600, 0, 436183040, 106490, 106475, 999423546, 12148739904], + [1, 1999361060, 2630619136, 0, 2630701056, 642261, 642241, 1998871129, 36983483350, 875077632, 0, 875126784, 213654, 213642, 1998856386, 24183929582], + [1, 2999493650, 3910578176, 0, 3910664192, 954752, 954731, 2998852338, 55164766003, 1300946944, 0, 1300992000, 317625, 317614, 2999000221, 36648129862]] _LayoutStats(t, env, ls) def testFlexLayoutStatsStraight(t, env):
@@ -537,25 +536,25 @@ def testFlexLayoutStatsStraight(t, env): CODE: FFLS3 """ - ls = [[15, 14997377109, 756789248, 0, 756834304, 184774, 184763, 14996867426, 135877046309, 252579840, 0, 252665856, 61686, 61665, 14997307909, 336986104593], - [15, 29997404625, 1527537664, 0, 1527566336, 372941, 372934, 29996142132, 275416132139, 508502016, 0, 508604416, 124171, 124146, 29997293567, 670368077434], - [15, 44999356031, 2331115520, 0, 2331136000, 569125, 569120, 44997516473, 414235887583, 775569408, 0, 775680000, 189375, 189348, 44999096896, 1004056428600], - [15, 60001513873, 3142483968, 0, 3142529024, 767219, 767208, 59999263507, 550956049466, 1044996096, 0, 1045082112, 255147, 255126, 60001232968, 1340163285214], - [15, 75001564615, 3969384448, 0, 3969413120, 969095, 969088, 74999204445, 687761120289, 1320456192, 0, 1320542208, 322398, 322377, 75001158793, 1676193906267], - [15, 90001651970, 4873195520, 0, 4873248768, 1189758, 1189745, 89999194540, 828644696229, 1620467712, 0, 1620545536, 395641, 395622, 90000994588, 2006906488984], - [15, 105001710572, 5816430592, 0, 5816467456, 1420036, 1420027, 104995782871, 979226777566, 1935175680, 0, 1935269888, 472478, 472455, 104999171073, 2326727992588], - [15, 119998955819, 7282450432, 0, 7282565120, 1777970, 1777942, 119997580860, 1256367773033, 2422800384, 0, 2422947840, 591540, 591504, 119997110818, 2505949174550], - [15, 135001214228, 8745824256, 0, 8745967616, 2135246, 2135211, 134997748029, 1533711205067, 2909380608, 0, 2909499392, 710327, 710298, 134997968401, 2685788058781], - [15, 150001848989, 10061635584, 0, 10061713408, 2456473, 2456454, 150001424866, 1804805896489, 3347156992, 0, 3347341312, 817222, 817177, 149995808252, 2874291512120], - [15, 165001836108, 11362164736, 0, 11362275328, 2773993, 2773966, 165005067693, 2076605244488, 3779543040, 0, 3779670016, 922771, 922740, 164995855477, 3061852257235], - [15, 180001730982, 12640329728, 0, 12640501760, 3086060, 3086018, 180011161867, 2347355148422, 4205420544, 0, 4205617152, 1026762, 1026714, 179996197383, 3251253382615], - [15, 195001853422, 13948760064, 0, 13948923904, 3405499, 3405459, 195014210400, 2616834777877, 4640079872, 0, 4640284672, 1132882, 1132832, 194995075575, 3441205891439], - [15, 210001827412, 15221641216, 0, 15221850112, 3716272, 3716221, 210017036781, 2885570123254, 5063086080, 0, 5063245824, 1236144, 1236105, 209995166352, 3633629440629], - [15, 225002640050, 16503263232, 0, 16503443456, 4029161, 4029117, 225020732847, 3151617488721, 5488578560, 0, 5488766976, 1340031, 1339985, 224995997875, 3828628065972], - [15, 240002559016, 17793617920, 0, 17793802240, 4344190, 4344145, 240023809074, 3420932837821, 5920374784, 0, 5920559104, 1445449, 1445404, 239996196851, 4019614475366], - [15, 254992904467, 19104202752, 0, 19104456704, 4664174, 4664112, 255014147585, 3697365199651, 6356496384, 0, 6356742144, 1551939, 1551879, 254987550053, 4201845573926], - [15, 269992974924, 20424237056, 0, 20424503296, 4986451, 4986386, 270006876010, 3975685088077, 6795452416, 0, 6795685888, 1659103, 1659046, 269979042644, 4382373419098], - [15, 284994963767, 21704196096, 0, 21704466432, 5298942, 5298876, 285006594147, 4248404327871, 7221321728, 0, 7221551104, 1763074, 1763018, 284981200175, 4569336423310]] + ls = [[1, 999825140, 756789248, 0, 756834304, 184774, 184763, 999791161, 9058469753, 252579840, 0, 252665856, 61686, 61665, 999820527, 22465740306], + [1, 1999826975, 1527537664, 0, 1527566336, 372941, 372934, 1999742808, 18361075475, 508502016, 0, 508604416, 124171, 124146, 1999819571, 44691205162], + [1, 2999957068, 2331115520, 0, 2331136000, 569125, 569120, 2999834431, 27615725838, 775569408, 0, 775680000, 189375, 189348, 2999939793, 66937095240], + [1, 4000100924, 3142483968, 0, 3142529024, 767219, 767208, 3999950900, 36730403297, 1044996096, 0, 1045082112, 255147, 255126, 4000082197, 89344219014], + [1, 5000104307, 3969384448, 0, 3969413120, 969095, 969088, 4999946963, 45850741352, 1320456192, 0, 1320542208, 322398, 322377, 5000077252, 111746260417], + [1, 6000110131, 4873195520, 0, 4873248768, 1189758, 1189745, 5999946302, 55242979748, 1620467712, 0, 1620545536, 395641, 395622, 6000066305, 133793765932], + [1, 7000114038, 5816430592, 0, 5816467456, 1420036, 1420027, 6999718858, 65281785171, 1935175680, 0, 1935269888, 472478, 472455, 6999944738, 155115199505], + [1, 7999930387, 7282450432, 0, 7282565120, 1777970, 1777942, 7999838724, 83757851535, 2422800384, 0, 2422947840, 591540, 591504, 7999807387, 167063278303], + [1, 9000080948, 8745824256, 0, 8745967616, 2135246, 2135211, 8999849868, 102247413671, 2909380608, 0, 2909499392, 710327, 710298, 8999864560, 179052537252], + [1, 10000123265, 10061635584, 0, 10061713408, 2456473, 2456454, 10000094991, 120320393099, 3347156992, 0, 3347341312, 817222, 817177, 9999720550, 191619434141], + [1, 11000122407, 11362164736, 0, 11362275328, 2773993, 2773966, 11000337846, 138440349632, 3779543040, 0, 3779670016, 922771, 922740, 10999723698, 204123483815], + [1, 12000115398, 12640329728, 0, 12640501760, 3086060, 3086018, 12000744124, 156490343228, 4205420544, 0, 4205617152, 1026762, 1026714, 11999746492, 216750225507], + [1, 13000123561, 13948760064, 0, 13948923904, 3405499, 3405459, 13000947360, 174455651858, 4640079872, 0, 4640284672, 1132882, 1132832, 12999671705, 229413726095], + [1, 14000121827, 15221641216, 0, 15221850112, 3716272, 3716221, 14001135785, 192371341550, 5063086080, 0, 5063245824, 1236144, 1236105, 13999677756, 242241962708], + [1, 15000176003, 16503263232, 0, 16503443456, 4029161, 4029117, 15001382189, 210107832581, 5488578560, 0, 5488766976, 1340031, 1339985, 14999733191, 255241871064], + [1, 16000170601, 17793617920, 0, 17793802240, 4344190, 4344145, 16001587271, 228062189188, 5920374784, 0, 5920559104, 1445449, 1445404, 15999746456, 267974298357], + [1, 16999526964, 19104202752, 0, 19104456704, 4664174, 4664112, 17000943172, 246491013310, 6356496384, 0, 6356742144, 1551939, 1551879, 16999170003, 280123038261], + [1, 17999531661, 20424237056, 0, 20424503296, 4986451, 4986386, 18000458400, 265045672538, 6795452416, 0, 6795685888, 1659103, 1659046, 17998602842, 292158227939], + [1, 18999664251, 21704196096, 0, 21704466432, 5298942, 5298876, 19000439609, 283226955191, 7221321728, 0, 7221551104, 1763074, 1763018, 18998746678, 304622428220]] _LayoutStats(t, env, ls) def testFlexLayoutStatsOverflow(t, env):
@@ -566,31 +565,31 @@ def testFlexLayoutStatsOverflow(t, env): CODE: FFLS4 """ - ls = [[27, 27614183359, 0, 0, 0, 0, 0, 0, 0, 41943040, 0, 96468992, 10292, 10240, 26609085208, 134047775590766], - [15, 42725368747, 0, 0, 0, 0, 0, 0, 0, 41943040, 0, 2402213888, 15847, 11881, 31458638093, 136367242297571], - [15, 57912190475, 0, 0, 0, 0, 0, 0, 0, 41943040, 0, 2406907904, 15924, 11881, 31458638093, 136367242297571], - [15, 72921814168, 0, 0, 0, 0, 0, 0, 0, 896532480, 0, 2946293760, 16847, 15969, 70391696445, 275087250172195], - [15, 87922239746, 0, 0, 0, 0, 0, 0, 0, 896532480, 0, 3196473344, 18335, 15969, 70391696445, 275087250172195], - [15, 102949476399, 0, 0, 0, 0, 0, 0, 0, 1808183296, 0, 4038545408, 20452, 19074, 92455324261, 310159328537298], - [15, 117951351182, 0, 0, 0, 0, 0, 0, 0, 2587693056, 0, 4486782976, 22613, 19935, 116950745229, 331739899803911], - [16, 133017224561, 0, 0, 0, 0, 0, 0, 0, 2587693056, 0, 4830961664, 23306, 22169, 118004988775, 353778424445917], - [15, 148031127154, 0, 0, 0, 0, 0, 0, 0, 4132970496, 0, 5960671232, 29861, 26094, 146128115965, 387064682636158], - [15, 163058556237, 0, 0, 0, 0, 0, 0, 0, 5614419968, 0, 7550558208, 40590, 39198, 159139080717, 453635077855389], - [15, 178067770476, 0, 0, 0, 0, 0, 0, 0, 5614419968, 0, 7838756864, 41554, 39198, 159139080717, 453635077855389], - [15, 193081456711, 0, 0, 0, 0, 0, 0, 0, 6428528640, 0, 8151494656, 43497, 42179, 189486399712, 517147615890054], - [15, 208082626131, 0, 0, 0, 0, 0, 0, 0, 7284596736, 0, 8656367616, 47929, 43079, 207082978313, 532741795045495], - [15, 223082643294, 0, 0, 0, 0, 0, 0, 0, 7944978432, 0, 9539055616, 58212, 53705, 222083467525, 636168303637199], - [15, 238083127306, 0, 0, 0, 0, 0, 0, 0, 7944978432, 0, 9763426304, 62673, 57863, 223491351125, 650450833313121], - [15, 253175262253, 0, 0, 0, 0, 0, 0, 0, 7944978432, 0, 9860571136, 65509, 57863, 223491351125, 650450833313121], - [15, 268185316876, 0, 0, 0, 0, 0, 0, 0, 8729772032, 0, 10523738112, 71014, 65222, 267165070170, 853839631006322], - [17, 285787666679, 0, 0, 0, 0, 0, 0, 0, 9522692096, 0, 10779361280, 72612, 66965, 284787142241, 896650223319399], - [33, 318568880195, 0, 0, 0, 0, 0, 0, 0, 9522692096, 0, 10779361280, 72613, 72611, 317562885639, 1120229814239633], - [15, 333747489171, 0, 0, 0, 0, 0, 0, 0, 10788278272, 0, 10788802560, 74918, 74790, 332233465692, 1121703181284495], - [15, 348749618256, 0, 0, 0, 0, 0, 0, 0, 10801360896, 0, 10801885184, 78112, 77984, 347235605251, 1123668237106158], - [14, 362014682745, 0, 0, 0, 0, 0, 0, 0, 10812923904, 0, 10814496768, 81191, 80935, 361134569864, 1125289046746198], - [15, 377016435231, 0, 0, 0, 0, 0, 0, 0, 10836291584, 0, 10837864448, 86896, 86640, 376136316640, 1127198465086932], - [15, 392027464946, 0, 0, 0, 0, 0, 0, 0, 10852364288, 0, 10853937152, 90820, 90564, 391147321463, 1129113173731145], - [15, 407034683097, 0, 0, 0, 0, 0, 0, 0, 10864914432, 0, 10866487296, 93884, 93628, 406154554429, 1131023767183211]] + ls = [[3, 3944883337, 0, 0, 0, 0, 0, 0, 0, 41943040, 0, 96468992, 10292, 10240, 3801297886, 19149682227252], + [2, 6103624106, 0, 0, 0, 0, 0, 0, 0, 41943040, 0, 2402213888, 15847, 11881, 4494091156, 19481034613938], + [2, 8273170067, 0, 0, 0, 0, 0, 0, 0, 41943040, 0, 2406907904, 15924, 11881, 4494091156, 19481034613938], + [2, 10417402024, 0, 0, 0, 0, 0, 0, 0, 896532480, 0, 2946293760, 16847, 15969, 10055956635, 39298178596027], + [2, 12560319963, 0, 0, 0, 0, 0, 0, 0, 896532480, 0, 3196473344, 18335, 15969, 10055956635, 39298178596027], + [2, 14707068057, 0, 0, 0, 0, 0, 0, 0, 1808183296, 0, 4038545408, 20452, 19074, 13207903465, 44308475505328], + [2, 16850193026, 0, 0, 0, 0, 0, 0, 0, 2587693056, 0, 4486782976, 22613, 19935, 16707249318, 47391414257701], + [2, 19002460651, 0, 0, 0, 0, 0, 0, 0, 2587693056, 0, 4830961664, 23306, 22169, 16857855539, 50539774920845], + [2, 21147303879, 0, 0, 0, 0, 0, 0, 0, 4132970496, 0, 5960671232, 29861, 26094, 20875445137, 55294954662308], + [2, 23294079462, 0, 0, 0, 0, 0, 0, 0, 5614419968, 0, 7550558208, 40590, 39198, 22734154388, 64805011122198], + [2, 25438252925, 0, 0, 0, 0, 0, 0, 0, 5614419968, 0, 7838756864, 41554, 39198, 22734154388, 64805011122198], + [2, 27583065244, 0, 0, 0, 0, 0, 0, 0, 6428528640, 0, 8151494656, 43497, 42179, 27069485673, 73878230841436], + [2, 29726089447, 0, 0, 0, 0, 0, 0, 0, 7284596736, 0, 8656367616, 47929, 43079, 29583282616, 76105970720785], + [2, 31868949042, 0, 0, 0, 0, 0, 0, 0, 7944978432, 0, 9539055616, 58212, 53705, 31726209646, 90881186233885], + [2, 34011875329, 0, 0, 0, 0, 0, 0, 0, 7944978432, 0, 9763426304, 62673, 57863, 31927335875, 92921547616160], + [2, 36167894607, 0, 0, 0, 0, 0, 0, 0, 7944978432, 0, 9860571136, 65509, 57863, 31927335875, 92921547616160], + [2, 38312188125, 0, 0, 0, 0, 0, 0, 0, 8729772032, 0, 10523738112, 71014, 65222, 38166438595, 121977090143760], + [2, 40826809525, 0, 0, 0, 0, 0, 0, 0, 9522692096, 0, 10779361280, 72612, 66965, 40683877463, 128092889045628], + [4, 45509840027, 0, 0, 0, 0, 0, 0, 0, 9522692096, 0, 10779361280, 72613, 72611, 45366126519, 160032830605661], + [2, 47678212738, 0, 0, 0, 0, 0, 0, 0, 10788278272, 0, 10788802560, 74918, 74790, 47461923670, 160243311612070], + [2, 49821374036, 0, 0, 0, 0, 0, 0, 0, 10801360896, 0, 10801885184, 78112, 77984, 49605086464, 160524033872308], + [1, 51716383249, 0, 0, 0, 0, 0, 0, 0, 10812923904, 0, 10814496768, 81191, 80935, 51590652837, 160755578106599], + [2, 53859490747, 0, 0, 0, 0, 0, 0, 0, 10836291584, 0, 10837864448, 86896, 86640, 53733759520, 161028352155276], + [2, 56003923563, 0, 0, 0, 0, 0, 0, 0, 10852364288, 0, 10853937152, 90820, 90564, 55878188780, 161301881961592], + [2, 58147811871, 0, 0, 0, 0, 0, 0, 0, 10864914432, 0, 10866487296, 93884, 93628, 58022079204, 161574823883315]] _LayoutStats(t, env, ls) def layoutget_return(sess, fh, open_stateid, allowed_errors=NFS4_OK,
Signature · 1 line
2.26.2
PATCH 7/10 st_flex: Fix up test names
In reply to Tom Haynes--- nfs4.1/server41tests/st_flex.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
nfs4.1/server41tests/st_flex.py +2 -2
@@ -894,7 +894,7 @@ def testFlexLayoutReturnNospcWrite(t, env): Send LAYOUTRETURN with NFS4ERR_NOSPC on WRITE FLAGS: flex layoutreturn - CODE: FFLORNOSPC + CODE: FFLORNOSPCWRITE """ name = env.testname(t) sess = env.c1.new_pnfs_client_session(env.testname(t))
@@ -947,7 +947,7 @@ def testFlexLayoutReturnFbigWrite(t, env): Send LAYOUTRETURN with NFS4ERR_FBIG on WRITE FLAGS: flex layoutreturn - CODE: FFLORFBIG + CODE: FFLORFBIGWRITE """ name = env.testname(t) sess = env.c1.new_pnfs_client_session(env.testname(t))
Signature · 1 line
2.26.2
PATCH 8/10 st_flex: Only do 100 layoutget/return in loop
In reply to Tom Haynes--- nfs4.1/server41tests/st_flex.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
nfs4.1/server41tests/st_flex.py +4 -4
@@ -1074,16 +1074,16 @@ def testFlexLayoutReturnDelayWrite(t, env): res = close_file(sess, fh, stateid=open_stateid) check(res) -def testFlexLayoutReturn1K(t, env): +def testFlexLayoutReturn100(t, env): """ - Perform LAYOUTGET and LAYOUTRETURN 1K times with error being returned periodically + Perform LAYOUTGET and LAYOUTRETURN 100 times with error being returned periodically FLAGS: flex layoutreturn - CODE: FFLOR1K + CODE: FFLOR100 """ name = env.testname(t) sess = env.c1.new_pnfs_client_session(env.testname(t)) - count = 1000 # Repeat LAYOUTGET/LAYOUTRETURN count times + count = 100 # Repeat LAYOUTGET/LAYOUTRETURN count times layout_error_ratio = 10 # Send an error every layout_error_ratio layout returns # Create the file
Signature · 1 line
2.26.2
PATCH 9/10 st_flex: We can't return the layout without a layout stateid
In reply to Tom Haynes--- nfs4.1/server41tests/st_flex.py | 2 ++ 1 file changed, 2 insertions(+)
nfs4.1/server41tests/st_flex.py +2 -0
@@ -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
Signature · 1 line
2.26.2
PATCH 10/10 st_flex: Fixup check for error in layoutget_return()
In reply to Tom Haynes--- nfs4.1/server41tests/st_flex.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
nfs4.1/server41tests/st_flex.py +1 -1
@@ -605,7 +605,7 @@ 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: + 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
Signature · 1 line
2.26.2
Quoted 4 lines · Tom Haynes
Hi Bruce,
Here are a series of patches that Hamerspace has applied to the flex files testing.
Thanks, applying.
I'm pretty hands-off when it comes to pynfs tests I don't personally run. If they work for you then I'm probably fine with them....
--b.
Quoted 28 lines
Thanks,
TomJean Spector (2):
st_flex.py- Added tests for LAYOUTRETURN with errorsst_flex.py- Fixed flag namesTom Haynes (7):
Close the file for SEQ10b
flexfiles: Fix up the layout error handling to reflect the previous
error
st_flex: Reduce the layoutstats period to make tests finish in a sane
time
st_flex: Fix up test names
st_flex: Only do 100 layoutget/return in loop
st_flex: We can't return the layout without a layout stateid
st_flex: Fixup check for error inlayoutget_return()Trond Myklebust (1):
Fix testFlexLayoutOldSeqidnfs4.1/server41tests/st_flex.py | 651 +++++++++++++++++++++++++--- nfs4.1/server41tests/st_sequence.py | 5 + 2 files changed, 588 insertions(+), 68 deletions(-)Signature · 1 line
2.26.2
I run the tests. They fail due to python3 incompatibility:
FFST1 st_flex.testStateid1 : PASS
FFLA1 st_flex.testFlexLayoutTestAccess : FAILURE
Expected uid_rd != b'17', got b'17'FFLG2 st_flex.testFlexLayoutStress : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFLS3 st_flex.testFlexLayoutStatsStraight : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFLS1 st_flex.testFlexLayoutStatsSmall : FAILURE
TypeError: can't concat str to bytes
FFLS2 st_flex.testFlexLayoutStatsReset : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFLS4 st_flex.testFlexLayoutStatsOverflow : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFLORSTALEWRITE st_flex.testFlexLayoutReturnStaleWrite : FAILURE
OP_LAYOUTGET should return NFS4_OK or NFS4ERR_DELAY or NFS4ERR_STALE, instead got NFS4ERR_LAYOUTUNAVAILABLE
FFLORSTALEREAD st_flex.testFlexLayoutReturnStaleRead : FAILURE
OP_LAYOUTGET should return NFS4_OK, instead got NFS4ERR_LAYOUTTRYLATER
FFLORSERVERFAULTWRITE st_flex.testFlexLayoutReturnServerFaultWrite : FAILURE
OP_LAYOUTGET should return NFS4_OK or NFS4ERR_DELAY or NFS4ERR_SERVERFAULT, instead got NFS4ERR_LAYOUTUNAVAILABLE
FFLORSERVERFAULTREAD st_flex.testFlexLayoutReturnServerFaultRead : FAILURE
OP_LAYOUTGET should return NFS4_OK, instead got NFS4ERR_LAYOUTTRYLATER
FFLORNXIOWRITE st_flex.testFlexLayoutReturnNxioWrite : FAILURE
OP_LAYOUTGET should return NFS4_OK or NFS4ERR_DELAY or NFS4ERR_NXIO, instead got NFS4ERR_LAYOUTUNAVAILABLE
FFLORNXIOREAD st_flex.testFlexLayoutReturnNxioRead : FAILURE
OP_LAYOUTGET should return NFS4_OK, instead got NFS4ERR_LAYOUTTRYLATER
FFLORNOSPCWRITE st_flex.testFlexLayoutReturnNospcWrite : FAILURE
OP_LAYOUTGET should return NFS4_OK or NFS4ERR_DELAY or NFS4ERR_NOSPC, instead got NFS4ERR_LAYOUTUNAVAILABLE
FFLORNOSPC st_flex.testFlexLayoutReturnNospcRead : FAILURE
OP_LAYOUTGET should return NFS4_OK, instead got NFS4ERR_LAYOUTUNAVAILABLE
FFLORIOWRITE st_flex.testFlexLayoutReturnIoWrite : FAILURE
OP_LAYOUTGET should return NFS4_OK or NFS4ERR_DELAY or NFS4ERR_IO, instead got NFS4ERR_LAYOUTUNAVAILABLE
FFLORIOREAD st_flex.testFlexLayoutReturnIoRead : FAILURE
OP_LAYOUTGET should return NFS4_OK, instead got NFS4ERR_LAYOUTTRYLATER
FFLORFBIGWRITE st_flex.testFlexLayoutReturnFbigWrite : FAILURE
OP_LAYOUTGET should return NFS4_OK or NFS4ERR_DELAY or NFS4ERR_FBIG, instead got NFS4ERR_LAYOUTUNAVAILABLE
FFLORFBIG st_flex.testFlexLayoutReturnFbigRead : FAILURE
OP_LAYOUTGET should return NFS4_OK, instead got NFS4ERR_LAYOUTUNAVAILABLE
FFLORDELAYWRITE st_flex.testFlexLayoutReturnDelayWrite : FAILURE
OP_LAYOUTGET should return NFS4_OK or NFS4ERR_DELAY, instead got NFS4ERR_LAYOUTUNAVAILABLE
FFLORDELAYREAD st_flex.testFlexLayoutReturnDelayRead : FAILURE
OP_LAYOUTGET should return NFS4_OK, instead got NFS4ERR_LAYOUTTRYLATER
FFLORACCESSWRITE st_flex.testFlexLayoutReturnAccessWrite : FAILURE
OP_LAYOUTGET should return NFS4_OK or NFS4ERR_DELAY or NFS4ERR_ACCESS, instead got NFS4ERR_LAYOUTUNAVAILABLE
FFLORACCESSREAD st_flex.testFlexLayoutReturnAccessRead : FAILURE
OP_LAYOUTGET should return NFS4_OK, instead got NFS4ERR_LAYOUTTRYLATER
FFLOR100 st_flex.testFlexLayoutReturn100 : FAILURE
NameError: name 'xrange' is not defined
FFLOOS st_flex.testFlexLayoutOldSeqid : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFGLO1 st_flex.testFlexGetLayout : FAILURE
OP_LAYOUTGET should return NFS4_OK, instead got NFS4ERR_LAYOUTTRYLATER
FFGDI1 st_flex.testFlexGetDevInfo : FAILURE
TypeError: can only concatenate str (not "bytes") to str
Regards,
Tigran.
----- Original Message -----
Quoted 47 lines
From: "J. Bruce Fields" <[email protected]>
To: "Tom Haynes" <[email protected]>
Cc: "bfields" <[email protected]>, "linux-nfs" <[email protected]>
Sent: Friday, 18 December, 2020 15:46:05
Subject: Re: [pynfs 00/10] Misc Fixes, primarily LAYOUTRETURNQuoted 4 lines · Tom Haynes
Hi Bruce,
Here are a series of patches that Hamerspace has applied to the flex files testing.
Thanks, applying.
I'm pretty hands-off when it comes to pynfs tests I don't personally run. If they work for you then I'm probably fine with them....
--b.
Quoted 28 lines
Thanks,
TomJean Spector (2):
st_flex.py- Added tests for LAYOUTRETURN with errorsst_flex.py- Fixed flag namesTom Haynes (7):
Close the file for SEQ10b
flexfiles: Fix up the layout error handling to reflect the previous
error
st_flex: Reduce the layoutstats period to make tests finish in a sane
time
st_flex: Fix up test names
st_flex: Only do 100 layoutget/return in loop
st_flex: We can't return the layout without a layout stateid
st_flex: Fixup check for error inlayoutget_return()Trond Myklebust (1):
Fix testFlexLayoutOldSeqidnfs4.1/server41tests/st_flex.py | 651 +++++++++++++++++++++++++--- nfs4.1/server41tests/st_sequence.py | 5 + 2 files changed, 588 insertions(+), 68 deletions(-)--
2.26.2
Quoted 2 lines · Tigran
I run the tests. They fail due to python3 incompatibility:
Thanks! I can't reproduce these, I assume because they're failing too early?:
FFLA1 st_flex.testFlexLayoutTestAccess : RUNNING FFLA1 st_flex.testFlexLayoutTestAccess : FAILURE
OP_LAYOUTGET should return NFS4_OK, instead got
NFS4ERR_LAYOUTUNAVAILABLE
They're probably easy fixes, but I'd rather leave them up to somebody that can test the result. Patches on top of these would be best.
--b.
Quoted 133 lines
FFST1 st_flex.testStateid1 : PASS FFLA1 st_flex.testFlexLayoutTestAccess : FAILURE Expected uid_rd != b'17', got b'17'FFLG2 st_flex.testFlexLayoutStress : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFLS3 st_flex.testFlexLayoutStatsStraight : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFLS1 st_flex.testFlexLayoutStatsSmall : FAILURE
TypeError: can't concat str to bytes
FFLS2 st_flex.testFlexLayoutStatsReset : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFLS4 st_flex.testFlexLayoutStatsOverflow : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFLORSTALEWRITE st_flex.testFlexLayoutReturnStaleWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_STALE, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORSTALEREAD st_flex.testFlexLayoutReturnStaleRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLORSERVERFAULTWRITE st_flex.testFlexLayoutReturnServerFaultWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_SERVERFAULT, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORSERVERFAULTREAD st_flex.testFlexLayoutReturnServerFaultRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLORNXIOWRITE st_flex.testFlexLayoutReturnNxioWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_NXIO, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORNXIOREAD st_flex.testFlexLayoutReturnNxioRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLORNOSPCWRITE st_flex.testFlexLayoutReturnNospcWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_NOSPC, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORNOSPC st_flex.testFlexLayoutReturnNospcRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORIOWRITE st_flex.testFlexLayoutReturnIoWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_IO, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORIOREAD st_flex.testFlexLayoutReturnIoRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLORFBIGWRITE st_flex.testFlexLayoutReturnFbigWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_FBIG, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORFBIG st_flex.testFlexLayoutReturnFbigRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORDELAYWRITE st_flex.testFlexLayoutReturnDelayWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAY, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORDELAYREAD st_flex.testFlexLayoutReturnDelayRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLORACCESSWRITE st_flex.testFlexLayoutReturnAccessWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_ACCESS, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORACCESSREAD st_flex.testFlexLayoutReturnAccessRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLOR100 st_flex.testFlexLayoutReturn100 : FAILURE
NameError: name 'xrange' is not defined
FFLOOS st_flex.testFlexLayoutOldSeqid : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFGLO1 st_flex.testFlexGetLayout : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFGDI1 st_flex.testFlexGetDevInfo : FAILURE
TypeError: can only concatenate str (not "bytes") to strRegards,
Tigran.----- Original Message -----
Quoted 47 lines
From: "J. Bruce Fields" <[email protected]>
To: "Tom Haynes" <[email protected]>
Cc: "bfields" <[email protected]>, "linux-nfs" <[email protected]>
Sent: Friday, 18 December, 2020 15:46:05
Subject: Re: [pynfs 00/10] Misc Fixes, primarily LAYOUTRETURNQuoted 4 lines · Tom Haynes
Hi Bruce,
Here are a series of patches that Hamerspace has applied to the flex files testing.
Thanks, applying.
I'm pretty hands-off when it comes to pynfs tests I don't personally run. If they work for you then I'm probably fine with them....
--b.
Quoted 28 lines
Thanks,
TomJean Spector (2):
st_flex.py- Added tests for LAYOUTRETURN with errorsst_flex.py- Fixed flag namesTom Haynes (7):
Close the file for SEQ10b
flexfiles: Fix up the layout error handling to reflect the previous
error
st_flex: Reduce the layoutstats period to make tests finish in a sane
time
st_flex: Fix up test names
st_flex: Only do 100 layoutget/return in loop
st_flex: We can't return the layout without a layout stateid
st_flex: Fixup check for error inlayoutget_return()Trond Myklebust (1):
Fix testFlexLayoutOldSeqidnfs4.1/server41tests/st_flex.py | 651 +++++++++++++++++++++++++--- nfs4.1/server41tests/st_sequence.py | 5 + 2 files changed, 588 insertions(+), 68 deletions(-)--
2.26.2
Quoted 11 lines · J. Bruce Fields
Quoted 2 lines · Tigran
I run the tests. They fail due to python3 incompatibility:
Thanks! I can't reproduce these, I assume because they're failing too early?:
Quoted 8 lines
FFLA1 st_flex.testFlexLayoutTestAccess : RUNNING FFLA1 st_flex.testFlexLayoutTestAccess : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead got
NFS4ERR_LAYOUTUNAVAILABLEThey're probably easy fixes, but I'd rather leave them up to somebody that can test the result. Patches on top of these would be best.
I’ll do that - but note that they were failing before my patch set.
Quoted 135 lines
--b.
Quoted 133 lines
FFST1 st_flex.testStateid1 : PASS FFLA1 st_flex.testFlexLayoutTestAccess : FAILURE Expected uid_rd != b'17', got b'17'FFLG2 st_flex.testFlexLayoutStress : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFLS3 st_flex.testFlexLayoutStatsStraight : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFLS1 st_flex.testFlexLayoutStatsSmall : FAILURE
TypeError: can't concat str to bytes
FFLS2 st_flex.testFlexLayoutStatsReset : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFLS4 st_flex.testFlexLayoutStatsOverflow : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFLORSTALEWRITE st_flex.testFlexLayoutReturnStaleWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_STALE, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORSTALEREAD st_flex.testFlexLayoutReturnStaleRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLORSERVERFAULTWRITE st_flex.testFlexLayoutReturnServerFaultWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_SERVERFAULT, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORSERVERFAULTREAD st_flex.testFlexLayoutReturnServerFaultRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLORNXIOWRITE st_flex.testFlexLayoutReturnNxioWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_NXIO, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORNXIOREAD st_flex.testFlexLayoutReturnNxioRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLORNOSPCWRITE st_flex.testFlexLayoutReturnNospcWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_NOSPC, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORNOSPC st_flex.testFlexLayoutReturnNospcRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORIOWRITE st_flex.testFlexLayoutReturnIoWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_IO, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORIOREAD st_flex.testFlexLayoutReturnIoRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLORFBIGWRITE st_flex.testFlexLayoutReturnFbigWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_FBIG, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORFBIG st_flex.testFlexLayoutReturnFbigRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORDELAYWRITE st_flex.testFlexLayoutReturnDelayWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAY, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORDELAYREAD st_flex.testFlexLayoutReturnDelayRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLORACCESSWRITE st_flex.testFlexLayoutReturnAccessWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_ACCESS, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORACCESSREAD st_flex.testFlexLayoutReturnAccessRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLOR100 st_flex.testFlexLayoutReturn100 : FAILURE
NameError: name 'xrange' is not defined
FFLOOS st_flex.testFlexLayoutOldSeqid : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFGLO1 st_flex.testFlexGetLayout : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFGDI1 st_flex.testFlexGetDevInfo : FAILURE
TypeError: can only concatenate str (not "bytes") to strRegards,
Tigran.----- Original Message -----
Quoted 47 lines
From: "J. Bruce Fields" <[email protected]>
To: "Tom Haynes" <[email protected]>
Cc: "bfields" <[email protected]>, "linux-nfs" <[email protected]>
Sent: Friday, 18 December, 2020 15:46:05
Subject: Re: [pynfs 00/10] Misc Fixes, primarily LAYOUTRETURNQuoted 4 lines · Tom Haynes
Hi Bruce,
Here are a series of patches that Hamerspace has applied to the flex files testing.
Thanks, applying.
I'm pretty hands-off when it comes to pynfs tests I don't personally run. If they work for you then I'm probably fine with them....
--b.
Quoted 28 lines
Thanks,
TomJean Spector (2):
st_flex.py- Added tests for LAYOUTRETURN with errorsst_flex.py- Fixed flag namesTom Haynes (7):
Close the file for SEQ10b
flexfiles: Fix up the layout error handling to reflect the previous
error
st_flex: Reduce the layoutstats period to make tests finish in a sane
time
st_flex: Fix up test names
st_flex: Only do 100 layoutget/return in loop
st_flex: We can't return the layout without a layout stateid
st_flex: Fixup check for error inlayoutget_return()Trond Myklebust (1):
Fix testFlexLayoutOldSeqid
nfs4.1/server41tests/st_flex.py| 651 +++++++++++++++++++++++++---nfs4.1/server41tests/st_sequence.py| 5 +2 files changed, 588 insertions(+), 68 deletions(-)--
2.26.2
Let correct myself: some of them fail due to python3.
Tigran.
----- Original Message -----
Quoted 164 lines
From: "Tom Haynes" <[email protected]>
To: "J. Bruce Fields" <[email protected]>
Cc: "Tigran Mkrtchyan" <[email protected]>, "bfields" <[email protected]>, "linux-nfs" <[email protected]>
Sent: Friday, 18 December, 2020 17:38:54
Subject: Re: [pynfs 00/10] Misc Fixes, primarily LAYOUTRETURNQuoted 9 lines · J. Bruce Fields
Quoted 2 lines · Tigran
I run the tests. They fail due to python3 incompatibility:
Thanks! I can't reproduce these, I assume because they're failing too early?:
Quoted 8 lines
FFLA1 st_flex.testFlexLayoutTestAccess : RUNNING FFLA1 st_flex.testFlexLayoutTestAccess : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead got
NFS4ERR_LAYOUTUNAVAILABLEThey're probably easy fixes, but I'd rather leave them up to somebody that can test the result. Patches on top of these would be best.
I’ll do that - but note that they were failing before my patch set.
Quoted 135 lines
--b.
Quoted 133 lines
FFST1 st_flex.testStateid1 : PASS FFLA1 st_flex.testFlexLayoutTestAccess : FAILURE Expected uid_rd != b'17', got b'17'FFLG2 st_flex.testFlexLayoutStress : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFLS3 st_flex.testFlexLayoutStatsStraight : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFLS1 st_flex.testFlexLayoutStatsSmall : FAILURE
TypeError: can't concat str to bytes
FFLS2 st_flex.testFlexLayoutStatsReset : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFLS4 st_flex.testFlexLayoutStatsOverflow : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFLORSTALEWRITE st_flex.testFlexLayoutReturnStaleWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_STALE, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORSTALEREAD st_flex.testFlexLayoutReturnStaleRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLORSERVERFAULTWRITE st_flex.testFlexLayoutReturnServerFaultWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_SERVERFAULT, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORSERVERFAULTREAD st_flex.testFlexLayoutReturnServerFaultRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLORNXIOWRITE st_flex.testFlexLayoutReturnNxioWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_NXIO, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORNXIOREAD st_flex.testFlexLayoutReturnNxioRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLORNOSPCWRITE st_flex.testFlexLayoutReturnNospcWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_NOSPC, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORNOSPC st_flex.testFlexLayoutReturnNospcRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORIOWRITE st_flex.testFlexLayoutReturnIoWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_IO, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORIOREAD st_flex.testFlexLayoutReturnIoRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLORFBIGWRITE st_flex.testFlexLayoutReturnFbigWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_FBIG, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORFBIG st_flex.testFlexLayoutReturnFbigRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORDELAYWRITE st_flex.testFlexLayoutReturnDelayWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAY, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORDELAYREAD st_flex.testFlexLayoutReturnDelayRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLORACCESSWRITE st_flex.testFlexLayoutReturnAccessWrite : FAILURE
OP_LAYOUTGETshould returnNFS4_OKorNFS4ERR_DELAYorNFS4ERR_ACCESS, instead gotNFS4ERR_LAYOUTUNAVAILABLE
FFLORACCESSREAD st_flex.testFlexLayoutReturnAccessRead : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFLOR100 st_flex.testFlexLayoutReturn100 : FAILURE
NameError: name 'xrange' is not defined
FFLOOS st_flex.testFlexLayoutOldSeqid : FAILURE
TypeError: can only concatenate str (not "bytes") to str
FFGLO1 st_flex.testFlexGetLayout : FAILURE
OP_LAYOUTGETshould returnNFS4_OK, instead gotNFS4ERR_LAYOUTTRYLATER
FFGDI1 st_flex.testFlexGetDevInfo : FAILURE
TypeError: can only concatenate str (not "bytes") to strRegards,
Tigran.----- Original Message -----
Quoted 47 lines
From: "J. Bruce Fields" <[email protected]>
To: "Tom Haynes" <[email protected]>
Cc: "bfields" <[email protected]>, "linux-nfs" <[email protected]>
Sent: Friday, 18 December, 2020 15:46:05
Subject: Re: [pynfs 00/10] Misc Fixes, primarily LAYOUTRETURNQuoted 4 lines · Tom Haynes
Hi Bruce,
Here are a series of patches that Hamerspace has applied to the flex files testing.
Thanks, applying.
I'm pretty hands-off when it comes to pynfs tests I don't personally run. If they work for you then I'm probably fine with them....
--b.
Quoted 28 lines
Thanks,
TomJean Spector (2):
st_flex.py- Added tests for LAYOUTRETURN with errorsst_flex.py- Fixed flag namesTom Haynes (7):
Close the file for SEQ10b
flexfiles: Fix up the layout error handling to reflect the previous
error
st_flex: Reduce the layoutstats period to make tests finish in a sane
time
st_flex: Fix up test names
st_flex: Only do 100 layoutget/return in loop
st_flex: We can't return the layout without a layout stateid
st_flex: Fixup check for error inlayoutget_return()Trond Myklebust (1):
Fix testFlexLayoutOldSeqid
nfs4.1/server41tests/st_flex.py| 651 +++++++++++++++++++++++++---nfs4.1/server41tests/st_sequence.py| 5 +2 files changed, 588 insertions(+), 68 deletions(-)--
2.26.2