]> git.baikalelectronics.ru Git - kernel.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)
committerDave Hansen <dave.hansen@linux.intel.com>
Fri, 11 Feb 2022 21:52:47 +0000 (13:52 -0800)
commit0b2483c4ac08bc749efe33761328620a9b7f4de6
treea4ef7d5b59bed483e5558d2712e4fc81e5a49c20
parent9f1436ff28e15a0b8abcb919e5eed566ee021fef
selftests/sgx: Do not attempt enclave build without valid enclave

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: 397e2692fa17 ("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
tools/testing/selftests/sgx/main.c