selftests/damon/debugfs_rm_non_contexts: hide expected write error messages
authorSeongJae Park <sj@kernel.org>
Tue, 10 Jan 2023 19:04:00 +0000 (19:04 +0000)
committerAndrew Morton <akpm@linux-foundation.org>
Fri, 3 Feb 2023 06:32:52 +0000 (22:32 -0800)
A selftest case for DAMON debugfs interface has a test for expected
failure.  To make the test output clean, hide the expected failure error
message.

Link: https://lkml.kernel.org/r/20230110190400.119388-9-sj@kernel.org
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/damon/debugfs_rm_non_contexts.sh

index 48b7af6..f3ffeb1 100644 (file)
@@ -10,7 +10,7 @@ dmesg -C
 
 for file in "$DBGFS/"*
 do
-       echo "$(basename "$f")" > "$DBGFS/rm_contexts"
+       (echo "$(basename "$f")" > "$DBGFS/rm_contexts") &> /dev/null
        if dmesg | grep -q BUG
        then
                dmesg