brintos

brintos / linux-shallow public Read only

0
0
Text · 671 B · 49aeabd Raw
20 lines · bash
1#!/bin/bash2# SPDX-License-Identifier: GPL-2.03 4source _debugfs_common.sh5 6# Test target_ids file7# ====================8 9file="$DBGFS/target_ids"10orig_content=$(cat "$file")11 12test_write_succ "$file" "1 2 3 4" "$orig_content" "valid input"13test_write_succ "$file" "1 2 abc 4" "$orig_content" "still valid input"14test_content "$file" "$orig_content" "1 2" "non-integer was there"15test_write_succ "$file" "abc 2 3" "$orig_content" "the file allows wrong input"16test_content "$file" "$orig_content" "" "wrong input written"17test_write_succ "$file" "" "$orig_content" "empty input"18test_content "$file" "$orig_content" "" "empty input written"19echo "$orig_content" > "$file"20