Home | History | Annotate | Download | only in tests
      1 #!/bin/sh
      2 
      3 # Check uid decoding.
      4 
      5 . "${srcdir=.}/init.sh"
      6 
      7 s="${uid_syscall_suffix-}"
      8 w="${uid_t_size-}"
      9 
     10 run_prog ./uid$s$w
     11 
     12 syscalls=
     13 for n in "getuid$s" "getxuid$s"; do
     14 	if $STRACE -e "$n" -h > /dev/null; then
     15 		syscalls="$n"
     16 		break
     17 	fi
     18 done
     19 test -n "$syscalls" ||
     20         fail_ "neither getuid$s nor getxuid$s is supported on this architecture"
     21 
     22 syscalls="$syscalls,setuid$s,getresuid$s,setreuid$s,setresuid$s,fchown$s,getgroups$s"
     23 run_strace -e trace="$syscalls" $args
     24 
     25 AWK=gawk
     26 match_awk "$LOG" "$srcdir"/uid.awk "$STRACE $args output mismatch" -v suffix="$s"
     27 
     28 exit 0
     29