linux/tools/testing/selftests/kvm
Peter Xu 8ffdaf9155 KVM: selftests: Fix build for evmcs.h
I got this error when building kvm selftests:

/usr/bin/ld: /home/xz/git/linux/tools/testing/selftests/kvm/libkvm.a(vmx.o):/home/xz/git/linux/tools/testing/selftests/kvm/include/evmcs.h:222: multiple definition of `current_evmcs'; /tmp/cco1G48P.o:/home/xz/git/linux/tools/testing/selftests/kvm/include/evmcs.h:222: first defined here
/usr/bin/ld: /home/xz/git/linux/tools/testing/selftests/kvm/libkvm.a(vmx.o):/home/xz/git/linux/tools/testing/selftests/kvm/include/evmcs.h:223: multiple definition of `current_vp_assist'; /tmp/cco1G48P.o:/home/xz/git/linux/tools/testing/selftests/kvm/include/evmcs.h:223: first defined here

I think it's because evmcs.h is included both in a test file and a lib file so
the structs have multiple declarations when linking.  After all it's not a good
habit to declare structs in the header files.

Cc: Vitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: Peter Xu <peterx@redhat.com>
Message-Id: <20200504220607.99627-1-peterx@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2020-05-06 06:51:36 -04:00
..
include KVM: selftests: Fix build for evmcs.h 2020-05-06 06:51:36 -04:00
lib KVM: selftests: Fix build for evmcs.h 2020-05-06 06:51:36 -04:00
s390x selftests: KVM: s390: check for registers to NOT change on reset 2020-03-16 17:59:09 +01:00
x86_64 KVM: selftests: enlightened VMPTRLD with an incorrect GPA 2020-03-16 18:19:32 +01:00
.gitignore SPDX patches for 5.7-rc1. 2020-04-03 13:12:26 -07:00
clear_dirty_log_test.c kvm: selftests: Support dirty log initial-all-set test 2020-03-16 17:57:41 +01:00
config selftests: kvm: Adding config fragments 2019-08-09 16:52:38 +02:00
demand_paging_test.c KVM: selftests: Rework timespec functions and usage 2020-03-18 14:08:56 +01:00
dirty_log_test.c selftests: kvm: Uses TEST_FAIL in tests/utilities 2020-03-16 17:59:11 +01:00
kvm_create_max_vcpus.c KVM: selftests: Convert some printf's to pr_info's 2020-03-16 17:57:07 +01:00
Makefile KVM: selftests: Introduce steal-time test 2020-03-16 17:59:07 +01:00
steal_time.c KVM: selftests: Rework timespec functions and usage 2020-03-18 14:08:56 +01:00