Skip to content

Commit

Permalink
selftests/damon: add 'schemes' debugfs tests
Browse files Browse the repository at this point in the history
This adds simple selftets for 'schemes' debugfs file of DAMON.

Link: https://lkml.kernel.org/r/[email protected]
Signed-off-by: SeongJae Park <[email protected]>
Cc: Amit Shah <[email protected]>
Cc: Benjamin Herrenschmidt <[email protected]>
Cc: David Hildenbrand <[email protected]>
Cc: David Rienjes <[email protected]>
Cc: David Woodhouse <[email protected]>
Cc: Greg Thelen <[email protected]>
Cc: Jonathan Cameron <[email protected]>
Cc: Jonathan Corbet <[email protected]>
Cc: Leonard Foerster <[email protected]>
Cc: Marco Elver <[email protected]>
Cc: Markus Boehme <[email protected]>
Cc: Shakeel Butt <[email protected]>
Cc: Shuah Khan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
sjp38 authored and torvalds committed Nov 6, 2021
1 parent 2f0b548 commit 8d5d4c6
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tools/testing/selftests/damon/debugfs_attrs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,19 @@ test_write_fail "$file" "1 2 3 5 4" "$orig_content" \
test_content "$file" "$orig_content" "1 2 3 4 5" "successfully written"
echo "$orig_content" > "$file"

# Test schemes file
# =================

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

test_write_succ "$file" "1 2 3 4 5 6 4" \
"$orig_content" "valid input"
test_write_fail "$file" "1 2
3 4 5 6 3" "$orig_content" "multi lines"
test_write_succ "$file" "" "$orig_content" "disabling"
echo "$orig_content" > "$file"

# Test target_ids file
# ====================

Expand Down

0 comments on commit 8d5d4c6

Please sign in to comment.