Debian Codegraph @

tests/probes/systemdunitproperty/test_probes_systemdunitproperty_mount_wants.sh

raw symbols SCIP
1 #!/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_wants {
13 probecheck "systemdunitproperty" || return 255
14 pidof systemd > /dev/null || return 255
15 systemctl show -- -.mount | grep -Eq "Wants=\S+" || return 255
16
17 local DF="${srcdir}/test_probes_systemdunitproperty_mount_wants.xml"
18 local RF="results.xml"
19
20 [ -f $RF ] && rm -f $RF
21
22 $OSCAP oval eval --results $RF $DF
23
24 [ -f $RF ]
25 verify_results "def" $DF $RF 1
26 verify_results "tst" $DF $RF 1
27 rm $RF
28 }
29
30 test_run "Probe systemdunitproperty mount Wants - only on some systems" test_probes_systemdunitproperty_mount_wants