tests: Fix migration-test build failure for sparc
PATCH 1/1 tests: Fix migration-test build failure for sparc
Even if <linux/kvm.h> seems to exist for all archs on linux, however including it with __linux__ defined seems to be not working yet as it'll try to include asm/kvm.h and that can be missing for archs that do not support kvm.
To fix this (instead of any attempt to fix linux headers..), we can mark the header to be x86_64 only, because it's so far only service for adding the kvm dirty ring test.
No need to have "Fixes" as the issue is just introduced very recently.
--- tests/qtest/migration-test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
tests/qtest/migration-test.c +3 -2
@@ -27,7 +27,8 @@#include "migration-helpers.h" #include "tests/migration/migration-test.h" -#if defined(__linux__) +/* For dirty ring test; so far only x86_64 is supported */ +#if defined(__linux__) && defined(HOST_X86_64 )#include "linux/kvm.h" #endif
@@ -1395,7 +1396,7 @@ static void test_multifd_tcp_cancel(void)static bool kvm_dirty_ring_supported (void ) { -#if defined(__linux__) +#if defined(__linux__) && defined(HOST_X86_64 )int ret, kvm_fd =open ("/dev/kvm" ,O_RDONLY );if (kvm_fd <0 ) {
Signature · 1 line
2.31.1
Quoted 1 line · Peter Xu
No need to have "Fixes" as the issue is just introduced very recently.
And.. This is only true if this patch can be merged in 6.1...
I should have added "for 6.1" in the subject but I forgot. Sorry.
Signature · 1 line
Peter Xu
Quoted 9 lines · Peter Xu
Even if <
linux/kvm.h> seems to exist for all archs on linux, however including it with__linux__defined seems to be not working yet as it'll try to includeasm/kvm.hand that can be missing for archs that do not support kvm.To fix this (instead of any attempt to fix linux headers..), we can mark the header to be
x86_64only, because it's so far only service for adding the kvm dirty ring test.No need to have "Fixes" as the issue is just introduced very recently.
What an odd thing to say. How do I know that without the link?
Anyway,
r~
Quoted 31 lines
Reported-by Richard Henderson <[email protected]>Signed-off-by Peter Xu <[email protected]>--- tests/qtest/migration-test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)tests/qtest/migration-test.c +3
-2@@ -27,7 +27,8 @@#include "migration-helpers.h" #include "tests/migration/migration-test.h" -#if defined(__linux__) +/* For dirty ring test; so far only x86_64 is supported */ +#if defined(__linux__) && defined(HOST_X86_64 )#include "linux/kvm.h" #endif @@ -1395,7 +1396,7 @@ static void test_multifd_tcp_cancel(void)static bool kvm_dirty_ring_supported (void ) { -#if defined(__linux__) +#if defined(__linux__) && defined(HOST_X86_64 )int ret, kvm_fd =open ("/dev/kvm" ,O_RDONLY );if (kvm_fd <0 ) {
Quoted 9 lines · Peter Xu
Even if <
linux/kvm.h> seems to exist for all archs on linux, however including it with__linux__defined seems to be not working yet as it'll try to includeasm/kvm.hand that can be missing for archs that do not support kvm.To fix this (instead of any attempt to fix linux headers..), we can mark the header to be
x86_64only, because it's so far only service for adding the kvm dirty ring test.No need to have "Fixes" as the issue is just introduced very recently.
Personally I find it very useful to navigate in gitk without having to use git-blame.
Quoted 31 lines
Reported-by Richard Henderson <[email protected]>Signed-off-by Peter Xu <[email protected]>--- tests/qtest/migration-test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)tests/qtest/migration-test.c +3
-2@@ -27,7 +27,8 @@#include "migration-helpers.h" #include "tests/migration/migration-test.h" -#if defined(__linux__) +/* For dirty ring test; so far only x86_64 is supported */ +#if defined(__linux__) && defined(HOST_X86_64 )#include "linux/kvm.h" #endif @@ -1395,7 +1396,7 @@ static void test_multifd_tcp_cancel(void)static bool kvm_dirty_ring_supported (void ) { -#if defined(__linux__) +#if defined(__linux__) && defined(HOST_X86_64 )int ret, kvm_fd =open ("/dev/kvm" ,O_RDONLY );if (kvm_fd <0 ) {
Quoted 5 lines · Philippe Mathieu-Daudé
Quoted 4 lines · Peter Xu
Even if <
linux/kvm.h> seems to exist for all archs on linux, however including it with__linux__defined seems to be not working yet as it'll try to includeasm/kvm.hand that can be missing for archs that do not support kvm.
Quoted 8 lines
Quoted 5 lines
To fix this (instead of any attempt to fix linux headers..), we can mark the header to be
x86_64only, because it's so far only service for adding the kvm dirty ring test.No need to have "Fixes" as the issue is just introduced very recently.
Personally I find it very useful to navigate in gitk without having to use git-blame.
Makes sense.
Quoted 3 lines
Fixes 1f546b709d6 ("tests: migration-test: Add dirty ring test")Reviewed-by Philippe Mathieu-Daudé <[email protected]>
Thanks all!
Signature · 1 line
Peter Xu
Quoted 32 lines · Peter Xu
Even if <
linux/kvm.h> seems to exist for all archs on linux, however including it with__linux__defined seems to be not working yet as it'll try to includeasm/kvm.hand that can be missing for archs that do not support kvm.To fix this (instead of any attempt to fix linux headers..), we can mark the header to be
x86_64only, because it's so far only service for adding the kvm dirty ring test.No need to have "Fixes" as the issue is just introduced very recently.
Reported-by Richard Henderson <[email protected]>Signed-off-by Peter Xu <[email protected]>--- tests/qtest/migration-test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)tests/qtest/migration-test.c +2
-1@@ -27,7 +27,8 @@#include "migration-helpers.h" #include "tests/migration/migration-test.h" -#if defined(__linux__) +/* For dirty ring test; so far only x86_64 is supported */ +#if defined(__linux__) && defined(HOST_X86_64 )#include "linux/kvm.h" #endif
tests/qtest/migration-test.c static void test_multifd_tcp_cancel(void) · line 1402
Quoted 8 lines
tests/qtest/migration-test.c +1
-1@@ -1395,7 +1396,7 @@ static void test_multifd_tcp_cancel(void)static bool kvm_dirty_ring_supported (void ) { -#if defined(__linux__) +#if defined(__linux__) && defined(HOST_X86_64 )int ret, kvm_fd =open ("/dev/kvm" ,O_RDONLY );if (kvm_fd <0 ) {
Juan, Dave, if you don't mind I can take this through my testing branch - I'm planning to send a pull request today anyway.
Thomas
Quoted 40 lines · * Thomas Huth ([email protected]) wrote:
Quoted 29 lines · Peter Xu
Even if <
linux/kvm.h> seems to exist for all archs on linux, however including it with__linux__defined seems to be not working yet as it'll try to includeasm/kvm.hand that can be missing for archs that do not support kvm.To fix this (instead of any attempt to fix linux headers..), we can mark the header to be
x86_64only, because it's so far only service for adding the kvm dirty ring test.No need to have "Fixes" as the issue is just introduced very recently.
Reported-by Richard Henderson <[email protected]>Signed-off-by Peter Xu <[email protected]>--- tests/qtest/migration-test.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)tests/qtest/migration-test.c +2
-1@@ -27,7 +27,8 @@#include "migration-helpers.h" #include "tests/migration/migration-test.h" -#if defined(__linux__) +/* For dirty ring test; so far only x86_64 is supported */ +#if defined(__linux__) && defined(HOST_X86_64 )#include "linux/kvm.h" #endif tests/qtest/migration-test.c static void test_multifd_tcp_cancel(void) · line 1401
Quoted 7 lines
tests/qtest/migration-test.c +1
-1@@ -1395,7 +1396,7 @@ static void test_multifd_tcp_cancel(void)static bool kvm_dirty_ring_supported (void ) { -#if defined(__linux__) +#if defined(__linux__) && defined(HOST_X86_64 )int ret, kvm_fd =open ("/dev/kvm" ,O_RDONLY );if (kvm_fd <0 ) {Acked-by Thomas Huth <[email protected]>
Quoted 2 lines
Juan, Dave, if you don't mind I can take this through my testing branch - I'm planning to send a pull request today anyway.
Please do; thanks!
Dave
Quoted 2 lines
Thomas
Signature · 1 line
Dr. David Alan Gilbert / [email protected] / Manchester, UK