diff mbox series

[4/6] selftests/damon/debugfs_duplicate_context_creation: hide errors from expected file write failures

Message ID 20241028233058.283381-5-sj@kernel.org (mailing list archive)
State New
Headers show
Series damon/{self,kunit}tests: minor fixups for DAMON debugfs interface tests | expand

Commit Message

SeongJae Park Oct. 28, 2024, 11:30 p.m. UTC
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.

Fixes: ade38b8ca5ce ("selftest/damon: add a test for duplicate context dirs creation")
Signed-off-by: SeongJae Park <sj@kernel.org>
---
 .../selftests/damon/debugfs_duplicate_context_creation.sh       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/tools/testing/selftests/damon/debugfs_duplicate_context_creation.sh b/tools/testing/selftests/damon/debugfs_duplicate_context_creation.sh
index 4a76e37ef16b..bd6c22d96ead 100755
--- a/tools/testing/selftests/damon/debugfs_duplicate_context_creation.sh
+++ b/tools/testing/selftests/damon/debugfs_duplicate_context_creation.sh
@@ -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