Skip to content

Commit 78c790e

Browse files
committed
Redirect error to null if /proc/sys/crypto/fips_enabled doesn't exist
Currently, kdump/config-any test [1] failed against rawhide kernel which somehow doesn't have FIPS enabled [2]. And kdump/config-any will warn if logs contain "No such file or directory" [3] and warning by default is treated as a test failure by tmt. Suppress the error to keep the test green. [1] https://artifacts.osci.redhat.com/testing-farm/fdacf2c1-c54f-4467-b8c9-25bdd2d021e0/ [2] https://bugzilla.redhat.com/show_bug.cgi?id=2372994 [3] https://gitlab.com/redhat/centos-stream/tests/kernel/kernel-tests/-/blob/845025235f5c3d6ccc4e462f215d935999606893/kdump/include/kdump.sh#L446 Signed-off-by: Coiby Xu <[email protected]>
1 parent 6da55bc commit 78c790e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mkdumprd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ if ! is_fadump_capable; then
433433
# If /boot is not on a separate partition, the fips dracut module will
434434
# link /sysroot/boot to /boot. So we need to mount the root partition
435435
# to /sysroot beforehand.
436-
if [[ $(cat /proc/sys/crypto/fips_enabled) == 1 ]]; then
436+
if [[ $(cat /proc/sys/crypto/fips_enabled 2> /dev/null) == 1 ]]; then
437437
_boot_source=$(findmnt -n -o SOURCE --target /boot)
438438
if mountpoint -q /boot; then
439439
dracut_args+=(--add-device "$_boot_source")

0 commit comments

Comments
 (0)