Skip to contentSkip to conversation

selftest/safesetid: Fix uncaught return value

PATCH New Shengyu Li 1 participant 1 message Apr 30, 2024 Kselftest

lore
Share & tools
lore

Shengyu Li

author
#0 lore raw

PATCH 1/1 selftest/safesetid: Fix uncaught return value

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.

---
 tools/testing/selftests/safesetid/safesetid-test.sh | 1 +
 1 file changed, 1 insertion(+)
tools/testing/selftests/safesetid/safesetid-test.sh +1 -0
index e4fdce675c54..0ebc6ddc4b6c 100755
@@ -19,6 +19,7 @@ main_function()
 {
   check_root
   ./safesetid-test
+  errcode=$?
 }
 
 main_function
Signature · 1 line
2.25.1