]> www.infradead.org Git - users/dwmw2/linux.git/commit
selftests/sgx: Do not attempt enclave build without valid enclave
authorReinette Chatre <reinette.chatre@intel.com>
Tue, 8 Feb 2022 21:48:40 +0000 (13:48 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:57:33 +0000 (13:57 +0200)
commit7487b4a96d157ee32e79a3cb6a4a76de1ac0c624
treead21d54d4490602dc9b47d1ad90d0a2fd0c1dbe4
parentbc72277b7541756d91c07afee6d768ec97777651
selftests/sgx: Do not attempt enclave build without valid enclave

[ Upstream commit fff36bcbfde1126f6b81cb8ee12a58aada17ca29 ]

It is not possible to build an enclave if it was not possible to load
the binary from which it should be constructed. Do not attempt
to make further progress but instead return with failure. A
"return false" from setup_test_encl() is expected to trip an
ASSERT_TRUE() and abort the rest of the test.

Fixes: 1b35eb719549 ("selftests/sgx: Encpsulate the test enclave creation")
Signed-off-by: Reinette Chatre <reinette.chatre@intel.com>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Dave Hansen <dave.hansen@linux.intel.com>
Acked-by: Shuah Khan <skhan@linuxfoundation.org>
Link: https://lkml.kernel.org/r/e3778c77f95e6dca348c732b12f155051d2899b4.1644355600.git.reinette.chatre@intel.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
tools/testing/selftests/sgx/main.c