tools headers UAPI: Sync openat2.h with the kernel sources
[linux-2.6-microblaze.git] / tools / testing / selftests / safesetid / safesetid-test.sh
1 #!/bin/bash
2
3 TCID="safesetid-test.sh"
4 errcode=0
5
6 # Kselftest framework requirement - SKIP code is 4.
7 ksft_skip=4
8
9 check_root()
10 {
11         uid=$(id -u)
12         if [ $uid -ne 0 ]; then
13                 echo $TCID: must be run as root >&2
14                 exit $ksft_skip
15         fi
16 }
17
18 main_function()
19 {
20   check_root
21   ./safesetid-test
22 }
23
24 main_function
25 echo "$TCID: done"
26 exit $errcode