]> git.baikalelectronics.ru Git - kernel.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)
commitaeaf1056547f6b7f927ed57d370892f0e1f538f6
tree6f5d182cc6bdc53349931b7a368a5e041403c62b
parent583a993f165f0a359925639e2cb0d253b9267ae5
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