about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/test-errno-linux.c
Commit message (Collapse)AuthorAgeFilesLines
* Update copyright dates with scripts/update-copyrights.Joseph Myers2018-01-011-1/+1
| | | | | | | * All files with FSF copyright notices: Update copyright dates using scripts/update-copyrights. * locale/programs/charmap-kw.h: Regenerated. * locale/programs/locfile-kw.h: Likewise.
* test-errno-linux: quotactl can fail with EPERM in containersFlorian Weimer2017-11-021-38/+38
| | | | Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Fix more test-errno issuesAdhemerval Zanella2017-03-301-2/+7
| | | | | | | | | | | | | | | | | | This patch fixes some test-errno-linux unexpected returns for the tested syscalls on some older kernels (I saw it on a Linux 3.8 on armv7l). Basically: - inotify_add_watch: Linux v3.8 (676a0675c) removed the test to check at least one valid bit in flags (to return EINVAL). It was later added back in v3.9 (04df32fa1). - quotactl: returns ENOSYS for kernels not configured with CONFIG_QUOTA. Checked on x86_64-linux-gnu and armv7l-linux-gnueabihf. * sysdeps/unix/sysv/linux/test-errno-linux.c (do_test): Handle non expected inotify_add_watch and quotactl return.
* Fix test-errno issuesAdhemerval Zanella2017-03-151-0/+176
This patch fixes multiple issues of test-errno.c (9a56f8718341): - Rename Linux test-errno.c to test-errno-linux.c to avoid build the same source for both tests. - Add a mlock check for 32 bits build running on 64 bits kernels. Althuough man pages states that mlock fails with EINVAL if final address overflows, kernels does not return it for aforementioned condition (it returns ENOMEM instead). Although it seems to be a kernel issue for compat syscall handling, I think it is worth to still check syscall return and document the behavior. - Initialize option lenght for setsockopt check. - Change open test from EINVAL to EISDIR. Checked on x86_64-linux-gnu and i686-linux-gnu (running on 64 bits kernel). * posix/test-errno.c (do_test): Initialize setsockopt optlen. * sysdeps/unix/sysv/linux/test-errno.c: Move to ... * sysdeps/unix/sysv/linux/test-errno-linux.c: ... here. (test_wrp_rv): Fix format. (test_wrp_rv2): New macro. (do_test): Handle mlock return on 64 bits kernels with 32 bits binaries.