linux/tools/testing/selftests/damon/debugfs_target_ids.sh
Juntong Deng 18378b0e49 selftests/damon: Add executable permission to test scripts
When running the test for the damon subsystem, there are a lot of
warnings because test scripts do not have executable permission,
for example:

Warning: file debugfs_attrs.sh is not executable
Warning: file debugfs_schemes.sh is not executable
Warning: file debugfs_target_ids.sh is not executable
...

This patch adds executable permission to test scripts to eliminate
these warnings.

Signed-off-by: Juntong Deng <juntong.deng@outlook.com>
Reviewed-by: SeongJae Park <sj@kernel.org>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2023-09-26 19:24:44 -06:00

20 lines
671 B
Bash
Executable File

#!/bin/bash
# SPDX-License-Identifier: GPL-2.0
source _debugfs_common.sh
# Test target_ids file
# ====================
file="$DBGFS/target_ids"
orig_content=$(cat "$file")
test_write_succ "$file" "1 2 3 4" "$orig_content" "valid input"
test_write_succ "$file" "1 2 abc 4" "$orig_content" "still valid input"
test_content "$file" "$orig_content" "1 2" "non-integer was there"
test_write_succ "$file" "abc 2 3" "$orig_content" "the file allows wrong input"
test_content "$file" "$orig_content" "" "wrong input written"
test_write_succ "$file" "" "$orig_content" "empty input"
test_content "$file" "$orig_content" "" "empty input written"
echo "$orig_content" > "$file"