mirror of
https://github.com/systemd/systemd.git
synced 2025-08-24 09:49:49 +03:00
TEST-13-NSPAWN.nss-mymachines: Use negative matching switch
The test expects _not_ to find the patterns but the run_and_grep would
still print 'FAIL:' message. Use the dedicated -n option that inverts
the semantics cleaner than shell's !.
(cherry picked from commit c4b7596607
)
This commit is contained in:
committed by
Luca Boccassi
parent
9a389ae535
commit
f45b42ea5d
@ -114,8 +114,8 @@ for i in {100..120}; do
|
|||||||
run_and_grep "^10\.2\.0\.$i\s+STREAM" getent ahostsv4 -s mymachines nss-mymachines-manyips
|
run_and_grep "^10\.2\.0\.$i\s+STREAM" getent ahostsv4 -s mymachines nss-mymachines-manyips
|
||||||
done
|
done
|
||||||
run_and_grep "^fd00:dead:beef:cafe::2\s+STREAM" getent ahostsv6 -s mymachines nss-mymachines-manyips
|
run_and_grep "^fd00:dead:beef:cafe::2\s+STREAM" getent ahostsv6 -s mymachines nss-mymachines-manyips
|
||||||
(! run_and_grep "^fd00:" getent ahostsv4 -s mymachines nss-mymachines-manyips)
|
run_and_grep -n "^fd00:" getent ahostsv4 -s mymachines nss-mymachines-manyips
|
||||||
(! run_and_grep "^10\.2:" getent ahostsv6 -s mymachines nss-mymachines-manyips)
|
run_and_grep -n "^10\.2:" getent ahostsv6 -s mymachines nss-mymachines-manyips
|
||||||
|
|
||||||
# Multiple machines at once
|
# Multiple machines at once
|
||||||
run_and_grep "^10\.1\.0\.2\s+nss-mymachines-singleip$" getent hosts -s mymachines nss-mymachines-{singleip,manyips}
|
run_and_grep "^10\.1\.0\.2\s+nss-mymachines-singleip$" getent hosts -s mymachines nss-mymachines-{singleip,manyips}
|
||||||
|
Reference in New Issue
Block a user