This patch captures the return value of the ./safesetid-test execution 
by assigning it to the variable errcode. This change ensures that the 
script properly handles the exit status of the safesetid-test.

Signed-off-by: Shengyu Li <shengyu.li.evg...@gmail.com>
---
 tools/testing/selftests/safesetid/safesetid-test.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/testing/selftests/safesetid/safesetid-test.sh 
b/tools/testing/selftests/safesetid/safesetid-test.sh
index e4fdce675c54..0ebc6ddc4b6c 100755
--- a/tools/testing/selftests/safesetid/safesetid-test.sh
+++ b/tools/testing/selftests/safesetid/safesetid-test.sh
@@ -19,6 +19,7 @@ main_function()
 {
   check_root
   ./safesetid-test
+  errcode=$?
 }
 
 main_function
-- 
2.25.1


Reply via email to