All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] selftests/sgx: add test_encl.elf to TEST_GEN_FILES
@ 2022-05-23 18:11 Jarkko Sakkinen
  2022-05-26  0:39 ` Jarkko Sakkinen
  0 siblings, 1 reply; 3+ messages in thread
From: Jarkko Sakkinen @ 2022-05-23 18:11 UTC (permalink / raw)
  To: Shuah Khan
  Cc: Jarkko Sakkinen, stable, Dave Hansen, Jethro Beekman,
	Borislav Petkov, linux-sgx, linux-kselftest, linux-kernel

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>
---
v2:
Use TEST_GEN_FILES in the "all" target, instead of duplicating the path for
test_encl.elf.
---
 tools/testing/selftests/sgx/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/sgx/Makefile b/tools/testing/selftests/sgx/Makefile
index 75af864e07b6..7f60811b5b20 100644
--- a/tools/testing/selftests/sgx/Makefile
+++ b/tools/testing/selftests/sgx/Makefile
@@ -17,9 +17,10 @@ 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
+all: $(TEST_CUSTOM_PROGS) $(TEST_GEN_FILES)
 endif
 
 $(OUTPUT)/test_sgx: $(OUTPUT)/main.o \
-- 
2.36.1


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

* Re: [PATCH v2] selftests/sgx: add test_encl.elf to TEST_GEN_FILES
  2022-05-23 18:11 [PATCH v2] selftests/sgx: add test_encl.elf to TEST_GEN_FILES Jarkko Sakkinen
@ 2022-05-26  0:39 ` Jarkko Sakkinen
  2022-06-09 20:19   ` Shuah Khan
  0 siblings, 1 reply; 3+ messages in thread
From: Jarkko Sakkinen @ 2022-05-26  0:39 UTC (permalink / raw)
  To: Shuah Khan, dave.hansen
  Cc: stable, Dave Hansen, Jethro Beekman, Borislav Petkov, linux-sgx,
	linux-kselftest, linux-kernel

On Mon, May 23, 2022 at 09:11:20PM +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>
> ---
> v2:
> Use TEST_GEN_FILES in the "all" target, instead of duplicating the path for
> test_encl.elf.
> ---
>  tools/testing/selftests/sgx/Makefile | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/tools/testing/selftests/sgx/Makefile b/tools/testing/selftests/sgx/Makefile
> index 75af864e07b6..7f60811b5b20 100644
> --- a/tools/testing/selftests/sgx/Makefile
> +++ b/tools/testing/selftests/sgx/Makefile
> @@ -17,9 +17,10 @@ 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
> +all: $(TEST_CUSTOM_PROGS) $(TEST_GEN_FILES)
>  endif
>  
>  $(OUTPUT)/test_sgx: $(OUTPUT)/main.o \
> -- 
> 2.36.1
> 

Dave, would it be by any means possible to pick this? My workload is
kernel testing with buildroot [*].

[*] Related:
    https://lore.kernel.org/buildroot/2c42570b01b2b51cc33d6623b25a736e4f20c601.camel@iki.fi/T/#t

BR, Jarkko

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

* Re: [PATCH v2] selftests/sgx: add test_encl.elf to TEST_GEN_FILES
  2022-05-26  0:39 ` Jarkko Sakkinen
@ 2022-06-09 20:19   ` Shuah Khan
  0 siblings, 0 replies; 3+ messages in thread
From: Shuah Khan @ 2022-06-09 20:19 UTC (permalink / raw)
  To: Jarkko Sakkinen, Shuah Khan, dave.hansen
  Cc: stable, Jethro Beekman, Borislav Petkov, linux-sgx,
	linux-kselftest, linux-kernel, Shuah Khan

On 5/25/22 6:39 PM, Jarkko Sakkinen wrote:
> On Mon, May 23, 2022 at 09:11:20PM +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>
>> ---
>> v2:
>> Use TEST_GEN_FILES in the "all" target, instead of duplicating the path for
>> test_encl.elf.
>> ---
>>   tools/testing/selftests/sgx/Makefile | 3 ++-
>>   1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/sgx/Makefile b/tools/testing/selftests/sgx/Makefile
>> index 75af864e07b6..7f60811b5b20 100644
>> --- a/tools/testing/selftests/sgx/Makefile
>> +++ b/tools/testing/selftests/sgx/Makefile
>> @@ -17,9 +17,10 @@ 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
>> +all: $(TEST_CUSTOM_PROGS) $(TEST_GEN_FILES)
>>   endif
>>   
>>   $(OUTPUT)/test_sgx: $(OUTPUT)/main.o \
>> -- 
>> 2.36.1
>>
> 
> Dave, would it be by any means possible to pick this? My workload is
> kernel testing with buildroot [*].
> 
> [*] Related:
>      https://lore.kernel.org/buildroot/2c42570b01b2b51cc33d6623b25a736e4f20c601.camel@iki.fi/T/#t
> 
> BR, Jarkko
> 

I can pick this up with ack from Dave or here is mine to go through Dave's

Reviewed-by: Shuah Khan <skhan@linuxfoundation.org>

thanks,
-- Shuah

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

end of thread, other threads:[~2022-06-09 20:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-23 18:11 [PATCH v2] selftests/sgx: add test_encl.elf to TEST_GEN_FILES Jarkko Sakkinen
2022-05-26  0:39 ` Jarkko Sakkinen
2022-06-09 20:19   ` Shuah Khan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.