* [PATCH] deleg: break infinite loop in DELEG8 test
@ 2025-04-15 11:48 Tigran Mkrtchyan
2025-04-15 14:10 ` Jeff Layton
0 siblings, 1 reply; 3+ messages in thread
From: Tigran Mkrtchyan @ 2025-04-15 11:48 UTC (permalink / raw)
To: calum.mackay; +Cc: linux-nfs, Tigran Mkrtchyan
The test assumes that the server can return either OK or DELAY,
however, the 'break' condition checks only for OK.
Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
---
nfs4.1/server41tests/st_delegation.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/nfs4.1/server41tests/st_delegation.py b/nfs4.1/server41tests/st_delegation.py
index ea4c073..60b0de6 100644
--- a/nfs4.1/server41tests/st_delegation.py
+++ b/nfs4.1/server41tests/st_delegation.py
@@ -181,8 +181,8 @@ def testDelegRevocation(t, env):
owner, how, claim)
while 1:
res = sess2.compound(env.home + [open_op])
- if res.status == NFS4_OK:
- break;
+ if res.status == NFS4_OK or res.status == NFS4ERR_DELAY:
+ break
check(res, [NFS4_OK, NFS4ERR_DELAY])
# just to keep sess1 renewed. This is a bit fragile, as we
# depend on the above compound waiting no longer than the
--
2.49.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] deleg: break infinite loop in DELEG8 test
2025-04-15 11:48 [PATCH] deleg: break infinite loop in DELEG8 test Tigran Mkrtchyan
@ 2025-04-15 14:10 ` Jeff Layton
2025-04-15 14:49 ` Mkrtchyan, Tigran
0 siblings, 1 reply; 3+ messages in thread
From: Jeff Layton @ 2025-04-15 14:10 UTC (permalink / raw)
To: Tigran Mkrtchyan, calum.mackay; +Cc: linux-nfs
On Tue, 2025-04-15 at 13:48 +0200, Tigran Mkrtchyan wrote:
> The test assumes that the server can return either OK or DELAY,
> however, the 'break' condition checks only for OK.
>
> Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
> ---
> nfs4.1/server41tests/st_delegation.py | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/nfs4.1/server41tests/st_delegation.py b/nfs4.1/server41tests/st_delegation.py
> index ea4c073..60b0de6 100644
> --- a/nfs4.1/server41tests/st_delegation.py
> +++ b/nfs4.1/server41tests/st_delegation.py
> @@ -181,8 +181,8 @@ def testDelegRevocation(t, env):
> owner, how, claim)
> while 1:
> res = sess2.compound(env.home + [open_op])
> - if res.status == NFS4_OK:
> - break;
> + if res.status == NFS4_OK or res.status == NFS4ERR_DELAY:
> + break
> check(res, [NFS4_OK, NFS4ERR_DELAY])
> # just to keep sess1 renewed. This is a bit fragile, as we
> # depend on the above compound waiting no longer than the
Don't you want to loop on NFS4ERR_DELAY?
It looks like this is supposed to loop (with no DELEGRETURN) until the
open returns NFS4_OK. Presumably at that point the delegation will be
revoked and you'll get the expected errors.
--
Jeff Layton <jlayton@kernel.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] deleg: break infinite loop in DELEG8 test
2025-04-15 14:10 ` Jeff Layton
@ 2025-04-15 14:49 ` Mkrtchyan, Tigran
0 siblings, 0 replies; 3+ messages in thread
From: Mkrtchyan, Tigran @ 2025-04-15 14:49 UTC (permalink / raw)
To: Jeff Layton; +Cc: Calum Mackay, linux-nfs
[-- Attachment #1: Type: text/plain, Size: 2400 bytes --]
In general, I want, but it's already happens on handling compound call:
```
for item in range(max_retries):
res = self.c.compound([seq_op] + ops, **kwargs)
res = self.update_seq_state(res, slot)
if res.status != NFS4ERR_DELAY or not handle_state_errors:
break
if res.resarray[0].sr_status != NFS4ERR_DELAY:
# As per errata ID 2006 for RFC 5661 section 15.1.1.3
# don't update the slot and sequence ID if the sequence
# operation itself receives NFS4ERR_DELAY
slot, seq_op = self._prepare_compound(saved_kwargs)
time.sleep(delay_time)
```
Tigran.
----- Original Message -----
> From: "Jeff Layton" <jlayton@kernel.org>
> To: "Tigran Mkrtchyan" <tigran.mkrtchyan@desy.de>, "Calum Mackay" <calum.mackay@oracle.com>
> Cc: "linux-nfs" <linux-nfs@vger.kernel.org>
> Sent: Tuesday, 15 April, 2025 16:10:11
> Subject: Re: [PATCH] deleg: break infinite loop in DELEG8 test
> On Tue, 2025-04-15 at 13:48 +0200, Tigran Mkrtchyan wrote:
>> The test assumes that the server can return either OK or DELAY,
>> however, the 'break' condition checks only for OK.
>>
>> Signed-off-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
>> ---
>> nfs4.1/server41tests/st_delegation.py | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/nfs4.1/server41tests/st_delegation.py
>> b/nfs4.1/server41tests/st_delegation.py
>> index ea4c073..60b0de6 100644
>> --- a/nfs4.1/server41tests/st_delegation.py
>> +++ b/nfs4.1/server41tests/st_delegation.py
>> @@ -181,8 +181,8 @@ def testDelegRevocation(t, env):
>> owner, how, claim)
>> while 1:
>> res = sess2.compound(env.home + [open_op])
>> - if res.status == NFS4_OK:
>> - break;
>> + if res.status == NFS4_OK or res.status == NFS4ERR_DELAY:
>> + break
>> check(res, [NFS4_OK, NFS4ERR_DELAY])
>> # just to keep sess1 renewed. This is a bit fragile, as we
>> # depend on the above compound waiting no longer than the
>
> Don't you want to loop on NFS4ERR_DELAY?
>
> It looks like this is supposed to loop (with no DELEGRETURN) until the
> open returns NFS4_OK. Presumably at that point the delegation will be
> revoked and you'll get the expected errors.
> --
> Jeff Layton <jlayton@kernel.org>
[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 2826 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-15 14:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-04-15 11:48 [PATCH] deleg: break infinite loop in DELEG8 test Tigran Mkrtchyan
2025-04-15 14:10 ` Jeff Layton
2025-04-15 14:49 ` Mkrtchyan, Tigran
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox