Gleb Fotengauer-Malinovskiy | 3af6aab | 2015-08-14 17:49:27 +0200 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Check readlinkat syscall decoding. |
| 4 | |
| 5 | . "${srcdir=.}/init.sh" |
| 6 | |
Dmitry V. Levin | c633188 | 2015-08-28 08:43:57 +0000 | [diff] [blame] | 7 | syscall=readlinkat |
| 8 | target=$syscall.c |
| 9 | link=$syscall.link |
| 10 | OUT="$LOG.out" |
| 11 | |
| 12 | ln -snf $target $link || |
Gleb Fotengauer-Malinovskiy | 3af6aab | 2015-08-14 17:49:27 +0200 | [diff] [blame] | 13 | framework_skip_ 'failed to create a symlink' |
| 14 | |
Dmitry V. Levin | c633188 | 2015-08-28 08:43:57 +0000 | [diff] [blame] | 15 | run_prog > /dev/null |
| 16 | run_strace -e $syscall -xx -s3 $args > "$OUT" |
| 17 | match_diff "$OUT" "$LOG" |
Gleb Fotengauer-Malinovskiy | 3af6aab | 2015-08-14 17:49:27 +0200 | [diff] [blame] | 18 | |
Dmitry V. Levin | c633188 | 2015-08-28 08:43:57 +0000 | [diff] [blame] | 19 | rm -f -- "$OUT" $link |
Gleb Fotengauer-Malinovskiy | 3af6aab | 2015-08-14 17:49:27 +0200 | [diff] [blame] | 20 | |
| 21 | exit 0 |