Debian Codegraph @

tests/probes/systemdunitproperty/test_probes_systemdunitproperty_mount_wants.sh

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2
3 # Copyright 2014--2016 Red Hat Inc., Durham, North Carolina.
4 # All Rights Reserved.
5 #
6 # OpenScap Probes Test Suite.
7
8 set -e -o pipefail
9
10 . $builddir/tests/test_common.sh
11
12 function test_probes_systemdunitproperty_mount_wantsscip-shell shell shell-project 0.0.0 test_probes_systemdunitproperty_mount_wants(). {
13 probecheck "systemdunitproperty" || return 255
14 pidofscip-shell system . . pidof. systemd > /dev/nullscip-shell filesystem . . `/dev/null`. || return 255
15 systemctl show -- -.mount | grepscip-shell system . . grep. -Eq "Wants=\S+" || return 255
16
17 local DF="${srcdir}/test_probes_systemdunitproperty_mount_wants.xml"
18 local RF="results.xml"
19
20 [scip-shell system . . `[`. -f $RF ] && rmscip-shell system . . rm. -f $RF
21
22 $OSCAP oval eval --results $RF $DF
23
24 [scip-shell system . . `[`. -f $RF ]
25 verify_results "def" $DF $RF 1
26 verify_results "tst" $DF $RF 1
27 rmscip-shell system . . rm. $RF
28 }
29
30 test_run "Probe systemdunitproperty mount Wants - only on some systems" test_probes_systemdunitproperty_mount_wants