Skip to content

Commit a9786c9

Browse files
committed
ima_measurements.sh: Fix exit code condition
Condition is "$? -ne 0", therefore negative if command passed to if. This was hidden until fix in the next commit. Fixes: 4c74c7d ("IMA: Read required policy from file") Signed-off-by: Petr Vorel <[email protected]>
1 parent 07d7967 commit a9786c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

testcases/kernel/security/integrity/ima/tests/ima_measurements.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ test3()
9494
sudo -n -u $user sh -c "echo $(cat /proc/uptime) user file > $file; cat $file > /dev/null"
9595
cd ..
9696

97-
if tst_rod "$cmd" 2> /dev/null; then
97+
if ! tst_rod "$cmd" 2> /dev/null; then
9898
tst_res TPASS "$cmd failed as expected"
9999
else
100100
tst_res $IMA_FAIL "$cmd passed unexpectedly"

0 commit comments

Comments
 (0)