diff mbox series

[pynfs,python3,7/7] st_flex: testFlexLayoutStatsSmall needed loving to pass python3

Message ID 20201219182948.83000-8-loghyr@hammerspace.com (mailing list archive)
State New
Headers show
Series Python3 patches for st_flex.py | expand

Commit Message

Thomas Haynes Dec. 19, 2020, 6:29 p.m. UTC
From: Tom Haynes <loghyr@excfb.com>

Signed-off-by: Tom Haynes <loghyr@excfb.com>
---
 nfs4.1/server41tests/st_flex.py | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/nfs4.1/server41tests/st_flex.py b/nfs4.1/server41tests/st_flex.py
index 2b1820c..169db69 100644
--- a/nfs4.1/server41tests/st_flex.py
+++ b/nfs4.1/server41tests/st_flex.py
@@ -8,7 +8,7 @@  from xdrdef.nfs4_pack import NFS4Packer as FlexPacker, \
     NFS4Unpacker as FlexUnpacker
 from nfs4lib import FancyNFS4Packer, get_nfstime
 
-current_stateid = stateid4(1, '\0' * 12)
+current_stateid = stateid4(1, b'\0' * 12)
 
 empty_fflr = ff_layoutreturn4([], [])
 
@@ -347,8 +347,8 @@  def testFlexLayoutStatsSmall(t, env):
     sess = env.c1.new_pnfs_client_session(env.testname(t))
 
     for i in range(len(lats)):
-        open_op = open_create_file_op(sess, env.testname(t) + str(i), open_create=OPEN4_CREATE)
-        res = sess.compound( open_op +
+        open_op = open_create_file_op(sess, b'%s_%i' % (env.testname(t), i), open_create=OPEN4_CREATE)
+        res = sess.compound(open_op +
                [op.layoutget(False, LAYOUT4_FLEX_FILES, LAYOUTIOMODE4_RW,
                             0, NFS4_MAXFILELEN, 4196, current_stateid, 0xffff)])
         check(res, NFS4_OK)