xref: /linux/tools/testing/selftests/damon/debugfs_empty_targets.sh (revision 24bce201d79807b668bf9d9e0aca801c5c0d5f78)
1#!/bin/bash
2# SPDX-License-Identifier: GPL-2.0
3
4source _debugfs_common.sh
5
6# Test empty targets case
7# =======================
8
9orig_target_ids=$(cat "$DBGFS/target_ids")
10echo "" > "$DBGFS/target_ids"
11orig_monitor_on=$(cat "$DBGFS/monitor_on")
12test_write_fail "$DBGFS/monitor_on" "on" "orig_monitor_on" "empty target ids"
13echo "$orig_target_ids" > "$DBGFS/target_ids"
14