@@ -248,6 +248,12 @@ def check(res, stat=NFS4_OK, msg=None, warnlist=[]):
if not (debug_fail and msg):
return
+ # stale state id test expect some structure stateid.other field.
+ # as this is not the case for all server, do not fail tests if they
+ # have returned BAD_STATEID
+ if res.status == NFS4ERR_STALE_STATEID:
+ warnlist.append(NFS4ERR_BAD_STATEID)
+
statnames = [nfsstat4[stat] for stat in statlist]
desired = ' or '.join(statnames)
if not desired:
@@ -282,6 +282,12 @@ def check(res, stat=NFS4_OK, msg=None, warnlist=[]):
if not (debug_fail and msg):
return
+ # stale state id test expect some structure stateid.other field.
+ # as this is not the case for all server, do not fail tests if they
+ # have returned BAD_STATEID
+ if res.status == NFS4ERR_STALE_STATEID:
+ warnlist.append(NFS4ERR_BAD_STATEID)
+
statnames = [nfsstat4[stat] for stat in statlist]
desired = ' or '.join(statnames)
if not desired:
Stale stateid tests assume to know how state ids are constructed. When this is not the case, then server will return BAD_STATEID and test will fail. update **check** function to always add BAD_STATEID status code to the warning list. Some code duplication, due to testing framework structure. Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> --- nfs4.0/servertests/environment.py | 6 ++++++ nfs4.1/server41tests/environment.py | 6 ++++++ 2 files changed, 12 insertions(+)