Dmitry V. Levin | 7b01014 | 2015-01-07 19:30:37 +0000 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | # Check verbose decoding of 64-bit stat syscall. |
| 4 | |
| 5 | . "${srcdir=.}/init.sh" |
| 6 | |
Dmitry V. Levin | 8f54664 | 2015-03-17 17:07:57 +0000 | [diff] [blame] | 7 | run_prog ./stat . > /dev/null |
| 8 | |
Dmitry V. Levin | 7b01014 | 2015-01-07 19:30:37 +0000 | [diff] [blame] | 9 | check_prog dd |
Dmitry V. Levin | 7b01014 | 2015-01-07 19:30:37 +0000 | [diff] [blame] | 10 | check_prog touch |
| 11 | |
| 12 | OUT="$LOG.out" |
| 13 | size=46118400000 |
| 14 | sample=stat64_sample |
| 15 | |
| 16 | umask 022 |
Dmitry V. Levin | 8f54664 | 2015-03-17 17:07:57 +0000 | [diff] [blame] | 17 | run_prog_skip_if_failed \ |
| 18 | dd seek=$size bs=1 count=0 if=/dev/null of=$sample |
Dmitry V. Levin | 7b01014 | 2015-01-07 19:30:37 +0000 | [diff] [blame] | 19 | |
Dmitry V. Levin | 8f54664 | 2015-03-17 17:07:57 +0000 | [diff] [blame] | 20 | run_prog_skip_if_failed \ |
| 21 | touch -d '1970-01-01 -42 seconds' $sample |
Dmitry V. Levin | 7b01014 | 2015-01-07 19:30:37 +0000 | [diff] [blame] | 22 | |
| 23 | for f in $sample . /dev/null; do |
Dmitry V. Levin | 8f54664 | 2015-03-17 17:07:57 +0000 | [diff] [blame] | 24 | run_strace -v -efile ./stat $f > "$OUT" |
| 25 | match_grep "$LOG" "$OUT" |
Dmitry V. Levin | 7b01014 | 2015-01-07 19:30:37 +0000 | [diff] [blame] | 26 | done |
| 27 | |
| 28 | rm -f $sample "$OUT" |
| 29 | |
| 30 | exit 0 |