]> granicus.if.org Git - strace/blob - tests/fadvise.h
Update copyright headers
[strace] / tests / fadvise.h
1 /*
2  * Common definitions for fadvise64 and fadvise64_64 tests.
3  *
4  * Copyright (c) 2016 Eugene Syromyatnikov <evgsyr@gmail.com>
5  * Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
6  * Copyright (c) 2016-2018 The strace developers.
7  * All rights reserved.
8  *
9  * SPDX-License-Identifier: GPL-2.0-or-later
10  */
11
12 #ifndef STRACE_TESTS_FADVISE_H
13 #define STRACE_TESTS_FADVISE_H
14
15 # include <limits.h>
16 # include <stdio.h>
17 # include <unistd.h>
18
19 # include "xlat.h"
20 # include "xlat/advise.h"
21
22 static void do_fadvise(long fd, long long offset, long long llen, long advice);
23
24 int
25 main(void)
26 {
27         static const long bogus_fd = (long) 0xfeedf00dbeeffaceULL;
28         static const long long bogus_offset = 0xbadc0dedda7a1057ULL;
29         static const long long bogus_len = 0xbadfaceca7b0d1e5ULL;
30         static const long bogus_advice = (long) 0xf00dfeeddeadca75ULL;
31
32         do_fadvise(bogus_fd, bogus_offset, bogus_len, bogus_advice);
33
34         puts("+++ exited with 0 +++");
35         return 0;
36 }
37
38 #endif /* !STRACE_TESTS_FADVISE_H */