162306a36Sopenharmony_ci#!/bin/bash 262306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 362306a36Sopenharmony_ci 462306a36Sopenharmony_cisource _debugfs_common.sh 562306a36Sopenharmony_ci 662306a36Sopenharmony_ci# Test attrs file 762306a36Sopenharmony_ci# =============== 862306a36Sopenharmony_ci 962306a36Sopenharmony_cifile="$DBGFS/attrs" 1062306a36Sopenharmony_ciorig_content=$(cat "$file") 1162306a36Sopenharmony_ci 1262306a36Sopenharmony_citest_write_succ "$file" "1 2 3 4 5" "$orig_content" "valid input" 1362306a36Sopenharmony_citest_write_fail "$file" "1 2 3 4" "$orig_content" "no enough fields" 1462306a36Sopenharmony_citest_write_fail "$file" "1 2 3 5 4" "$orig_content" \ 1562306a36Sopenharmony_ci "min_nr_regions > max_nr_regions" 1662306a36Sopenharmony_citest_content "$file" "$orig_content" "1 2 3 4 5" "successfully written" 1762306a36Sopenharmony_ciecho "$orig_content" > "$file" 18