xref: /linux/tools/testing/selftests/damon/debugfs_rm_non_contexts.sh (revision 266679ffd867cb247c36717ea4d7998e9304823b)
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") &> /dev/null
14	if dmesg | grep -q BUG
15	then
16		dmesg
17		exit 1
18	fi
19done
20