strace/tests/uid.test
Dmitry V. Levin 2720a61832 alpha: enhance decoding of getxpid, getxuid, and getxgid syscalls
Print the second return value of getxpid, getxuid, and getxgid syscalls
that return a pair of values using the same mechanism as pipe syscall.

* alpha.c: New file.
* Makefile.am (strace_SOURCES): Add it.
* linux/alpha/syscallent.h [20]: Change SEN(getpid) to SEN(getxpid).
[24]: Change SEN(getuid) to SEN(getxuid).
[47]: Change SEN(getgid) to SEN(getxgid).
* NEWS: Mention this enhancement.
* tests/uid.awk: Update for getxgid output change.
* tests/uid.test: Cleanup.
* tests/getxxid.c: New file.
* tests/getxxid.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add getxxid.
(TESTS): Add getxxid.test.
* tests/.gitignore: Add getxxid.
2016-01-09 00:09:04 +00:00

24 lines
426 B
Bash
Executable File

#!/bin/sh
# Check uid decoding.
. "${srcdir=.}/init.sh"
s="${uid_syscall_suffix-}"
w="${uid_t_size-}"
run_prog ./uid$s$w
case "$STRACE_ARCH" in
alpha) getuid=getxuid ;;
*) getuid=getuid ;;
esac
syscalls="$getuid$s,setuid$s,getresuid$s,setreuid$s,setresuid$s,fchown$s,getgroups$s"
run_strace -e trace="$syscalls" $args
AWK=gawk
match_awk "$LOG" "$srcdir"/uid.awk "$STRACE $args output mismatch" -v suffix="$s"
exit 0