strace/tests/times-fail.c
Elvira Khabirova 9d77b562d3 tests: add times-fail.test
* tests/times-fail.c: New file.
* tests/times-fail.test: New test.
* tests/Makefile.am (check_PROGRAMS): Add times-fail.
(TESTS): Add times-fail.test.
* tests/.gitignore: Add times-fail.
2015-08-28 08:46:24 +00:00

19 lines
278 B
C

#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
#include <stdio.h>
#include <unistd.h>
#include <sys/syscall.h>
int
main (void)
{
if (syscall(__NR_times, 0x42) != -1)
return 77;
puts("times(0x42) = -1 EFAULT (Bad address)");
puts("+++ exited with 0 +++");
return 0;
}