mirror of
https://github.com/torvalds/linux.git
synced 2025-12-07 20:06:24 +00:00
selftests/damon/sysfs: hide expected write failures
DAMON selftests for sysfs (sysfs.sh) tests if some writes to DAMON sysfs interface files fails as expected. It makes the test results noisy with the failure error message because it tests a number of such failures. Redirect the expected failure error messages to /dev/null to make the results clean. Link: https://lkml.kernel.org/r/20230110190400.119388-8-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>
This commit is contained in:
committed by
Andrew Morton
parent
2d2230efbc
commit
16ddcb1549
@@ -24,7 +24,7 @@ ensure_write_fail()
|
||||
content=$2
|
||||
reason=$3
|
||||
|
||||
if echo "$content" > "$file"
|
||||
if (echo "$content" > "$file") 2> /dev/null
|
||||
then
|
||||
echo "writing $content to $file succeed ($fail_reason)"
|
||||
echo "expected failure because $reason"
|
||||
|
||||
Reference in New Issue
Block a user