diff options
| -rw-r--r-- | tools/testing/selftests/kvm/Makefile | 3 | ||||
| -rw-r--r-- | tools/testing/selftests/kvm/include/test_util.h | 2 | ||||
| -rw-r--r-- | tools/testing/selftests/kvm/lib/kvm_util.c | 1 |
3 files changed, 3 insertions, 3 deletions
diff --git a/tools/testing/selftests/kvm/Makefile b/tools/testing/selftests/kvm/Makefile index dd0e5163f01f..c367bd06a5b3 100644 --- a/tools/testing/selftests/kvm/Makefile +++ b/tools/testing/selftests/kvm/Makefile | |||
| @@ -17,7 +17,8 @@ LIBKVM += $(LIBKVM_$(UNAME_M)) | |||
| 17 | 17 | ||
| 18 | INSTALL_HDR_PATH = $(top_srcdir)/usr | 18 | INSTALL_HDR_PATH = $(top_srcdir)/usr |
| 19 | LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/ | 19 | LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/ |
| 20 | CFLAGS += -O2 -g -std=gnu99 -I$(LINUX_HDR_PATH) -Iinclude -I$(<D) -I.. | 20 | LINUX_TOOL_INCLUDE = $(top_srcdir)tools/include |
| 21 | CFLAGS += -O2 -g -std=gnu99 -I$(LINUX_TOOL_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude -I$(<D) -I.. | ||
| 21 | 22 | ||
| 22 | # After inclusion, $(OUTPUT) is defined and | 23 | # After inclusion, $(OUTPUT) is defined and |
| 23 | # $(TEST_GEN_PROGS) starts with $(OUTPUT)/ | 24 | # $(TEST_GEN_PROGS) starts with $(OUTPUT)/ |
diff --git a/tools/testing/selftests/kvm/include/test_util.h b/tools/testing/selftests/kvm/include/test_util.h index ac53730b30aa..73c3933436ec 100644 --- a/tools/testing/selftests/kvm/include/test_util.h +++ b/tools/testing/selftests/kvm/include/test_util.h | |||
| @@ -28,8 +28,6 @@ int test_seq_read(const char *path, char **bufp, size_t *sizep); | |||
| 28 | void test_assert(bool exp, const char *exp_str, | 28 | void test_assert(bool exp, const char *exp_str, |
| 29 | const char *file, unsigned int line, const char *fmt, ...); | 29 | const char *file, unsigned int line, const char *fmt, ...); |
| 30 | 30 | ||
| 31 | #define ARRAY_SIZE(array) (sizeof(array) / sizeof((array)[0])) | ||
| 32 | |||
| 33 | #define TEST_ASSERT(e, fmt, ...) \ | 31 | #define TEST_ASSERT(e, fmt, ...) \ |
| 34 | test_assert((e), #e, __FILE__, __LINE__, fmt, ##__VA_ARGS__) | 32 | test_assert((e), #e, __FILE__, __LINE__, fmt, ##__VA_ARGS__) |
| 35 | 33 | ||
diff --git a/tools/testing/selftests/kvm/lib/kvm_util.c b/tools/testing/selftests/kvm/lib/kvm_util.c index 97d344303c92..fa61afffcc8d 100644 --- a/tools/testing/selftests/kvm/lib/kvm_util.c +++ b/tools/testing/selftests/kvm/lib/kvm_util.c | |||
| @@ -14,6 +14,7 @@ | |||
| 14 | #include <sys/mman.h> | 14 | #include <sys/mman.h> |
| 15 | #include <sys/types.h> | 15 | #include <sys/types.h> |
| 16 | #include <sys/stat.h> | 16 | #include <sys/stat.h> |
| 17 | #include <linux/kernel.h> | ||
| 17 | 18 | ||
| 18 | #define KVM_DEV_PATH "/dev/kvm" | 19 | #define KVM_DEV_PATH "/dev/kvm" |
| 19 | 20 | ||
