blob: a8122f01219806e3d11a5b5127752b660910eeba [file] [log] [blame]
Dmitry V. Levin7b010142015-01-07 19:30:37 +00001#!/bin/sh
2
3# Check verbose decoding of 64-bit stat syscall.
4
5. "${srcdir=.}/init.sh"
6
Dmitry V. Levin8f546642015-03-17 17:07:57 +00007run_prog ./stat . > /dev/null
8
Dmitry V. Levin7b010142015-01-07 19:30:37 +00009check_prog dd
Dmitry V. Levin7b010142015-01-07 19:30:37 +000010check_prog touch
11
12OUT="$LOG.out"
13size=46118400000
14sample=stat64_sample
15
16umask 022
Dmitry V. Levin8f546642015-03-17 17:07:57 +000017run_prog_skip_if_failed \
18 dd seek=$size bs=1 count=0 if=/dev/null of=$sample
Dmitry V. Levin7b010142015-01-07 19:30:37 +000019
Dmitry V. Levin8f546642015-03-17 17:07:57 +000020run_prog_skip_if_failed \
21 touch -d '1970-01-01 -42 seconds' $sample
Dmitry V. Levin7b010142015-01-07 19:30:37 +000022
23for f in $sample . /dev/null; do
Dmitry V. Levin8f546642015-03-17 17:07:57 +000024 run_strace -v -efile ./stat $f > "$OUT"
25 match_grep "$LOG" "$OUT"
Dmitry V. Levin7b010142015-01-07 19:30:37 +000026done
27
28rm -f $sample "$OUT"
29
30exit 0