1
0
Fork 0
alistair23-linux/tools/testing/selftests
Dan Carpenter be7fcf1d17 KVM: selftests: Fix a condition in test_hv_cpuid()
The code is trying to check that all the padding is zeroed out and it
does this:

    entry->padding[0] == entry->padding[1] == entry->padding[2] == 0

Assume everything is zeroed correctly, then the first comparison is
true, the next comparison is false and false is equal to zero so the
overall condition is true.  This bug doesn't affect run time very
badly, but the code should instead just check that all three paddings
are zero individually.

Also the error message was copy and pasted from an earlier error and it
wasn't correct.

Fixes: 7edcb73433 ("KVM: selftests: Add hyperv_cpuid test")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2019-05-24 21:27:04 +02:00
..
android selftests: Fix test errors related to lib.mk khdr target 2018-12-17 09:17:55 -07:00
bpf selftests: bpf: Add files generated after build to .gitignore 2019-05-13 01:16:37 +02:00
breakpoints selftests: Add test plan API to kselftest.h and adjust callers 2019-04-25 13:15:46 -06:00
capabilities selftests: Add test plan API to kselftest.h and adjust callers 2019-04-25 13:15:46 -06:00
cgroup Merge branch 'for-5.2' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup 2019-05-09 13:52:12 -07:00
cpu-hotplug selftests: cpu-hotplug: fix case where CPUs offline > CPUs present 2019-01-25 14:57:45 -07:00
cpufreq
drivers linux-kselftest-5.2-rc1-2 2019-05-16 18:57:58 -07:00
efivarfs selftests/efivarfs: clean up test files from test_create*() 2019-04-19 17:17:19 -06:00
exec exec selftests: test ->recursion_depth 2019-05-14 19:52:50 -07:00
filesystems selftests: add binderfs selftests 2019-01-30 15:19:56 +01:00
firmware selftests: firmware: fix verify_reqs() return value 2019-02-08 13:00:43 +01:00
ftrace selftests/ftrace: Add tracing/error_log testcase 2019-04-08 09:22:50 -04:00
futex selftests: Add test plan API to kselftest.h and adjust callers 2019-04-25 13:15:46 -06:00
gpio selftest/gpio: Remove duplicate header 2019-04-08 16:18:21 -06:00
ia64
intel_pstate selftests: intel_pstate: notification about privilege required to run intel_pstate testing script 2018-05-30 21:31:31 -06:00
ipc selftests/ipc: Fix msgque compiler warnings 2019-04-19 17:18:00 -06:00
ir media updates for v5.1-rc1 2019-03-09 14:45:54 -08:00
kcmp
kexec selftests/kexec: update get_secureboot_mode 2019-04-17 15:32:44 -06:00
kmod selftests: kmod: return Kselftest Skip code for skipped tests 2018-05-30 15:21:53 -06:00
kselftest selftests: Remove KSFT_TAP_LEVEL 2019-04-25 13:15:26 -06:00
kvm KVM: selftests: Fix a condition in test_hv_cpuid() 2019-05-24 21:27:04 +02:00
lib lib: Add test module for strscpy_pad 2019-04-08 16:44:21 -06:00
livepatch selftests/livepatch: Add functions.sh to TEST_PROGS_EXTENDED 2019-04-15 10:43:21 +02:00
locking selftests: locking: return Kselftest Skip code for skipped tests 2018-05-30 15:29:06 -06:00
media_tests media: selftests: media_dev_allocator api test 2019-04-22 11:23:14 -04:00
membarrier selftests: Add test plan API to kselftest.h and adjust callers 2019-04-25 13:15:46 -06:00
memfd selftests/memfd: add tests for F_SEAL_FUTURE_WRITE seal 2019-03-05 21:07:19 -08:00
memory-hotplug selftests: memory-hotplug: add required configs 2018-09-05 10:58:31 -06:00
mount selftests: mount: remove no longer needed config option 2018-08-09 11:26:07 -06:00
mqueue selftests: mqueue: return Kselftest Skip code for skipped tests 2018-05-30 15:29:06 -06:00
net selftests: Add loopback test 2019-05-05 21:56:57 -07:00
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-04-25 23:52:29 -04:00
networking/timestamping Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-02-15 12:38:38 -08:00
nsfs
ntb
pidfd selftests: pidfd: Create .gitignore to include pidfd_test 2019-05-14 17:36:49 -06:00
powerpc selftests/powerpc: Add a signal fuzzer selftest 2019-05-03 02:55:02 +10:00
prctl
proc proc: fixup proc-pid-vm test 2019-04-19 09:46:04 -07:00
pstore selftests: pstore: return Kselftest Skip code for skipped tests 2018-06-18 09:11:09 -06:00
ptp
ptrace
rcutorture for-5.2/block-20190507 2019-05-07 18:14:36 -07:00
rseq linux-kselftest-5.2-rc1-2 2019-05-16 18:57:58 -07:00
rtc selftests: rtc: rtctest: add alarm test on minute boundary 2019-01-14 18:49:14 -07:00
safesetid LSM: SafeSetID: add selftest 2019-02-12 10:58:51 -08:00
seccomp linux-kselftest-5.2-rc1 2019-05-06 20:29:45 -07:00
sigaltstack selftests: Add test plan API to kselftest.h and adjust callers 2019-04-25 13:15:46 -06:00
size
sparc64 selftests: sparc64: Add missing SPDX License Identifiers 2018-06-18 09:29:20 -06:00
splice
static_keys selftests: static_keys: return Kselftest Skip code for skipped tests 2018-06-18 09:11:09 -06:00
sync selftests: Add test plan API to kselftest.h and adjust callers 2019-04-25 13:15:46 -06:00
sysctl tools/testing/selftests/sysctl/sysctl.sh: add proc_do_large_bitmap() test case 2019-05-14 19:52:51 -07:00
tc-testing net: sched: flower: use correct ht function to prevent duplicates 2019-04-11 11:33:06 -07:00
timers selftest/timers: Remove duplicate header 2019-04-08 16:18:21 -06:00
tmpfs tmpfs: test link accounting with O_TMPFILE 2019-03-05 21:07:20 -08:00
tpm2 selftests/tpm2: Open tpm dev in unbuffered mode 2019-04-08 15:58:55 -07:00
uevent
user selftests: user: return Kselftest Skip code for skipped tests 2018-06-18 09:11:09 -06:00
vDSO selftests: vDSO - fix to return KSFT_SKIP when test couldn't be run 2018-07-11 10:14:26 -06:00
vm tools: mark 'test_vmalloc.sh' executable 2019-03-11 10:10:29 -07:00
watchdog selftests: watchdog: fix spelling mistake "experies" -> "expires" 2018-12-13 13:03:19 -07:00
x86 selftest/x86/mpx-dig.c: Remove duplicate header 2019-04-08 16:18:21 -06:00
zram selftests: zram: return Kselftest Skip code for skipped tests 2018-06-18 09:11:09 -06:00
.gitignore selftests: Extract single-test shell logic from lib.mk 2019-04-25 13:14:13 -06:00
Makefile selftests: avoid KBUILD_OUTPUT dir cluttering with selftest objects 2019-05-14 17:37:41 -06:00
gen_kselftest_tar.sh
kselftest.h selftests: Add test plan API to kselftest.h and adjust callers 2019-04-25 13:15:46 -06:00
kselftest_harness.h selftests/harness: Add 30 second timeout per test 2019-04-16 17:04:34 -06:00
kselftest_install.sh
kselftest_module.h kselftest: Add test module framework header 2019-04-08 16:44:20 -06:00
kselftest_module.sh kselftest: Add test runner creation script 2019-04-08 16:44:11 -06:00
lib.mk selftests: fix bpf build/test workflow regression when KBUILD_OUTPUT is set 2019-05-13 10:19:43 -06:00