Skip to contentSkip to conversation

getrusage04 issues on virtualized env

LTP Anton Smorodskyi 2 participants 2 messages Sep 29, 2021 – Oct 13, 2021

lore
Share & tools
lore
#0 lore raw

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 ?

Signature · 12 lines
Anton Smorodskyi <[email protected]>
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
#1 lore raw

Hi!

Quoted 22 lines

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:
Quoted 5 lines

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:

testcases/kernel/syscalls/getrusage/getrusage04.c +1 -1
index 06b576d79..318fa7ffc 100644
@@ -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?

Signature · 5 lines
Cyril Hrubis
[email protected]

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