I got the following error message when I ran
make kselftest summary=1 TARGETS=kvm
rseq_test.c: In function ‘main’: rseq_test.c:230:33: warning: implicit declaration of function ‘gettid’; did you mean ‘getgid’? [-Wimplicit-function-declaration] (void *)(unsigned long)gettid()); ^~~~~~ getgid /tmp/ccNexT4G.o: In function `main': linux_mainline/tools/testing/selftests/kvm/rseq_test.c:230: undefined reference to `gettid' collect2: error: ld returned 1 exit status ../lib.mk:136: recipe for target 'linux_mainline/tools/testing/selftests/kvm/rseq_test' failed
As per suggestion
I renamed gettid to getgid
after rerunning the kselftest command
the following selftests messages were returned
not ok 7 selftests: kvm: hyperv_clock # exit=254 not ok 11 selftests: kvm: kvm_clock_test # exit=254 not ok 51 selftests: kvm: access_tracking_perf_test # exit=254 not ok 53 selftests: kvm: dirty_log_test # exit=254 not ok 58 selftests: kvm: max_guest_memory_test # TIMEOUT 120 seconds not ok 60 selftests: kvm: memslot_perf_test # exit=142
Signed-off-by: Akhil Raj lf32.dev@gmail.com --- tools/testing/selftests/kvm/rseq_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/kvm/rseq_test.c b/tools/testing/selftests/kvm/rseq_test.c index fac248a43666..aa83a0537f0c 100644 --- a/tools/testing/selftests/kvm/rseq_test.c +++ b/tools/testing/selftests/kvm/rseq_test.c @@ -227,7 +227,7 @@ int main(int argc, char *argv[]) ucall_init(vm, NULL);
pthread_create(&migration_thread, NULL, migration_worker, - (void *)(unsigned long)gettid()); + (void *)(unsigned long)getgid());
for (i = 0; !done; i++) { vcpu_run(vcpu);