linux/tools/testing/selftests/damon/debugfs_rm_non_contexts.sh
SeongJae Park 75cb348714 selftests/damon/debugfs_rm_non_contexts: hide expected write error messages
A selftest case for DAMON debugfs interface has a test for expected
failure.  To make the test output clean, hide the expected failure error
message.

Link: https://lkml.kernel.org/r/20230110190400.119388-9-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>
2023-02-02 22:32:52 -08:00

20 lines
339 B
Bash

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
source _debugfs_common.sh
# Test putting non-ctx files/dirs to rm_contexts file
# ===================================================
dmesg -C
for file in "$DBGFS/"*
do
(echo "$(basename "$f")" > "$DBGFS/rm_contexts") &> /dev/null
if dmesg | grep -q BUG
then
dmesg
exit 1
fi
done