debugfs_attrs.sh 488 B

1234567891011121314151617
  1. #!/bin/bash
  2. # SPDX-License-Identifier: GPL-2.0
  3. source _debugfs_common.sh
  4. # Test attrs file
  5. # ===============
  6. file="$DBGFS/attrs"
  7. orig_content=$(cat "$file")
  8. test_write_succ "$file" "1 2 3 4 5" "$orig_content" "valid input"
  9. test_write_fail "$file" "1 2 3 4" "$orig_content" "no enough fields"
  10. test_write_fail "$file" "1 2 3 5 4" "$orig_content" \
  11. "min_nr_regions > max_nr_regions"
  12. test_content "$file" "$orig_content" "1 2 3 4 5" "successfully written"
  13. echo "$orig_content" > "$file"