kexec-tools/tests/scripts
Coiby Xu 62578ace21 selftest: ignore all spaces when compare the dmesg files
For the log entry that has multiple lines, "makedumpfile --dump-dmesg"
would indent the remaining lines while vmcore-dmesg doesn't. For
example, vmcore-dmesg.txt and vmcore-dmesg.txt.2 are the outputs of
vmcore-dmesg and "makedumpfile --dump-dmesg" respectively,

    ```
    diff -u vmcore-dmesg.txt vmcore-dmesg.txt.2
    --- vmcore-dmesg.txt    2021-03-28 22:13:09.986000000 -0400
    +++ vmcore-dmesg.txt.2  2021-03-28 22:13:39.920106131 -0400
    @@ -397,9 +397,9 @@
     [    1.710742] vc vcsa: hash matches
     [    1.711938] RAS: Correctable Errors collector initialized.
     [    1.713736] Unstable clock detected, switching default tracing clock to "global"
    -If you want to keep using the local clock, then add:
    -  "trace_clock=local"
    -on the kernel command line
    +               If you want to keep using the local clock, then add:
    +                 "trace_clock=local"
    +               on the kernel command line
     [    1.750539] ata1.01: NODEV after polling detection
     [    1.750973] ata1.00: ATA-7: QEMU HARDDISK, 2.5+, max UDMA/100
     [    1.752885] ata1.00: 8388608 sectors, multi 16: LBA48
    ```

Quite often, all three tests could fail because of the above difference. So
let's ignore all the spaces. This patch could fix bz1952299 [1].

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1952299

Signed-off-by: Coiby Xu <coxu@redhat.com>
Acked-by: Kairui Song <kasong@redhat.com>
2021-06-08 22:21:47 +08:00
..
build-scripts selftest: Fix bug of collecting test RPMs from argument 2021-03-24 15:50:41 +08:00
kexec-kdump-test selftest: ignore all spaces when compare the dmesg files 2021-06-08 22:21:47 +08:00
testcases selftest: fix the error of misplacing double quotes 2021-06-08 22:21:47 +08:00
build-image.sh selftest: Add basic infrastructure to build test image 2020-09-17 10:42:34 +08:00
copy-from-image.sh selftest: Show the path of dumped vmcore on test end 2020-09-17 10:43:02 +08:00
image-init-lib.sh selftest: Fix qcow2 image format detect 2020-11-18 01:53:01 +08:00
run-qemu selftest: replace qemu-kvm with one based on dracut's run-qemu 2021-03-24 15:51:02 +08:00
run-test.sh selftest: Fix several test issue with Fedora 33 2020-11-18 23:57:13 +08:00
spawn-image-shell.sh selftest: Add basic test framework 2020-09-17 10:42:54 +08:00
test-lib.sh selftest: replace qemu-kvm with one based on dracut's run-qemu 2021-03-24 15:51:02 +08:00