blob: 9c5a97f8fbd225b790767185314b5d8236b948a3 [file] [log] [blame]
Dmitry V. Levin1da7c952014-12-13 18:24:13 +00001#!/bin/sh
2
3# Check uid decoding.
4
5. "${srcdir=.}/init.sh"
6
Dmitry V. Levin1da7c952014-12-13 18:24:13 +00007s="${uid_syscall_suffix-}"
8w="${uid_t_size-}"
Dmitry V. Levin8f546642015-03-17 17:07:57 +00009
10run_prog ./uid$s$w
Dmitry V. Levin1da7c952014-12-13 18:24:13 +000011
Dmitry V. Levin2720a612016-01-09 00:06:06 +000012case "$STRACE_ARCH" in
13 alpha) getuid=getxuid ;;
14 *) getuid=getuid ;;
15esac
Dmitry V. Levin8ef54392015-07-16 09:09:11 +000016
Dmitry V. Levin2720a612016-01-09 00:06:06 +000017syscalls="$getuid$s,setuid$s,getresuid$s,setreuid$s,setresuid$s,fchown$s,getgroups$s"
Dmitry V. Levin8f546642015-03-17 17:07:57 +000018run_strace -e trace="$syscalls" $args
Dmitry V. Levin1da7c952014-12-13 18:24:13 +000019
Dmitry V. Levin8f546642015-03-17 17:07:57 +000020AWK=gawk
21match_awk "$LOG" "$srcdir"/uid.awk "$STRACE $args output mismatch" -v suffix="$s"
Dmitry V. Levin1da7c952014-12-13 18:24:13 +000022
23exit 0