summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@strace.io>2022-01-15 08:00:00 +0000
committerDmitry V. Levin <ldv@strace.io>2022-01-15 08:00:00 +0000
commite23ddffdcb6845aacd745ed33d37700201c110fb (patch)
treeb2c70835295f00707a4e25661309ac79e42f8c07
parent3ae1903c338d233a8465498e126e7b467f2ec716 (diff)
downloadstrace-e23ddffdcb6845aacd745ed33d37700201c110fb.tar.gz
tests: extend personality designation syntax checks
* tests/filtering_syscall-syntax.test: Repeat some checks also with a correct personality designator.
-rwxr-xr-xtests/filtering_syscall-syntax.test13
1 files changed, 9 insertions, 4 deletions
diff --git a/tests/filtering_syscall-syntax.test b/tests/filtering_syscall-syntax.test
index 0d2a52034..b5f8526e2 100755
--- a/tests/filtering_syscall-syntax.test
+++ b/tests/filtering_syscall-syntax.test
@@ -65,6 +65,8 @@ check_syscall()
check_e "invalid system call '$1'" -e fault="$2:when=4"
}
+pers=$(print_current_personality_designator)
+
for arg in '' , ,, ,,, ; do
check_syscall "$arg" "$arg"
check_syscall "!$arg" "!$arg"
@@ -84,6 +86,7 @@ for arg in -1 -2 -3 -4 -5 \
check_syscall "$arg" "$arg"
check_syscall "$arg" "!$arg"
check_syscall "$arg" "1,$arg"
+ check_syscall "$arg@$pers" "$arg@$pers"
done
for arg in '!chdir' none all; do
@@ -103,10 +106,12 @@ for arg in %desc \
?%not_a_class \
?/non_syscall \
; do
- check_syscall nonsense "$arg,nonsense"
- check_syscall nonsense "!$arg,nonsense"
- check_syscall nonsense "nonsense,$arg"
- check_syscall nonsense "!nonsense,$arg"
+ for pfx in '' '!'; do
+ for token in "$arg" "$arg@$pers"; do
+ check_syscall nonsense "${pfx}$token,nonsense"
+ check_syscall nonsense "${pfx}nonsense,$token"
+ done
+ done
done
check_e_using_grep 'regcomp: \+id: [[:alpha:]].+' -e trace='/+id'