Skip to contentSkip to conversation

selftests-damon-_debugfs_common-hide-expected-error-message-from-test_write_result.patch removed from -mm tree

merged mm-stable Andrew Morton 1 participant 1 message Nov 7, 2024

lore
Share & tools
lore

Andrew Morton

author tree notice Applied
#0 lore raw

The quilt patch titled
Subject: selftests/damon/_debugfs_common: hide expected error message from test_write_result()
has been removed from the -mm tree. Its filename was
selftests-damon-_debugfs_common-hide-expected-error-message-from-test_write_result.patch

This patch was dropped because it was merged into the mm-stable branch of git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm

------------------------------------------------------
From: SeongJae Park <[email protected]>
Subject: selftests/damon/_debugfs_common: hide expected error message from test_write_result()
Date: Mon, 28 Oct 2024 16:30:55 -0700

DAMON debugfs interface selftests use test_write_result() to check if valid or invalid writes to files of the interface success or fail as expected. File write error messages from expected failures are only making the output noisy. Hide such expected error messages.

Fixes b348eb7abd09 ("mm/damon: add user space selftests")
Cc Andrew Paniakin <[email protected]>
Cc Brendan Higgins <[email protected]>
Cc David Gow <[email protected]>
Cc Shuah Khan <[email protected]>

---

 tools/testing/selftests/damon/_debugfs_common.sh |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
tools/testing/selftests/damon/_debugfs_common.sh renamed from tools/testing/selftests/damon/_debugfs_common.sh~selftests-damon-_debugfs_common-hide-expected-error-message-from-test_write_result +6 -1
@@ -8,7 +8,12 @@ test_write_result() {
 	expect_reason=$4
 	expected=$5
 
-	echo "$content" > "$file"
+	if [ "$expected" = "0" ]
+	then
+		echo "$content" > "$file"
+	else
+		echo "$content" > "$file" 2> /dev/null
+	fi
 	if [ $? -ne "$expected" ]
 	then
 		echo "writing $content to $file doesn't return $expected"

_

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

docs-mm-damon-recommend-academic-papers-to-read-and-or-cite.patch maintainers-memory-management-add-document-files-for-mm.patch