2 # SPDX-License-Identifier: GPL-2.0
11 if [ "$expected" = "0" ]
13 echo "$content" > "$file"
15 echo "$content" > "$file" 2> /dev
/null
17 if [ $?
-ne "$expected" ]
19 echo "writing $content to $file doesn't return $expected"
20 echo "expected because: $expect_reason"
21 echo "$orig_content" > "$file"
27 test_write_result
"$1" "$2" "$3" "$4" 0
31 test_write_result
"$1" "$2" "$3" "$4" 1
40 content
=$
(cat "$file")
41 if [ "$content" != "$expected" ]
43 echo "reading $file expected $expected but $content"
44 echo "expected because: $expect_reason"
45 echo "$orig_content" > "$file"
50 source .
/_chk_dependency.sh
52 damon_onoff
="$DBGFS/monitor_on"
53 if [ -f "$DBGFS/monitor_on_DEPRECATED" ]
55 damon_onoff
="$DBGFS/monitor_on_DEPRECATED"
57 damon_onoff
="$DBGFS/monitor_on"
60 if [ $
(cat "$damon_onoff") = "on" ]
62 echo "monitoring is on"