kexec-tools/spec
Coiby Xu 97b3b962a9 Get rid of "grep: warning: stray \ before /"
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=2242185

grep (3.8) warnings when running the unit tests or running
"kdumpctl reset-crashkernel" on >= F39,
    # unit tests
    Examples:
      1) kdumpctl _find_kernel_path_by_release() returns the kernel path for the given release
         When call _find_kernel_path_by_release vmlinuz-6.2.11-200.fc37.x86_64

         1.1) WARNING: There was output to stderr but not found expectation

                stderr: grep: warning: stray \ before /

              # spec/kdumpctl_general_spec.sh:169-172

    # kdumpctl reset-crashkernel
    grep: warning: stray \ before /
    kdump: Updated crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M for kernel=/boot/vmlinuz-6.6.8-200.fc39.x86_64. Please reboot the system for the change to take effect.

This warning can be reproduced by
  echo 'kernel="/boot/vmlinuz-6.4.6-200.fc38.x86_64"' | grep -E "^kernel=.*$_release(\/\w+)?\"$"

This patch removes unneeded backslash. It also adds a test for
systemd-boot path. And for simplification, Parameters:dynamic is now
used to generate test data dynamically.

Fixes: 8af05dc4 ("kdumpctl: Add support for systemd-boot paths")
Signed-off-by: Coiby Xu <coxu@redhat.com>
Reviewed-by: Philipp Rudo <prudo@redhat.com>
2024-01-31 14:38:49 +08:00
..
support unit tests: fix test failures "The param /boot/boot/vmlinuz-xxx is incorrect" 2023-10-10 08:40:26 +08:00
kdump-lib_spec.sh Allow _crashkernel_add to address larger memory ranges 2023-11-08 09:42:31 +08:00
kdump-lib-initramfs_spec.sh unit tests: add tests for kdump_get_conf_val in kdump-lib-initramfs.sh 2022-04-14 11:45:18 +08:00
kdumpctl_general_spec.sh Get rid of "grep: warning: stray \ before /" 2024-01-31 14:38:49 +08:00
kdumpctl_manage_crashkernel_spec.sh unit tests: fix test failures "The param /boot/boot/vmlinuz-xxx is incorrect" 2023-10-10 08:40:26 +08:00
kdumpctl_reset_crashkernel_spec.sh unit tests: fix test failures "The param /boot/boot/vmlinuz-xxx is incorrect" 2023-10-10 08:40:26 +08:00