xref: /linux/tools/testing/selftests/damon/debugfs_rm_non_contexts.sh (revision 780f6a9afe8b0e303406a39f6968cf1daa6c3d51)
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