1 #!/bin/bash 2 # SPDX-License-Identifier: GPL-2.0 3 4 source _debugfs_common.sh 5 6 # Test target_ids file 7 # ==================== 8 9 file="$DBGFS/target_ids" 10 orig_content=$(cat "$file") 11 12 test_write_succ "$file" "1 2 3 4" "$orig_content" "valid input" 13 test_write_succ "$file" "1 2 abc 4" "$orig_content" "still valid input" 14 test_content "$file" "$orig_content" "1 2" "non-integer was there" 15 test_write_succ "$file" "abc 2 3" "$orig_content" "the file allows wrong input" 16 test_content "$file" "$orig_content" "" "wrong input written" 17 test_write_succ "$file" "" "$orig_content" "empty input" 18 test_content "$file" "$orig_content" "" "empty input written" 19 echo "$orig_content" > "$file"
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.