strace/tests/acct.c
Dmitry V. Levin dd02f09f4b tests: cleanup acct.test
* tests/acct.c (main): Use errno2name, stop using assert,
change sample file name.
* tests/acct.test: Update.
2016-04-21 20:20:42 +00:00

29 lines
412 B
C

#include "tests.h"
#include <sys/syscall.h>
#ifdef __NR_acct
# include <assert.h>
# include <errno.h>
# include <stdio.h>
# include <unistd.h>
int
main(void)
{
const char sample[] = "acct_sample";
long rc = syscall(__NR_acct, sample);
printf("acct(\"%s\") = %ld %s (%m)\n",
sample, rc, errno2name());
puts("+++ exited with 0 +++");
return 0;
}
#else
SKIP_MAIN_UNDEFINED("__NR__acct")
#endif