Skip to content

Commit e314d7e

Browse files
committed
OVAL/probes/fwupdsecattr: Fix the probe initialization
Also don't fail the test just because oscap returns code is non-zero as we want to clean up the D-Bus mock in any case.
1 parent e547864 commit e314d7e

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

src/OVAL/probes/unix/linux/fwupdsecattr_probe.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,11 +292,6 @@ int fwupdsecattr_probe_main(probe_ctx *ctx, void *arg)
292292
const char *hsi_result_str;
293293
uint64_t hsi_result = UINT64_MAX;
294294

295-
/* arg is NULL if regex compilation failed */
296-
if (arg == NULL) {
297-
return PROBE_EINIT;
298-
}
299-
300295
probe_in = probe_ctx_getobject(ctx);
301296
if (probe_in == NULL)
302297
return PROBE_ENOOBJ;

tests/probes/fwupdsecattr/test_probes_fwupdsecattr_mock.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function test_probes_fwupdsecattr {
1818
[ -f $RF ] && rm -f $RF
1919

2020
init_dbus_mock $DBUS_MOCK_NAME
21-
$OSCAP oval eval --results $RF $DF 2>$stderr
21+
$OSCAP oval eval --results $RF $DF 2>$stderr || true
2222
clean_dbus_mock $DBUS_MOCK_NAME
2323

2424
if [ -f $RF ]; then

0 commit comments

Comments
 (0)