stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] selftests/sgx: add test_encl.elf to TEST_GEN_FILES
@ 2022-05-18  3:16 Jarkko Sakkinen
  2022-05-18 14:54 ` Jarkko Sakkinen
  0 siblings, 1 reply; 2+ messages in thread
From: Jarkko Sakkinen @ 2022-05-18  3:16 UTC (permalink / raw)
  To: Shuah Khan, linux-kselftest
  Cc: Dave Hansen, linux-sgx, Jarkko Sakkinen, stable

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(+)

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
-- 
2.36.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] selftests/sgx: add test_encl.elf to TEST_GEN_FILES
  2022-05-18  3:16 [PATCH] selftests/sgx: add test_encl.elf to TEST_GEN_FILES Jarkko Sakkinen
@ 2022-05-18 14:54 ` Jarkko Sakkinen
  0 siblings, 0 replies; 2+ messages in thread
From: Jarkko Sakkinen @ 2022-05-18 14:54 UTC (permalink / raw)
  To: Shuah Khan, linux-kselftest
  Cc: Dave Hansen, linux-sgx, stable, Reinette Chatre

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-05-18 14:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-18  3:16 [PATCH] selftests/sgx: add test_encl.elf to TEST_GEN_FILES Jarkko Sakkinen
2022-05-18 14:54 ` Jarkko Sakkinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).