Commit 859de149 authored by SeongJae Park's avatar SeongJae Park Committed by Andrew Morton
Browse files

selftests/damon: remove tests for DAMON debugfs interface

It's time to remove DAMON debugfs interface, which has deprecated long
before in February 2023.  Read the cover letter of this patch series for
more details.

Remove selftests for the interface, to prevent causing unnecessary test
failures.

Link: https://lkml.kernel.org/r/20250106191941.107070-6-sj@kernel.org


Signed-off-by: default avatarSeongJae Park <sj@kernel.org>
Cc: Alex Shi <alexs@kernel.org>
Cc: Brendan Higgins <brendan.higgins@linux.dev>
Cc: David Gow <davidgow@google.com>
Cc: Hu Haowen <2023002089@link.tyut.edu.cn>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Rae Moar <rmoar@google.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Yanteng Si <si.yanteng@linux.dev>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent ce1d7502
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
huge_count_read_write
debugfs_target_ids_read_before_terminate_race
debugfs_target_ids_pid_leak
access_memory
access_memory_even
+1 −10
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0
# Makefile for damon selftests

TEST_GEN_FILES += huge_count_read_write
TEST_GEN_FILES += debugfs_target_ids_read_before_terminate_race
TEST_GEN_FILES += debugfs_target_ids_pid_leak
TEST_GEN_FILES += access_memory access_memory_even

TEST_FILES = _chk_dependency.sh _debugfs_common.sh _damon_sysfs.py
TEST_FILES = _chk_dependency.sh _damon_sysfs.py

# functionality tests
TEST_PROGS = debugfs_attrs.sh debugfs_schemes.sh debugfs_target_ids.sh
TEST_PROGS += sysfs.sh
TEST_PROGS += sysfs_update_schemes_tried_regions_wss_estimation.py
TEST_PROGS += damos_quota.py damos_quota_goal.py damos_apply_interval.py
@@ -17,11 +13,6 @@ TEST_PROGS += damos_tried_regions.py damon_nr_regions.py
TEST_PROGS += reclaim.sh lru_sort.sh

# regression tests (reproducers of previously found bugs)
TEST_PROGS += debugfs_empty_targets.sh debugfs_huge_count_read_write.sh
TEST_PROGS += debugfs_duplicate_context_creation.sh
TEST_PROGS += debugfs_rm_non_contexts.sh
TEST_PROGS += debugfs_target_ids_read_before_terminate_race.sh
TEST_PROGS += debugfs_target_ids_pid_leak.sh
TEST_PROGS += sysfs_update_removed_scheme_dir.sh
TEST_PROGS += sysfs_update_schemes_tried_regions_hang.py

+0 −17
Original line number Diff line number Diff line
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0

source _debugfs_common.sh

# Test attrs file
# ===============

file="$DBGFS/attrs"
orig_content=$(cat "$file")

test_write_succ "$file" "1 2 3 4 5" "$orig_content" "valid input"
test_write_fail "$file" "1 2 3 4" "$orig_content" "no enough fields"
test_write_fail "$file" "1 2 3 5 4" "$orig_content" \
	"min_nr_regions > max_nr_regions"
test_content "$file" "$orig_content" "1 2 3 4 5" "successfully written"
echo "$orig_content" > "$file"
+0 −27
Original line number Diff line number Diff line
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0

source _debugfs_common.sh

# Test duplicated context creation
# ================================

if ! echo foo > "$DBGFS/mk_contexts"
then
	echo "context creation failed"
	exit 1
fi

if echo foo > "$DBGFS/mk_contexts" 2> /dev/null
then
	echo "duplicate context creation success"
	exit 1
fi

if ! echo foo > "$DBGFS/rm_contexts"
then
	echo "context deletion failed"
	exit 1
fi

exit 0
+0 −21
Original line number Diff line number Diff line
#!/bin/bash
# SPDX-License-Identifier: GPL-2.0

source _debugfs_common.sh

# Test empty targets case
# =======================

orig_target_ids=$(cat "$DBGFS/target_ids")
echo "" > "$DBGFS/target_ids"

if [ -f "$DBGFS/monitor_on_DEPRECATED" ]
then
	monitor_on_file="$DBGFS/monitor_on_DEPRECATED"
else
	monitor_on_file="$DBGFS/monitor_on"
fi

orig_monitor_on=$(cat "$monitor_on_file")
test_write_fail "$monitor_on_file" "on" "orig_monitor_on" "empty target ids"
echo "$orig_target_ids" > "$DBGFS/target_ids"
Loading