* [LTP] [PATCH] syscalls/getrusage04: Disable for VIRT_OTHER
@ 2025-02-24 16:26 Ricardo B. Marlière via ltp
2025-02-25 15:09 ` Martin Doucha
0 siblings, 1 reply; 4+ messages in thread
From: Ricardo B. Marlière via ltp @ 2025-02-24 16:26 UTC (permalink / raw)
To: Linux Test Project; +Cc: Ricardo B. Marlière
From: Ricardo B. Marlière <rbm@suse.com>
This test is known to be unstable under some environments such as in the
context of a cloud instance within AWS (and other providers as well), which
outputs "amazon" for `systemd-detect-virt` and therefore falls into the
VIRT_OTHER category.
Suggested-by: Martin Doucha <mdoucha@suse.cz>
Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
---
testcases/kernel/syscalls/getrusage/getrusage04.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/testcases/kernel/syscalls/getrusage/getrusage04.c b/testcases/kernel/syscalls/getrusage/getrusage04.c
index b03bc549bd835b33acaa02693706255e88cbe4f8..0e22e2ee9dadfb1c05df4425c65b04b2579e1649 100644
--- a/testcases/kernel/syscalls/getrusage/getrusage04.c
+++ b/testcases/kernel/syscalls/getrusage/getrusage04.c
@@ -198,9 +198,11 @@ static void setup(void)
{
tst_sig(NOFORK, DEF_HANDLER, cleanup);
- if (tst_is_virt(VIRT_XEN) || tst_is_virt(VIRT_KVM) || tst_is_virt(VIRT_HYPERV))
- tst_brkm(TCONF, NULL, "This testcase is not supported on this"
- " virtual machine.");
+ if (tst_is_virt(VIRT_XEN) || tst_is_virt(VIRT_KVM) ||
+ tst_is_virt(VIRT_HYPERV) || tst_is_virt(VIRT_OTHER))
+ tst_brkm(TCONF, NULL,
+ "This testcase is not supported on this"
+ " virtual machine.");
BIAS_MAX = guess_timer_resolution();
---
base-commit: a1aebfd4d99d5da12834dae5215815ff8d82995c
change-id: 20250224-disable_virt_other_getrusage04-c9db2aa9e69c
Best regards,
--
Ricardo B. Marlière <rbm@suse.com>
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [LTP] [PATCH] syscalls/getrusage04: Disable for VIRT_OTHER
2025-02-24 16:26 [LTP] [PATCH] syscalls/getrusage04: Disable for VIRT_OTHER Ricardo B. Marlière via ltp
@ 2025-02-25 15:09 ` Martin Doucha
2025-02-25 15:44 ` Ricardo B. Marlière via ltp
0 siblings, 1 reply; 4+ messages in thread
From: Martin Doucha @ 2025-02-25 15:09 UTC (permalink / raw)
To: Ricardo B. Marlière, Linux Test Project
Hi,
I think it'd be better to change the condition to this:
if (tst_is_virt(VIRT_ANY))
tst_brkm(TCONF, ...);
Otherwise we'll play endless whack-a-mole with future virt environments.
On 24. 02. 25 17:26, Ricardo B. Marlière wrote:
> From: Ricardo B. Marlière <rbm@suse.com>
>
> This test is known to be unstable under some environments such as in the
> context of a cloud instance within AWS (and other providers as well), which
> outputs "amazon" for `systemd-detect-virt` and therefore falls into the
> VIRT_OTHER category.
>
> Suggested-by: Martin Doucha <mdoucha@suse.cz>
> Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
> ---
> testcases/kernel/syscalls/getrusage/getrusage04.c | 8 +++++---
> 1 file changed, 5 insertions(+), 3 deletions(-)
>
> diff --git a/testcases/kernel/syscalls/getrusage/getrusage04.c b/testcases/kernel/syscalls/getrusage/getrusage04.c
> index b03bc549bd835b33acaa02693706255e88cbe4f8..0e22e2ee9dadfb1c05df4425c65b04b2579e1649 100644
> --- a/testcases/kernel/syscalls/getrusage/getrusage04.c
> +++ b/testcases/kernel/syscalls/getrusage/getrusage04.c
> @@ -198,9 +198,11 @@ static void setup(void)
> {
> tst_sig(NOFORK, DEF_HANDLER, cleanup);
>
> - if (tst_is_virt(VIRT_XEN) || tst_is_virt(VIRT_KVM) || tst_is_virt(VIRT_HYPERV))
> - tst_brkm(TCONF, NULL, "This testcase is not supported on this"
> - " virtual machine.");
> + if (tst_is_virt(VIRT_XEN) || tst_is_virt(VIRT_KVM) ||
> + tst_is_virt(VIRT_HYPERV) || tst_is_virt(VIRT_OTHER))
> + tst_brkm(TCONF, NULL,
> + "This testcase is not supported on this"
> + " virtual machine.");
>
> BIAS_MAX = guess_timer_resolution();
>
>
> ---
> base-commit: a1aebfd4d99d5da12834dae5215815ff8d82995c
> change-id: 20250224-disable_virt_other_getrusage04-c9db2aa9e69c
>
> Best regards,
--
Martin Doucha mdoucha@suse.cz
SW Quality Engineer
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [LTP] [PATCH] syscalls/getrusage04: Disable for VIRT_OTHER
2025-02-25 15:09 ` Martin Doucha
@ 2025-02-25 15:44 ` Ricardo B. Marlière via ltp
2025-02-25 15:49 ` Martin Doucha
0 siblings, 1 reply; 4+ messages in thread
From: Ricardo B. Marlière via ltp @ 2025-02-25 15:44 UTC (permalink / raw)
To: Martin Doucha, Linux Test Project
On Tue Feb 25, 2025 at 12:09 PM -03, Martin Doucha wrote:
> Hi,
> I think it'd be better to change the condition to this:
>
> if (tst_is_virt(VIRT_ANY))
> tst_brkm(TCONF, ...);
>
> Otherwise we'll play endless whack-a-mole with future virt environments.
But if `systemd-detect-virt` outputs "amazon", wouldn't that translate
to VIRT_OTHER [1]? i.e. The goal is to also skip on VIRT_OTHER, unless
we invert the logic.
[1]: https://github.com/linux-test-project/ltp/blob/a1aebfd4d99d5da12834dae5215815ff8d82995c/lib/tst_virt.c#L100
>
> On 24. 02. 25 17:26, Ricardo B. Marlière wrote:
>> From: Ricardo B. Marlière <rbm@suse.com>
>>
>> This test is known to be unstable under some environments such as in the
>> context of a cloud instance within AWS (and other providers as well), which
>> outputs "amazon" for `systemd-detect-virt` and therefore falls into the
>> VIRT_OTHER category.
>>
>> Suggested-by: Martin Doucha <mdoucha@suse.cz>
>> Signed-off-by: Ricardo B. Marlière <rbm@suse.com>
>> ---
>> testcases/kernel/syscalls/getrusage/getrusage04.c | 8 +++++---
>> 1 file changed, 5 insertions(+), 3 deletions(-)
>>
>> diff --git a/testcases/kernel/syscalls/getrusage/getrusage04.c b/testcases/kernel/syscalls/getrusage/getrusage04.c
>> index b03bc549bd835b33acaa02693706255e88cbe4f8..0e22e2ee9dadfb1c05df4425c65b04b2579e1649 100644
>> --- a/testcases/kernel/syscalls/getrusage/getrusage04.c
>> +++ b/testcases/kernel/syscalls/getrusage/getrusage04.c
>> @@ -198,9 +198,11 @@ static void setup(void)
>> {
>> tst_sig(NOFORK, DEF_HANDLER, cleanup);
>>
>> - if (tst_is_virt(VIRT_XEN) || tst_is_virt(VIRT_KVM) || tst_is_virt(VIRT_HYPERV))
>> - tst_brkm(TCONF, NULL, "This testcase is not supported on this"
>> - " virtual machine.");
>> + if (tst_is_virt(VIRT_XEN) || tst_is_virt(VIRT_KVM) ||
>> + tst_is_virt(VIRT_HYPERV) || tst_is_virt(VIRT_OTHER))
>> + tst_brkm(TCONF, NULL,
>> + "This testcase is not supported on this"
>> + " virtual machine.");
>>
>> BIAS_MAX = guess_timer_resolution();
>>
>>
>> ---
>> base-commit: a1aebfd4d99d5da12834dae5215815ff8d82995c
>> change-id: 20250224-disable_virt_other_getrusage04-c9db2aa9e69c
>>
>> Best regards,
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread* Re: [LTP] [PATCH] syscalls/getrusage04: Disable for VIRT_OTHER
2025-02-25 15:44 ` Ricardo B. Marlière via ltp
@ 2025-02-25 15:49 ` Martin Doucha
0 siblings, 0 replies; 4+ messages in thread
From: Martin Doucha @ 2025-02-25 15:49 UTC (permalink / raw)
To: Ricardo B. Marlière, Linux Test Project
On 25. 02. 25 16:44, Ricardo B. Marlière wrote:
> On Tue Feb 25, 2025 at 12:09 PM -03, Martin Doucha wrote:
>> Hi,
>> I think it'd be better to change the condition to this:
>>
>> if (tst_is_virt(VIRT_ANY))
>> tst_brkm(TCONF, ...);
>>
>> Otherwise we'll play endless whack-a-mole with future virt environments.
>
> But if `systemd-detect-virt` outputs "amazon", wouldn't that translate
> to VIRT_OTHER [1]? i.e. The goal is to also skip on VIRT_OTHER, unless
> we invert the logic.
VIRT_ANY is a wildcard value that'll match any virtualized environment.
If somebody decides to define separate VIRT_AMAZON env type in the LTP
library in the future, getrusage04 would start to fail again if we only
add check for VIRT_OTHER. With VIRT_ANY, the new env type will stay covered.
--
Martin Doucha mdoucha@suse.cz
SW Quality Engineer
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
--
Mailing list info: https://lists.linux.it/listinfo/ltp
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-02-25 15:50 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-24 16:26 [LTP] [PATCH] syscalls/getrusage04: Disable for VIRT_OTHER Ricardo B. Marlière via ltp
2025-02-25 15:09 ` Martin Doucha
2025-02-25 15:44 ` Ricardo B. Marlière via ltp
2025-02-25 15:49 ` Martin Doucha
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.