xref: /linux/tools/testing/selftests/damon/debugfs_rm_non_contexts.sh (revision e65e175b07bef5974045cc42238de99057669ca7)
1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
3
4source _debugfs_common.sh
5
6# Test putting non-ctx files/dirs to rm_contexts file
7# ===================================================
8
9dmesg -C
10
11for file in "$DBGFS/"*
12do
13	echo "$(basename "$f")" > "$DBGFS/rm_contexts"
14	if dmesg | grep -q BUG
15	then
16		dmesg
17		exit 1
18	fi
19done
20