Skip to content

Commit d7e34f7

Browse files
committed
selftests/sgx: Skip non X86_64 platform
JIRA: https://issues.redhat.com/browse/RHEL-22826 Upstream Status: merged into the linux.git commit 981cf56 Author: Zhao Mengmeng <zhaomengmeng@kylinos.cn> Date: Tue Dec 5 21:56:05 2023 -0500 selftests/sgx: Skip non X86_64 platform 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: 2adcba7 ("selftests/x86: Add a selftest for SGX") Signed-off-by: Zhao Mengmeng <zhaomengmeng@kylinos.cn> Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com> Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org> Link: https://lore.kernel.org/all/20231206025605.3965302-1-zhaomzhao%40126.com Signed-off-by: Vladis Dronov <vdronov@redhat.com>
1 parent 1fe094a commit d7e34f7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tools/testing/selftests/sgx/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ ENCL_CFLAGS += -Wall -Werror -static-pie -nostdlib -ffreestanding -fPIE \
1818
-fno-stack-protector -mrdrnd $(INCLUDES)
1919
ENCL_LDFLAGS := -Wl,-T,test_encl.lds,--build-id=none
2020

21+
ifeq ($(CAN_BUILD_X86_64), 1)
2122
TEST_CUSTOM_PROGS := $(OUTPUT)/test_sgx
2223
TEST_FILES := $(OUTPUT)/test_encl.elf
2324

24-
ifeq ($(CAN_BUILD_X86_64), 1)
2525
all: $(TEST_CUSTOM_PROGS) $(OUTPUT)/test_encl.elf
2626
endif
2727

0 commit comments

Comments
 (0)