]> Git Repo - J-linux.git/commitdiff
selftests/sgx: Skip non X86_64 platform
authorZhao Mengmeng <[email protected]>
Wed, 6 Dec 2023 02:56:05 +0000 (21:56 -0500)
committerDave Hansen <[email protected]>
Fri, 8 Dec 2023 18:08:17 +0000 (10:08 -0800)
When building whole selftests on arm64, rsync gives an erorr about sgx:

rsync: [sender] link_stat "/root/linux-next/tools/testing/selftests/sgx/test_encl.elf" failed: No such file or directory (2)
rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1327) [sender=3.2.5]

The root casue is sgx only used on X86_64, and shall be skipped on other
platforms.

Fix this by moving TEST_CUSTOM_PROGS and TEST_FILES inside the if check,
then the build result will be "Skipping non-existent dir: sgx".

Fixes: 2adcba79e69d ("selftests/x86: Add a selftest for SGX")
Signed-off-by: Zhao Mengmeng <[email protected]>
Signed-off-by: Dave Hansen <[email protected]>
Reviewed-by: Jarkko Sakkinen <[email protected]>
Link: https://lore.kernel.org/all/20231206025605.3965302-1-zhaomzhao%40126.com
tools/testing/selftests/sgx/Makefile

index 8d2ba6adc92bd5f45f33f4c74ecdda00efbbf04a..867f88ce2570aef81e3283a9b6484460cfae9b68 100644 (file)
@@ -18,10 +18,10 @@ ENCL_CFLAGS += -Wall -Werror -static-pie -nostdlib -ffreestanding -fPIE \
               -fno-stack-protector -mrdrnd $(INCLUDES)
 ENCL_LDFLAGS := -Wl,-T,test_encl.lds,--build-id=none
 
+ifeq ($(CAN_BUILD_X86_64), 1)
 TEST_CUSTOM_PROGS := $(OUTPUT)/test_sgx
 TEST_FILES := $(OUTPUT)/test_encl.elf
 
-ifeq ($(CAN_BUILD_X86_64), 1)
 all: $(TEST_CUSTOM_PROGS) $(OUTPUT)/test_encl.elf
 endif
 
This page took 0.05329 seconds and 4 git commands to generate.