diff mbox series

[kirkstone,11/11] testimage: Exclude wtmp from target-dumper commands

Message ID 2afd9a6002cba2a23dd62a1805b4be04083c041b.1703124430.git.steve@sakoman.com
State Accepted, archived
Commit 2afd9a6002cba2a23dd62a1805b4be04083c041b
Headers show
Series [kirkstone,01/11] ghostscript: Backport fix for CVE-2023-46751 | expand

Commit Message

Steve Sakoman Dec. 21, 2023, 2:09 a.m. UTC
From: Richard Purdie <richard.purdie@linuxfoundation.org>

wtmp is filled with binary data which the run_serial command can't cope with.
Catting this results in confusion of the serial interface and potentially large
backlogs of data in the buffers which can hang qemu.

Exclude the problematic files from the command.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 599ac08a6f6fb3f6a89a897c8e06367c63c2f979)
Signed-off-by: Steve Sakoman <steve@sakoman.com>
---
 meta/classes/testimage.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 34173ce68d..6864eeed2f 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -112,7 +112,7 @@  testimage_dump_target () {
     netstat -an
     ip address
     # Next command will dump logs from /var/log/
-    find /var/log/ -type f 2>/dev/null -exec echo "====================" \; -exec echo {} \; -exec echo "====================" \; -exec cat {} \; -exec echo "" \;
+    find /var/log/ -type f -name !wtmp* 2>/dev/null -exec echo "====================" \; -exec echo {} \; -exec echo "====================" \; -exec cat {} \; -exec echo "" \;
 }
 
 testimage_dump_host () {