]> granicus.if.org Git - strace/blob - tests/alarm.c
2dd43ea24ba563283cd5ff00ad29593b8628874a
[strace] / tests / alarm.c
1 /*
2  * This file is part of alarm strace test.
3  *
4  * Copyright (c) 2016 Dmitry V. Levin <ldv@altlinux.org>
5  * All rights reserved.
6  *
7  * SPDX-License-Identifier: GPL-2.0-or-later
8  */
9
10 #include "tests.h"
11 #include <asm/unistd.h>
12
13 #ifdef __NR_alarm
14
15 # include <stdio.h>
16 # include <unistd.h>
17
18 int
19 main(void)
20 {
21         int rc = syscall(__NR_alarm, (unsigned long) 0xffffffff0000002aULL);
22         printf("alarm(%u) = %d\n", 42, rc);
23
24         puts("+++ exited with 0 +++");
25         return 0;
26 }
27
28 #else
29
30 SKIP_MAIN_UNDEFINED("__NR_alarm")
31
32 #endif