Skip to contentSkip to conversation

selftests-coredump-add-stackdump-test.patch removed from -mm tree

merged Andrew Morton 1 participant 1 message Jan 7, 2025

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: selftests: coredump: add stackdump test
has been removed from the -mm tree. Its filename was
selftests-coredump-add-stackdump-test.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
From: Nam Cao <[email protected]>
Subject: selftests: coredump: add stackdump test
Date: Thu, 2 Jan 2025 09:22:57 +0100

Add a test which checks that the kstkesp field in /proc/pid/stat can be read for all threads of a coredumping process.

For full details including the motivation for this test and how it works, see the README file added by this commit.

---

 tools/testing/selftests/coredump/Makefile         |    7 
 tools/testing/selftests/coredump/README.rst       |   50 +++
 tools/testing/selftests/coredump/stackdump        |   14 +
 tools/testing/selftests/coredump/stackdump_test.c |  151 ++++++++++++
 4 files changed, 222 insertions(+)
tools/testing/selftests/coredump/Makefile new file +7 -0
new file mode 100644
@@ -0,0 +1,7 @@
+# SPDX-License-Identifier: GPL-2.0-only
+CFLAGS = $(KHDR_INCLUDES)
+
+TEST_GEN_PROGS := stackdump_test
+TEST_FILES := stackdump
+
+include ../lib.mk
tools/testing/selftests/coredump/README.rst new file +50 -0

50 lines not on this page · raw message

tools/testing/selftests/coredump/stackdump new file +14 -0
new file mode 100755
@@ -0,0 +1,14 @@
+#!/bin/sh
+# SPDX-License-Identifier: GPL-2.0
+
+CRASH_PROGRAM_ID=$1
+STACKDUMP_FILE=$2
+
+TMP=$(mktemp)
+
+for t in /proc/$CRASH_PROGRAM_ID/task/*; do
+	tid=$(basename $t)
+	cat /proc/$tid/stat | awk '{print $29}' >> $TMP
+done
+
+mv $TMP $STACKDUMP_FILE
tools/testing/selftests/coredump/stackdump_test.c new file +151 -0

151 lines not on this page · raw message

_

Patches currently in -mm which might be from [email protected] are

fs-proc-do_task_stat-fix-esp-not-readable-during-coredump.patch