Commit cc68765d authored by Andrew Jones's avatar Andrew Jones Committed by Paolo Bonzini
Browse files

kvm: selftests: move arch-specific files to arch-specific locations

parent 14c47b75
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
cr4_cpuid_sync_test
platform_info_test
set_sregs_test
sync_regs_test
vmx_tsc_adjust_test
state_test
/x86_64/cr4_cpuid_sync_test
/x86_64/platform_info_test
/x86_64/set_sregs_test
/x86_64/sync_regs_test
/x86_64/vmx_tsc_adjust_test
/x86_64/state_test
/x86_64/dirty_log_test
+11 −11
Original line number Diff line number Diff line
all:

top_srcdir = ../../../../
top_srcdir = ../../../..
UNAME_M := $(shell uname -m)

LIBKVM = lib/assert.c lib/elf.c lib/io.c lib/kvm_util.c lib/ucall.c lib/sparsebit.c
LIBKVM_x86_64 = lib/x86.c lib/vmx.c
LIBKVM_x86_64 = lib/x86_64/processor.c lib/x86_64/vmx.c

TEST_GEN_PROGS_x86_64 = platform_info_test
TEST_GEN_PROGS_x86_64 += set_sregs_test
TEST_GEN_PROGS_x86_64 += sync_regs_test
TEST_GEN_PROGS_x86_64 += vmx_tsc_adjust_test
TEST_GEN_PROGS_x86_64 += cr4_cpuid_sync_test
TEST_GEN_PROGS_x86_64 += state_test
TEST_GEN_PROGS_x86_64 += dirty_log_test
TEST_GEN_PROGS_x86_64 = x86_64/platform_info_test
TEST_GEN_PROGS_x86_64 += x86_64/set_sregs_test
TEST_GEN_PROGS_x86_64 += x86_64/sync_regs_test
TEST_GEN_PROGS_x86_64 += x86_64/vmx_tsc_adjust_test
TEST_GEN_PROGS_x86_64 += x86_64/cr4_cpuid_sync_test
TEST_GEN_PROGS_x86_64 += x86_64/state_test
TEST_GEN_PROGS_x86_64 += x86_64/dirty_log_test

TEST_GEN_PROGS += $(TEST_GEN_PROGS_$(UNAME_M))
LIBKVM += $(LIBKVM_$(UNAME_M))

INSTALL_HDR_PATH = $(top_srcdir)/usr
LINUX_HDR_PATH = $(INSTALL_HDR_PATH)/include/
LINUX_TOOL_INCLUDE = $(top_srcdir)tools/include
CFLAGS += -O2 -g -std=gnu99 -I$(LINUX_TOOL_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude -I$(<D) -I..
LINUX_TOOL_INCLUDE = $(top_srcdir)/tools/include
CFLAGS += -O2 -g -std=gnu99 -I$(LINUX_TOOL_INCLUDE) -I$(LINUX_HDR_PATH) -Iinclude -I$(<D) -Iinclude/$(UNAME_M) -I..
LDFLAGS += -pthread

# After inclusion, $(OUTPUT) is defined and
+1 −1
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
 *
 */
#ifndef SELFTEST_KVM_UTIL_H
#define SELFTEST_KVM_UTIL_H 1
#define SELFTEST_KVM_UTIL_H

#include "test_util.h"

+3 −3
Original line number Diff line number Diff line
@@ -15,8 +15,8 @@
 * even in the case where most bits are set.
 */

#ifndef _TEST_SPARSEBIT_H_
#define _TEST_SPARSEBIT_H_
#ifndef SELFTEST_KVM_SPARSEBIT_H
#define SELFTEST_KVM_SPARSEBIT_H

#include <stdbool.h>
#include <stdint.h>
@@ -72,4 +72,4 @@ void sparsebit_validate_internal(struct sparsebit *sbit);
}
#endif

#endif /* _TEST_SPARSEBIT_H_ */
#endif /* SELFTEST_KVM_SPARSEBIT_H */
+3 −3
Original line number Diff line number Diff line
@@ -7,8 +7,8 @@
 *
 */

#ifndef TEST_UTIL_H
#define TEST_UTIL_H 1
#ifndef SELFTEST_KVM_TEST_UTIL_H
#define SELFTEST_KVM_TEST_UTIL_H

#include <stdlib.h>
#include <stdarg.h>
@@ -41,4 +41,4 @@ void test_assert(bool exp, const char *exp_str,
		    #a, #b, #a, (unsigned long) __a, #b, (unsigned long) __b); \
} while (0)

#endif /* TEST_UTIL_H */
#endif /* SELFTEST_KVM_TEST_UTIL_H */
Loading