test/fs/disable-devnull-symlink.exp: simplify error messages

This amends commit a4e6495fd ("modif: do not follow symlinks to
/dev/null on disable (#7129)", 2026-04-17).
This commit is contained in:
Kelvin M. Klann 2026-04-27 04:43:52 -03:00
parent 68427a2333
commit 1511aab5fa

View file

@ -21,31 +21,31 @@ send -- "firejail --noprofile --blacklist=./devnull_symlink ls -l /dev/null\r"
expect {
timeout {puts "TESTING ERROR 1\n";exit}
"crw-rw-rw-" {puts "OK\n"}
"cr--r--r--" {puts "TESTING ERROR 2\n";exit}
"cr--r--r--" {puts "TESTING ERROR 1.1\n";exit}
}
after 100
send -- "firejail --noprofile --blacklist=./devnull_symlink touch /dev/null; echo ret \$?\r"
expect {
timeout {puts "TESTING ERROR 3\n";exit}
timeout {puts "TESTING ERROR 2\n";exit}
-re {ret 0} {puts "OK\n"}
-re {ret [1-9]} {puts "TESTING ERROR 4\n";exit}
-re {ret [1-9]} {puts "TESTING ERROR 2.1\n";exit}
}
after 100
# Test that /dev/null can still be disabled directly (without a symlink).
send -- "firejail --noprofile --blacklist=/dev/null ls -l /dev/null\r"
expect {
timeout {puts "TESTING ERROR 5\n";exit}
timeout {puts "TESTING ERROR 3\n";exit}
"\\-r--------" {puts "OK\n"}
"crw-rw-rw-" {puts "TESTING ERROR 6\n";exit}
"crw-rw-rw-" {puts "TESTING ERROR 3.1\n";exit}
}
after 100
send -- "firejail --noprofile --blacklist=/dev/null touch /dev/null; echo ret \$?\r"
expect {
timeout {puts "TESTING ERROR 7\n";exit}
-re {ret 0} {puts "TESTING ERROR 8\n";exit}
timeout {puts "TESTING ERROR 4\n";exit}
-re {ret 0} {puts "TESTING ERROR 4.1\n";exit}
-re {ret [1-9]} {puts "OK\n"}
}
after 100