FYI, we noticed the following commit (built with gcc-7):
commit: d5edb7f8e7ab9fd5fd54a77d957b1733f117a813 ("kvm: selftests: add vmx_tsc_adjust_test")
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git master
in testcase: kernel_selftests
with following parameters:
group: kselftests-01
test-description: The kernel contains a set of "self tests" under the tools/testing/selftests/ directory. These are intended to be small unit tests to exercise individual code paths in the kernel.
test-url: https://www.kernel.org/doc/Documentation/kselftest.txt
on test machine: qemu-system-x86_64 -enable-kvm -cpu host -smp 2 -m 4G
caused below changes (please refer to attached dmesg/kmsg for entire log/backtrace):
selftests: vmx_tsc_adjust_test
========================================
==== Test Assertion Failure ====
lib/kvm_util.c:422: kvm_fd >= 0
pid=9812 tid=9812
1 0x000000000040174a: kvm_get_supported_cpuid at kvm_util.c:421
2 0x0000000000401b5a: kvm_get_supported_cpuid at kvm_util.c:461
3 (inlined by) kvm_get_supported_cpuid_index at kvm_util.c:449
4 0x0000000000400e58: kvm_get_supported_cpuid_entry at kvm_util.h:125
5 (inlined by) main at vmx_tsc_adjust_test.c:189
6 0x00007f2ef6225a86: ?? ??:0
7 0x00000000004010a9: _start at ??:?
open /dev/kvm failed, rc: -1 errno: 2
not ok 1..3 selftests: vmx_tsc_adjust_test [FAIL]
make: Leaving directory '/usr/src/linux-selftests-x86_64-rhel-7.2-d5edb7f8e7ab9fd5fd54a77d957b1733f117a813/tools/testing/selftests/kvm'
To reproduce:
git clone https://github.com/intel/lkp-tests.git
cd lkp-tests
bin/lkp qemu -k <bzImage> job-script # job-script is attached in this email
Thanks,
Xiaolong