android_mt6572_jiabo/external/strace/tests/uid.test
2025-09-05 16:56:03 +08:00

28 lines
575 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
syscalls=
for n in "getuid$s" "getxuid$s"; do
if $STRACE -e "$n" -h > /dev/null; then
syscalls="$n"
break
fi
done
test -n "$syscalls" ||
fail_ "neither getuid$s nor getxuid$s is supported on this architecture"
syscalls="$syscalls,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