mirror of
https://github.com/torvalds/linux.git
synced 2026-05-22 14:12:07 +02:00
selftests/damon/_debugfs_common: hide expected error message from test_write_result()
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.
Link: https://lkml.kernel.org/r/20241028233058.283381-4-sj@kernel.org
Fixes: b348eb7abd ("mm/damon: add user space selftests")
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>
This commit is contained in:
parent
e06a6b55ed
commit
82475d111d
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user