[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests/qtest/migration: Restore include for postcopy
From: |
Fabiano Rosas |
Subject: |
[PATCH] tests/qtest/migration: Restore include for postcopy |
Date: |
Tue, 17 Dec 2024 18:22:01 -0300 |
Commit 124a3c58b8 ("tests/qtest/migration: Move ufd_version_check to
utils") moved the ufd_version_check() function to another file but
failed to bring along the <sys/syscall> include, which is necessary to
pull in <asm/unistd.h> for __NR_userfaultd.
Restore the missing include.
While here, remove the ifdef __linux__ that's redundant and fix a
couple of typos.
Fixes: 124a3c58b8 ("tests/qtest/migration: Move ufd_version_check to utils")
Signed-off-by: Fabiano Rosas <farosas@suse.de>
---
tests/qtest/migration/migration-util.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/tests/qtest/migration/migration-util.c
b/tests/qtest/migration/migration-util.c
index 525bf1eed4..d18841e357 100644
--- a/tests/qtest/migration/migration-util.c
+++ b/tests/qtest/migration/migration-util.c
@@ -22,8 +22,12 @@
#include "migration/bootfile.h"
#include "migration/migration-util.h"
-/* for uffd_version_check() */
-#if defined(__linux__) && defined(__NR_userfaultfd) && defined(CONFIG_EVENTFD)
+#if defined(__linux__)
+#include <sys/syscall.h>
+#endif
+
+/* for ufd_version_check() */
+#if defined(__NR_userfaultfd) && defined(CONFIG_EVENTFD)
#include <sys/eventfd.h>
#include "qemu/userfaultfd.h"
#endif
@@ -297,7 +301,7 @@ bool probe_o_direct_support(const char *tmpfs)
}
#endif
-#if defined(__linux__) && defined(__NR_userfaultfd) && defined(CONFIG_EVENTFD)
+#if defined(__NR_userfaultfd) && defined(CONFIG_EVENTFD)
bool ufd_version_check(bool *uffd_feature_thread_id)
{
struct uffdio_api api_struct;
@@ -333,7 +337,7 @@ bool ufd_version_check(bool *uffd_feature_thread_id)
#else
bool ufd_version_check(bool *uffd_feature_thread_id)
{
- g_test_message("Skipping test: Userfault not available (builtdtime)");
+ g_test_message("Skipping test: Userfault not available (buildtime)");
return false;
}
#endif
--
2.35.3
- [PATCH] tests/qtest/migration: Restore include for postcopy,
Fabiano Rosas <=