Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/sgx: Remove extra newlines in test output

The TH_LOG() macro is an optional debug logging function made
available by kselftest itself. When TH_LOG_ENABLED is set it
prints the provided message with additional information and
formatting that already includes a newline.

Providing a newline to the message printed by TH_LOG() results
in a double newline that produces irregular test output.

Remove the unnecessary newlines from the text provided to
TH_LOG().

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/6fd171ba622aed172a7c5b129d34d50bd0482f24.1644355600.git.reinette.chatre@intel.com

authored by

Reinette Chatre and committed by
Dave Hansen
5626de65 2db703fc

+2 -2
+2 -2
tools/testing/selftests/sgx/main.c
··· 146 146 147 147 if (!encl_load("test_encl.elf", encl, heap_size)) { 148 148 encl_delete(encl); 149 - TH_LOG("Failed to load the test enclave.\n"); 149 + TH_LOG("Failed to load the test enclave."); 150 150 return false; 151 151 } 152 152 ··· 204 204 fclose(maps_file); 205 205 } 206 206 207 - TH_LOG("Failed to initialize the test enclave.\n"); 207 + TH_LOG("Failed to initialize the test enclave."); 208 208 209 209 encl_delete(encl); 210 210