Fix shift blowup without arguments

This commit is contained in:
Ciro Santilli
2025-05-01 12:28:16 +01:00
parent ea7275d35b
commit c3a6c7e85b
5 changed files with 5 additions and 5 deletions

View File

@@ -2,7 +2,7 @@
set -e
f=/sys/kernel/debug/lkmc_seq_file_single_open
mod="${1:-seq_file_single_open.ko}"
shift
[ $# -gt 1] && shift
insmod "$mod" "$@"
[ "$(cat "$f")" = "$(printf 'ab\ncd\n')" ]
[ "$(dd if="$f" bs=1 count=3 skip=1)" = "$(printf "b\nc\n")" ]