]> granicus.if.org Git - strace/blob - tests/oldstat.c
strace: terminate itself if interrupted by a signal
[strace] / tests / oldstat.c
1 /*
2  * Check decoding of oldstat syscall.
3  *
4  * Copyright (c) 2015-2016 Dmitry V. Levin <ldv@altlinux.org>
5  * Copyright (c) 2016 Eugene Syromyatnikov <evgsyr@gmail.com>
6  * Copyright (c) 2016-2017 The strace developers.
7  * All rights reserved.
8  *
9  * SPDX-License-Identifier: GPL-2.0-or-later
10  */
11
12 #include "tests.h"
13 #include <asm/unistd.h>
14
15 #if defined __NR_oldstat && HAVE_STRUCT___OLD_KERNEL_STAT
16
17 # define OLD_STAT 1
18 # define TEST_SYSCALL_NR __NR_oldstat
19 # define TEST_SYSCALL_STR "oldstat"
20 # define STRUCT_STAT struct __old_kernel_stat
21 # define STRUCT_STAT_STR "struct __old_kernel_stat"
22 # define STRUCT_STAT_IS_STAT64 0
23 # define SAMPLE_SIZE ((libc_off_t) (kernel_ulong_t) 131478418U)
24 # include "lstatx.c"
25
26 #else
27
28 SKIP_MAIN_UNDEFINED("__NR_oldstat && HAVE_STRUCT___OLD_KERNEL_STAT")
29
30 #endif