Initial Porting of accept4() syscall test to LTP by Subrata Modak <subrata@linux.vnet.ibm.com>. Originally written by Michael Kerrisk <mtk.manpages@gmail.com>. Later modified to suite compilation on different systems by Jiri Palecek <jpalecek@web.de>, who wrote the following:
I have some nitpicks, in decreasing severity:
First, the syscall, I believe, is not targeted at i386 and x86-64 only. Therefore, it is not wise to have these explicitly mentioned in the code. Also, it would be better not to "#error" if the arch isn't one of those fortunate, because ltp should build on others too. This should be fixed by patch 1. Disclaimer: This patch should make it compile (and fail at runtime with TCONF) on all kernels that don't have the syscall, and actually run the test on all kernels that do, depending on kernel headers version. However, I didn't test this (especially the selection of the syscall), so it needs to be checked. Second, if any of the syscalls vital for the test fails, it's preferable to output the error message too, and call tst_brk() for cleanup (patch 2). Third, there it would probably be better to use TFAIL/TPASS for recording success and failure instead of manual boolean flags (patch 3). Last, I think a successful test should print as little as possible and multiline messages like "calling syscall..." are really not that useful. Patch 4 disables them.
4 files changed