Bug 1944014

Summary: makedumpfile --dump-dmesg changes white spaces and all kump tests failed
Product: [Fedora] Fedora Reporter: Coiby <coxu>
Component: kexec-toolsAssignee: Kairui Song <kasong>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 33CC: bhe, kasong, ruyang
Target Milestone: ---Flags: fedora-admin-xmlrpc: mirror+
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
: 1952297 (view as bug list) Environment:
Last Closed: 2021-06-21 08:11:00 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1952297, 1952299    

Description Coiby 2021-03-29 04:27:44 UTC
Description of problem:

"makedumpfile --dump-dmesg" generata a vmcore-demsg that only differs from the original vmcore-demsg in white spaces,
```
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 
```

As a consequence, all kdumps in tests failed.

Version-Release number of selected component (if applicable):

kexec-tools-2.0.21-4.fc33.x86_64

How reproducible:

always reproducible at least on hpe-dl585g5-01.hpe2.lab.eng.bos.redhat.com

Steps to Reproduce:
1. Add crashekernel=auto to the kernel commandline 
2. Install kexec-tools
3. Trigger sysrq
4. Run "makedumpfile --dump-dmesg" against generated vmcore to genereate vmcore-dmesg.txt.2 
5. diff -u vmcore-dmesg.txt vmcore-dmesg.txt.2 

Actual results:

The generated vmcore-dmesg.txt.2 is different from the original one in white spaces.

Expected results:

Two vmcore-dmesg.txt should be the same.

Additional info: