diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2018-02-22 15:47:33 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2018-03-05 18:09:08 -0300 |
commit | fbd01e6c4427b558b63fedb938b7fc5fada8c6b8 (patch) | |
tree | 04506c017fdd6164be007a713fb9e899f66107dc /stdlib/tst-random2.c | |
parent | 68448be208ee06e76665918b37b0a57e3e00c8b4 (diff) | |
download | glibc-fbd01e6c4427b558b63fedb938b7fc5fada8c6b8.tar.gz glibc-fbd01e6c4427b558b63fedb938b7fc5fada8c6b8.tar.xz glibc-fbd01e6c4427b558b63fedb938b7fc5fada8c6b8.zip |
nptl: Fix tst-cancel4 sendto tests
Now that send might be implemented calling sendto syscall on Linux, I am seeing some issue in some kernel configurations where tst-cancel4 sendto do not block as expected. The socket used to force the syscall blocking is used with default system configuration for buffer sending size, which might not be suffice to force blocking. This patch fixes it by explicit setting buffer socket lower than the buffer size used. It also enables sendto cancellation tests to work in both ways (since internally send is implemented routing to sendto on Linux kernel). The patch also removes unrequired make rules on some archictures for send/recv. The generic nptl Makefile already set the compiler flags required on some architectures for correct unwinding and libc object are not strictly required to support unwind (since pthread_cancel requires linking against libpthread). Checked on aarch64-linux-gnu and x86_64-linux-gnu. I also did a sniff test with tst-cancel{4,5} on a simulated mips64-linux-gnu. * nptl/tst-cancel4-common.h (set_socket_buffer): New function. * nptl/tst-cancel4-common.c (do_test): Call set_socket_buffer for socketpair endpoint. * nptl/tst-cancel4.c (tf_send): Call set_socket_buffer and use WRITE_BUFFER_SIZE as buffer size for sending socket. (tf_sendto): Use SOCK_STREAM instead of SOCK_DGRAM and fix an issue on system where send is implemented with sendto syscall. * sysdeps/unix/sysv/linux/mips/mips64/Makefile [$(subdir) = socket] (CFLAGS-recv.c, CFLAGS-send.c): Remove rules. [$(subdir) = nptl] (CFLAGS-recv.c, CFLAGS-send.c): Likewise. * sysdeps/unix/sysv/linux/riscv/rv64/Makefile: Remove file.
Diffstat (limited to 'stdlib/tst-random2.c')
0 files changed, 0 insertions, 0 deletions