Message ID | 20220518031619.1179862-1-jarkko@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | selftests/sgx: add test_encl.elf to TEST_GEN_FILES | expand |
On Wed, May 18, 2022 at 06:16:19AM +0300, Jarkko Sakkinen wrote: > TEST_GEN_FILES contains files that are generated during compilation and are > required to be included together with the test binaries, e.g. when > performing: > > make -C tools/testing/selftests install INSTALL_PATH=/some/other/path [*] > > Add test_encl.elf to TEST_GEN_FILES because otherwise the installed test > binary will fail to run. > > [*] https://docs.kernel.org/dev-tools/kselftest.html > > Cc: stable@vger.kernel.org > Fixes: 2adcba79e69d ("selftests/x86: Add a selftest for SGX") > Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org> I found this while trying to create an image with BuldRoot containing the self-tests: https://github.com/jarkkojs/buildroot-sgx On SGX capable machine can be built and run in QEMU as make sgx_x86_64_defconfig && make && output/image/run.sh BR, Jarkko
diff --git a/tools/testing/selftests/sgx/Makefile b/tools/testing/selftests/sgx/Makefile index 75af864e07b6..f3f312904bcc 100644 --- a/tools/testing/selftests/sgx/Makefile +++ b/tools/testing/selftests/sgx/Makefile @@ -17,6 +17,7 @@ ENCL_CFLAGS := -Wall -Werror -static -nostdlib -nostartfiles -fPIC \ -fno-stack-protector -mrdrnd $(INCLUDES) TEST_CUSTOM_PROGS := $(OUTPUT)/test_sgx +TEST_GEN_FILES := $(OUTPUT)/test_encl.elf ifeq ($(CAN_BUILD_X86_64), 1) all: $(TEST_CUSTOM_PROGS) $(OUTPUT)/test_encl.elf
TEST_GEN_FILES contains files that are generated during compilation and are required to be included together with the test binaries, e.g. when performing: make -C tools/testing/selftests install INSTALL_PATH=/some/other/path [*] Add test_encl.elf to TEST_GEN_FILES because otherwise the installed test binary will fail to run. [*] https://docs.kernel.org/dev-tools/kselftest.html Cc: stable@vger.kernel.org Fixes: 2adcba79e69d ("selftests/x86: Add a selftest for SGX") Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org> --- tools/testing/selftests/sgx/Makefile | 1 + 1 file changed, 1 insertion(+)