From: SeongJae Park <sj@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: SeongJae Park <sj@kernel.org>, Shuah Khan <shuah@kernel.org>,
damon@lists.linux.dev, linux-mm@kvack.org,
linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 4/6] selftests/damon/debugfs_duplicate_context_creation: hide errors from expected file write failures
Date: Mon, 28 Oct 2024 16:30:56 -0700 [thread overview]
Message-ID: <20241028233058.283381-5-sj@kernel.org> (raw)
In-Reply-To: <20241028233058.283381-1-sj@kernel.org>
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 --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
--
2.39.5
next prev parent reply other threads:[~2024-10-28 23:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-28 23:30 [PATCH 0/6] damon/{self,kunit}tests: minor fixups for DAMON debugfs interface tests SeongJae Park
2024-10-28 23:30 ` [PATCH 1/6] selftests/damon/huge_count_read_write: provide sufficiently large buffer for DEPRECATED file read SeongJae Park
2024-10-28 23:30 ` [PATCH 2/6] selftests/damon/huge_count_read_write: remove unnecessary debugging message SeongJae Park
2024-10-28 23:30 ` [PATCH 3/6] selftests/damon/_debugfs_common: hide expected error message from test_write_result() SeongJae Park
2024-10-28 23:30 ` SeongJae Park [this message]
2024-10-28 23:30 ` [PATCH 5/6] mm/damon/Kconfig: update DBGFS_KUNIT prompt copy for SYSFS_KUNIT SeongJae Park
2024-10-28 23:30 ` [PATCH 6/6] mm/damon/tests/dbgfs-kunit: fix the header double inclusion guarding ifdef comment SeongJae Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241028233058.283381-5-sj@kernel.org \
--to=sj@kernel.org \
--cc=akpm@linux-foundation.org \
--cc=damon@lists.linux.dev \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shuah@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox