]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
selftests/sgx: Dump segments and /proc/self/maps only on failure
authorJarkko Sakkinen <jarkko@kernel.org>
Mon, 15 Nov 2021 18:35:18 +0000 (10:35 -0800)
committerDave Hansen <dave.hansen@linux.intel.com>
Mon, 15 Nov 2021 19:34:04 +0000 (11:34 -0800)
commit1471721489090515f9f0f059b25124898928e559
tree6f5d182cc6bdc53349931b7a368a5e041403c62b
parent3200505d4de6436af799d7be743d9dc87450ee5a
selftests/sgx: Dump segments and /proc/self/maps only on failure

Logging is always a compromise between clarity and detail. The main use
case for dumping VMA's is when FIXTURE_SETUP() fails, and is less important
for enclaves that do initialize correctly. Therefore, print the segments
and /proc/self/maps only in the error case.

Finally, if a single test ever creates multiple enclaves, the amount of
log lines would become enormous.

Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
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>
Link: https://lkml.kernel.org/r/23cef0ae1de3a8a74cbfbbe74eca48ca3f300fde.1636997631.git.reinette.chatre@intel.com
tools/testing/selftests/sgx/main.c