9ab3b0c8ef
Currently, the single test program, debugfs.sh, contains all test cases for DAMON. When one of the cases fails, finding which case is failed from the test log is not so easy, and all remaining tests will be skipped. To improve the situation, this commit splits the single program into small test programs having their own names. Link: https://lkml.kernel.org/r/20211201150440.1088-12-sj@kernel.org Signed-off-by: SeongJae Park <sj@kernel.org> Cc: Brendan Higgins <brendanhiggins@google.com> Cc: Shuah Khan <shuah@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
20 lines
552 B
Bash
20 lines
552 B
Bash
#!/bin/bash
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
source _debugfs_common.sh
|
|
|
|
# Test schemes file
|
|
# =================
|
|
|
|
file="$DBGFS/schemes"
|
|
orig_content=$(cat "$file")
|
|
|
|
test_write_succ "$file" "1 2 3 4 5 6 4 0 0 0 1 2 3 1 100 3 2 1" \
|
|
"$orig_content" "valid input"
|
|
test_write_fail "$file" "1 2
|
|
3 4 5 6 3 0 0 0 1 2 3 1 100 3 2 1" "$orig_content" "multi lines"
|
|
test_write_succ "$file" "" "$orig_content" "disabling"
|
|
test_write_fail "$file" "2 1 2 1 10 1 3 10 1 1 1 1 1 1 1 1 2 3" \
|
|
"$orig_content" "wrong condition ranges"
|
|
echo "$orig_content" > "$file"
|