xref: /kernel/linux/linux-6.6/tools/testing/selftests/damon/debugfs_schemes.sh
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-6.6/tools/testing/selftests/damon/
162306a36Sopenharmony_ci#!/bin/bash
262306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
362306a36Sopenharmony_ci
462306a36Sopenharmony_cisource _debugfs_common.sh
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci# Test schemes file
762306a36Sopenharmony_ci# =================
862306a36Sopenharmony_ci
962306a36Sopenharmony_cifile="$DBGFS/schemes"
1062306a36Sopenharmony_ciorig_content=$(cat "$file")
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_citest_write_succ "$file" "1 2 3 4 5 6 4 0 0 0 1 2 3 1 100 3 2 1" \
1362306a36Sopenharmony_ci	"$orig_content" "valid input"
1462306a36Sopenharmony_citest_write_fail "$file" "1 2
1562306a36Sopenharmony_ci3 4 5 6 3 0 0 0 1 2 3 1 100 3 2 1" "$orig_content" "multi lines"
1662306a36Sopenharmony_citest_write_succ "$file" "" "$orig_content" "disabling"
1762306a36Sopenharmony_citest_write_fail "$file" "2 1 2 1 10 1 3 10 1 1 1 1 1 1 1 1 2 3" \
1862306a36Sopenharmony_ci	"$orig_content" "wrong condition ranges"
1962306a36Sopenharmony_ciecho "$orig_content" > "$file"
20

Indexes created Thu Nov 07 10:32:03 CST 2024