This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix test-errno issues


On 03/13/2017 03:21 PM, Adhemerval Zanella wrote:
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.

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.
	(do_test): Handle mlock return on 64 bits kernels with 32 bits
	binaries.

Checked on s390x (64bit) and s390 (31bit - running on a 64bit kernel).
Thanks.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]