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