tests: add ksysent.test

Check that syscall names and numbers defined in syscallent files
match kernel __NR_* constants defined by <asm/unistd.h>.

Tested on various platforms, including the following combinations
of architectures and kernel headers:

x86_64: 4.4-rc, 4.3, 4.2, 4.1, 3.19, 3.17, 3.16, 3.12, 3.11,
3.10-rhel, 2.6.32-rhel, 2.6.27-sle, 2.6.18-rhel
i386: 4.4-rc, 4.3, 4.2, 4.1, 3.19, 3.17, 3.16, 3.11,
3.10-rhel, 2.6.32-rhel, 2.6.27-sle, 2.6.18-rhel
aarch64: 4.4-rc
alpha: 4.3
arm eabi: 4.4-rc, 4.2, 4.1
hppa: 3.18
ia64: 3.18
mips o32: 4.1
ppc: 3.18
ppc64: 3.10-rhel, 2.6.32-rhel
s390: 3.18
s390x: 3.18
sparc: 4.1
sparc: 3.18
x32: 3.19

The only platform which is known at this moment to fail the test
is CentOS-5 provided by OBS.  On x86_64 instance it fails with
error: "prlimit64" syscall #300 is "fanotify_init" in syscallent.h
and on i586 it similarly fails with
error: "prlimit64" syscall #338 is "fanotify_init" in syscallent.h
So this is a real platform bug that is not likely to be worked around
on the strace side.

* tests/ksysent.c: New file.
* tests/ksysent.sed: Likewise.
* tests/ksysent.test: New test.
* tests/Makefile.am (AM_CPPFLAGS): Add -I$(builddir).
(check_PROGRAMS): Add ksysent.
(TESTS): Add ksysent.test.
(EXTRA_DIST): Add ksysent.sed.
(ksysent.h): New rule.
(BUILT_SOURCES, CLEANFILES): Add ksysent.h.
* tests/.gitignore: Add ksysent.
5 files changed
tree: 0aeec6f3e12bc49483e0804edf14d517f5e8ade1
  1. debian/
  2. linux/
  3. m4/
  4. maint/
  5. qemu_multiarch_testing/
  6. test/
  7. tests/
  8. xlat/
  9. .gitignore
  10. .mailmap
  11. .travis.yml
  12. access.c
  13. affinity.c
  14. aio.c
  15. AUTHORS
  16. bjm.c
  17. block.c
  18. bootstrap
  19. bpf.c
  20. build_static_example.sh
  21. cacheflush.c
  22. capability.c
  23. caps0.h
  24. caps1.h
  25. ChangeLog-CVS
  26. chdir.c
  27. chmod.c
  28. clone.c
  29. configure.ac
  30. COPYING
  31. count.c
  32. CREDITS.in
  33. defs.h
  34. desc.c
  35. dirent.c
  36. dirent64.c
  37. empty.h
  38. epoll.c
  39. errnoent.sh
  40. evdev.c
  41. eventfd.c
  42. execve.c
  43. exit.c
  44. fadvise.c
  45. fallocate.c
  46. fanotify.c
  47. fchownat.c
  48. fcntl.c
  49. fetch_seccomp_fprog.c
  50. fetch_struct_flock.c
  51. file.c
  52. file_handle.c
  53. flock.c
  54. flock.h
  55. futex.c
  56. generate_mpers_am.sh
  57. generate_sen.sh
  58. generate_xlat_in.sh
  59. get_robust_list.c
  60. getcpu.c
  61. getcwd.c
  62. getrandom.c
  63. git-set-file-times
  64. git-version-gen
  65. gitlog-to-changelog
  66. HACKING-scripts
  67. hostname.c
  68. inotify.c
  69. INSTALL
  70. io.c
  71. ioctl.c
  72. ioctlsort.c
  73. ioperm.c
  74. iopl.c
  75. ioprio.c
  76. ipc_defs.h
  77. ipc_msg.c
  78. ipc_msgctl.c
  79. ipc_sem.c
  80. ipc_shm.c
  81. ipc_shmctl.c
  82. kcmp.c
  83. kernel_types.h
  84. kexec.c
  85. keyctl.c
  86. ldt.c
  87. link.c
  88. lookup_dcookie.c
  89. loop.c
  90. lseek.c
  91. make-dist
  92. Makefile.am
  93. mem.c
  94. membarrier.c
  95. memfd_create.c
  96. mknod.c
  97. mount.c
  98. mpers.awk
  99. mpers.sh
  100. mpers_test.sh
  101. mpers_type.h
  102. mq.c
  103. mtd.c
  104. native_defs.h
  105. net.c
  106. NEWS
  107. open.c
  108. or1k_atomic.c
  109. pathtrace.c
  110. perf.c
  111. personality.c
  112. poll.c
  113. prctl.c
  114. print_mq_attr.c
  115. print_msgbuf.c
  116. print_sigevent.c
  117. print_time.c
  118. print_timex.c
  119. printmode.c
  120. printrusage.c
  121. printsiginfo.c
  122. printsiginfo.h
  123. printstat.h
  124. process.c
  125. process_vm.c
  126. ptp.c
  127. ptrace.h
  128. quota.c
  129. readahead.c
  130. readlink.c
  131. README
  132. README-hacking
  133. README-linux-ptrace
  134. README-mpers
  135. reboot.c
  136. regs.h
  137. renameat.c
  138. resource.c
  139. rtc.c
  140. sched.c
  141. scsi.c
  142. seccomp.c
  143. seccomp_fprog.h
  144. sendfile.c
  145. sigaltstack.c
  146. signal.c
  147. signalent.sh
  148. signalfd.c
  149. sigreturn.c
  150. sock.c
  151. socketutils.c
  152. sram_alloc.c
  153. statfs.c
  154. strace-graph
  155. strace-log-merge
  156. strace.1
  157. strace.c
  158. strace.spec
  159. swapon.c
  160. sync_file_range.c
  161. syscall.c
  162. syscallent.sh
  163. sysctl.c
  164. sysinfo.c
  165. syslog.c
  166. sysmips.c
  167. term.c
  168. time.c
  169. times.c
  170. travis-ci.sh
  171. truncate.c
  172. uid.c
  173. uid16.c
  174. umask.c
  175. umount.c
  176. uname.c
  177. unwind.c
  178. userfaultfd.c
  179. util.c
  180. utime.c
  181. utimes.c
  182. v4l2.c
  183. vsprintf.c
  184. wait.c
  185. xattr.c
  186. xlate.el
  187. xmalloc.c