Dmitry V. Levin
8ef543929a
Make the test work on alpha that has getxuid syscall instead of getuid. * tests/uid.awk (BEGIN): Update getuid regexp to match both getuid and getxuid syscalls. * tests/uid.c (main): Allow __NR_getxuid as an alternative to __NR_getuid. * tests/uid.test: If getuid syscall is not available, probe for getxuid syscall.
29 lines
575 B
Bash
Executable File
29 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
|