]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
selftests/damon/debugfs_duplicate_context_creation: hide errors from expected file...
authorSeongJae Park <sj@kernel.org>
Mon, 28 Oct 2024 23:30:56 +0000 (16:30 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Thu, 7 Nov 2024 22:38:08 +0000 (14:38 -0800)
debugfs_duplicate_context_creation.sh does an invalid file write to ensure
it fails.  Check of the failure is sufficient, so the error message from
the failure only makes the output unnecessarily noisy.  Hide it.

Link: https://lkml.kernel.org/r/20241028233058.283381-5-sj@kernel.org
Fixes: ade38b8ca5ce ("selftest/damon: add a test for duplicate context dirs creation")
Signed-off-by: SeongJae Park <sj@kernel.org>
Cc: Andrew Paniakin <apanyaki@amazon.com>
Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: David Gow <davidgow@google.com>
Cc: Shuah Khan <shuah@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
tools/testing/selftests/damon/debugfs_duplicate_context_creation.sh

index 4a76e37ef16b1f2c67ce393b7cbfc5934397c71b..bd6c22d96ead3052a61f42c0c82808e41a7cf264 100755 (executable)
@@ -12,7 +12,7 @@ then
        exit 1
 fi
 
-if echo foo > "$DBGFS/mk_contexts"
+if echo foo > "$DBGFS/mk_contexts" 2> /dev/null
 then
        echo "duplicate context creation success"
        exit 1