Debian Codegraph @

tests/probes/fwupdsecattr/test_probes_fwupdsecattr.sh

raw symbols SCIP
1 #!/usr/bin/env bash
2
3 . $builddir/tests/test_common.sh
4
5 set -e -o pipefail
6
7 function test_probes_fwupdsecattr {
8
9 probecheck "fwupdsecattr" || return 255
10 require_dbus "system" "org.freedesktop.fwupd" "/" || return 255
11
12 # Check if org.freedesktop.fwupd.GetHostSecurityAttrs method
13 # is supported (it might fail, e.g. in hypervisor env).
14 gdbus call --system -d org.freedesktop.fwupd -o / \
15 -m org.freedesktop.fwupd.GetHostSecurityAttrs >/dev/null || return 255
16
17 local ret_val=0
18 local DF="${srcdir}/test_probes_fwupdsecattr.xml"
19 local RF="results.xml"
20
21 [ -f $RF ] && rm -f $RF
22
23 $OSCAP oval eval --results $RF $DF
24
25 if [ -f $RF ]; then
26 verify_results "def" $DF $RF 1 && verify_results "tst" $DF $RF 1
27 ret_val=$?
28 else
29 ret_val=1
30 fi
31
32 return $ret_val
33 }
34
35 test_probes_fwupdsecattr