ksm02 ksm02_1 ksm03 ksm03_1 ksm04 ksm04_1 failed on KVM kernels

Bug #1886409 reported by Po-Hsu Lin
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubuntu-kernel-tests
Fix Released
Undecided
Po-Hsu Lin

Bug Description

Issue found on E-KVM 5.3.0-1025.27 - kvm

It will fail with:
 tag=ksm02 stime=1594129854 dur=5 exit=exited stat=34 core=no cu=0 cs=0
 startup='Tue Jul 7 13:50:54 2020'
 tst_sys_conf.c:58: INFO: Path not found: '/sys/kernel/mm/ksm/max_page_sharing'
 tst_test.c:1247: INFO: Timeout per run is 0h 05m 00s
 ksm02.c:96: CONF: KSM configuration is not enabled
 tst_device.c:418: INFO: No device is mounted at /tmp/cgroup_cst
 tst_test.c:1292: BROK: Test killed by SIGSEGV!

 Summary:
 passed 0
 failed 0
 skipped 1
 warnings 0

These tests will require CONFIG_KSM set to y, which we don't have in KVM kernels.

And these tests are smart enough to check for this config on the fly:
  if (access(PATH_KSM, F_OK) == -1)
    tst_brk(TCONF, "KSM configuration is not enabled");

Therefore we don't need to blacklist it in our test suite.

For example the ksm01 test will be skipped correctly:
startup='Fri Jul 3 16:11:37 2020'
tst_sys_conf.c:58: INFO: Path not found: '/sys/kernel/mm/ksm/max_page_sharing'
tst_test.c:1245: INFO: Timeout per run is 0h 05m 00s
ksm01.c:70: CONF: KSM configuration is not enabled

Summary:
passed 0
failed 0
skipped 1
warnings 0
tag=ksm01 stime=1593792697 dur=0 exit=exited stat=32 core=no cu=0 cs=0

After investigating the test code more carefully, it's failing because of the cleanup code, which tried to unmount a dir that's not mounted. And thus causing failures like:
 tst_device.c:418: INFO: No device is mounted at /tmp/cgroup_cst
 tst_test.c:1292: BROK: Test killed by SIGSEGV!

Making tests being marked as failed.

Po-Hsu Lin (cypressyew)
tags: added: 5.3 eoan sru ubuntu-ltp
tags: added: kqa-blocker sru-20200629
removed: sru
Po-Hsu Lin (cypressyew)
Changed in ubuntu-kernel-tests:
assignee: nobody → Po-Hsu Lin (cypressyew)
status: New → In Progress
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Inside the test code of ltp/testcases/kernel/mem/ksm/ksm02.c, it's failing in:
    tst_cgroup_umount(PATH_TMP_CG_CST);

Which is doing two things in ltp/lib/tst_cgroup.c:
    tst_cgroupN_umount(cgroup_dir, cgroup_new_dir);
    tst_cgroup_del_path(cgroup_dir);

The tst_cgroupN_umount() here will check if the mount point has been mounted or not:
    if (!tst_is_mounted(mnt_path))
        return;

Therefore you will see the following message printed:
 tst_device.c:418: INFO: No device is mounted at /tmp/cgroup_cst

So it's failing in tst_cgroup_del_path().

Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

It's because the tst_cgroup_paths in tst_cgroup_del_path() is NULL, it should be skipped in this case.

Po-Hsu Lin (cypressyew)
description: updated
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :
Changed in ubuntu-kernel-tests:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.