linux-sgx.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Muhammad Usama Anjum <usama.anjum@collabora.com>
To: Yi Lai <yi1.lai@intel.com>,
	jarkko@kernel.org, dave.hansen@linux.intel.com, shuah@kernel.org,
	jethro@fortanix.com, bp@suse.de
Cc: Muhammad Usama Anjum <usama.anjum@collabora.com>,
	linux-sgx@vger.kernel.org, linux-kselftest@vger.kernel.org,
	heng.su@intel.com, pengfei.xu@intel.com
Subject: Re: [RESEND PATCH] selftests/sgx: Add "test_encl.elf" to TEST_FILES
Date: Fri, 28 Apr 2023 17:31:07 +0500	[thread overview]
Message-ID: <9005b73c-85c5-8296-e329-5bb87bc8c3ec@collabora.com> (raw)
In-Reply-To: <20230421033123.445883-1-yi1.lai@intel.com>

On 4/21/23 8:31 AM, Yi Lai wrote:
> The "test_encl.elf" file used by test_sgx is not installed in
> INSTALL_PATH. Attempting to execute test_sgx causes false negative:
I've ran the following on next-20230427:
make -C tools/testing/selftests O=build2 -j `nproc`

find | grep test_encl.elf
./build2/kselftest/sgx/test_encl.elf

test_encl.elf is being copied already. Am i missing something?
> 
> "
> enclave executable open(): No such file or directory
> main.c:188:unclobbered_vdso:Failed to load the test enclave.
> "
> 
> Add "test_encl.elf" to TEST_FILES so that it will be installed.
> 
> Fixes: 2adcba79e69d ("selftests/x86: Add a selftest for SGX")
> Signed-off-by: Yi Lai <yi1.lai@intel.com>
> ---
>  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..50aab6b57da3 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_FILES := $(OUTPUT)/test_encl.elf
I think this isn't needed just like sign_key.o is being copied already.
test_encl.elf is being copied.
>  
>  ifeq ($(CAN_BUILD_X86_64), 1)
>  all: $(TEST_CUSTOM_PROGS) $(OUTPUT)/test_encl.elf

-- 
BR,
Muhammad Usama Anjum

  parent reply	other threads:[~2023-04-28 12:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-21  3:31 [RESEND PATCH] selftests/sgx: Add "test_encl.elf" to TEST_FILES Yi Lai
2023-04-23  2:33 ` Jarkko Sakkinen
2023-04-28 12:31 ` Muhammad Usama Anjum [this message]
2023-04-28 13:35   ` Jarkko Sakkinen
2023-04-29  1:25   ` Lai, Yi1
2023-05-08 17:01 ` Shuah Khan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9005b73c-85c5-8296-e329-5bb87bc8c3ec@collabora.com \
    --to=usama.anjum@collabora.com \
    --cc=bp@suse.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=heng.su@intel.com \
    --cc=jarkko@kernel.org \
    --cc=jethro@fortanix.com \
    --cc=linux-kselftest@vger.kernel.org \
    --cc=linux-sgx@vger.kernel.org \
    --cc=pengfei.xu@intel.com \
    --cc=shuah@kernel.org \
    --cc=yi1.lai@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).