public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP] getrusage04 issues on virtualized env
@ 2021-09-28 15:56 Anton Smorodskyi
  2021-10-13 10:21 ` Cyril Hrubis
  0 siblings, 1 reply; 2+ messages in thread
From: Anton Smorodskyi @ 2021-09-28 15:56 UTC (permalink / raw)
  To: ltp

Hi all,

I am running LTP tests in different public cloud providers ( Azure , GCE
, Amazon ). Currently have issues with getrusage04 test on Azure . Looks
like
https://github.com/linux-test-project/ltp/commit/3e0ba9aa6a7c933a74d6525ca69028992a3ba1ad
not behaves as expected ==> test is not actually skipped on Azure and
failing because of known instability of the tests in virtual environments :

sh-4.4# getrusage04; echo cmd-exit-774-$?
getrusage04    0  TINFO  :  Expected timers granularity is 4000 us
getrusage04    0  TINFO  :  Using 1 as multiply factor for max [us]time
increment (1000+4000us)!
getrusage04    0  TINFO  :  utime:        2538us; stime:           0us
getrusage04    0  TINFO  :  utime:        3813us; stime:        1906us
getrusage04    0  TINFO  :  utime:        6317us; stime:        6317us
getrusage04    0  TINFO  :  utime:        7407us; stime:        6317us
getrusage04    0  TINFO  :  utime:        8849us; stime:        8849us
getrusage04    0  TINFO  :  utime:        9587us; stime:       12783us
getrusage04    0  TINFO  :  utime:        9637us; stime:       16062us
getrusage04    0  TINFO  :  utime:       10709us; stime:       21418us
getrusage04    1  TFAIL  :  getrusage04.c:133: stime increased > 5000us:


I manually checked "systemd-detect-virt" execution on VM in azure and it
returns "microsoft" as expected. Digging into tst_is_virt source code
and around also haven't bring any ideas to me :(

Any hints how to follow up ?

-- 
Anton Smorodskyi <asmorodskyi@suse.com>
QA Engineer
SUSE Software Solutions Germany GmbH
Maxfeldstr. 5
90409 Nuremberg Germany
(HRB 36809, AG Nürnberg)
Managing Director: Felix Imendörffer



-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [LTP] getrusage04 issues on virtualized env
  2021-09-28 15:56 [LTP] getrusage04 issues on virtualized env Anton Smorodskyi
@ 2021-10-13 10:21 ` Cyril Hrubis
  0 siblings, 0 replies; 2+ messages in thread
From: Cyril Hrubis @ 2021-10-13 10:21 UTC (permalink / raw)
  To: Anton Smorodskyi; +Cc: ltp

Hi!
> I am running LTP tests in different public cloud providers ( Azure , GCE
> , Amazon ). Currently have issues with getrusage04 test on Azure . Looks
> like
> https://github.com/linux-test-project/ltp/commit/3e0ba9aa6a7c933a74d6525ca69028992a3ba1ad
> not behaves as expected ==> test is not actually skipped on Azure and
> failing because of known instability of the tests in virtual environments :
> 
> sh-4.4# getrusage04; echo cmd-exit-774-$?
> getrusage04    0  TINFO  :  Expected timers granularity is 4000 us
> getrusage04    0  TINFO  :  Using 1 as multiply factor for max [us]time
> increment (1000+4000us)!
> getrusage04    0  TINFO  :  utime:        2538us; stime:           0us
> getrusage04    0  TINFO  :  utime:        3813us; stime:        1906us
> getrusage04    0  TINFO  :  utime:        6317us; stime:        6317us
> getrusage04    0  TINFO  :  utime:        7407us; stime:        6317us
> getrusage04    0  TINFO  :  utime:        8849us; stime:        8849us
> getrusage04    0  TINFO  :  utime:        9587us; stime:       12783us
> getrusage04    0  TINFO  :  utime:        9637us; stime:       16062us
> getrusage04    0  TINFO  :  utime:       10709us; stime:       21418us
> getrusage04    1  TFAIL  :  getrusage04.c:133: stime increased > 5000us:
> 
> 
> I manually checked "systemd-detect-virt" execution on VM in azure and it
> returns "microsoft" as expected. Digging into tst_is_virt source code
> and around also haven't bring any ideas to me :(
> 
> Any hints how to follow up ?

I guess that we should skip the test if any virtualization is detected,
that should be done with:

diff --git a/testcases/kernel/syscalls/getrusage/getrusage04.c b/testcases/kernel/syscalls/getrusage/getrusage04.c
index 06b576d79..318fa7ffc 100644
--- a/testcases/kernel/syscalls/getrusage/getrusage04.c
+++ b/testcases/kernel/syscalls/getrusage/getrusage04.c
@@ -197,7 +197,7 @@ 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))
+       if (tst_is_virt(VIRT_ANY))
                tst_brkm(TCONF, NULL, "This testcase is not supported on this"
                        " virtual machine.");


Will you send a patch to ML or should I do so?

-- 
Cyril Hrubis
chrubis@suse.cz

-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-10-13 10:21 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-28 15:56 [LTP] getrusage04 issues on virtualized env Anton Smorodskyi
2021-10-13 10:21 ` Cyril Hrubis

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox