aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/unix/sysv
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2018-02-22 15:47:33 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2018-03-05 18:09:08 -0300
commitfbd01e6c4427b558b63fedb938b7fc5fada8c6b8 (patch)
tree04506c017fdd6164be007a713fb9e899f66107dc /sysdeps/unix/sysv
parent68448be208ee06e76665918b37b0a57e3e00c8b4 (diff)
downloadglibc-fbd01e6c4427b558b63fedb938b7fc5fada8c6b8.tar
glibc-fbd01e6c4427b558b63fedb938b7fc5fada8c6b8.tar.gz
glibc-fbd01e6c4427b558b63fedb938b7fc5fada8c6b8.tar.bz2
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 'sysdeps/unix/sysv')
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/Makefile10
-rw-r--r--sysdeps/unix/sysv/linux/riscv/rv64/Makefile4
2 files changed, 0 insertions, 14 deletions
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/Makefile b/sysdeps/unix/sysv/linux/mips/mips64/Makefile
index b4fb190bba..fcb48c0f56 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/Makefile
+++ b/sysdeps/unix/sysv/linux/mips/mips64/Makefile
@@ -1,13 +1,3 @@
-ifeq ($(subdir),socket)
-CFLAGS-recv.c += -fexceptions
-CFLAGS-send.c += -fexceptions
-endif
-
-ifeq ($(subdir),nptl)
-CFLAGS-recv.c += -fexceptions
-CFLAGS-send.c += -fexceptions
-endif
-
ifeq ($(subdir),signal)
# sigaction.c defines static functions in asms and refers to them from
# C code, resulting in "'restore_rt' used but never defined" (which
diff --git a/sysdeps/unix/sysv/linux/riscv/rv64/Makefile b/sysdeps/unix/sysv/linux/riscv/rv64/Makefile
deleted file mode 100644
index cb60d74047..0000000000
--- a/sysdeps/unix/sysv/linux/riscv/rv64/Makefile
+++ /dev/null
@@ -1,4 +0,0 @@
-ifeq ($(subdir),socket)
-CFLAGS-recv.c += -fexceptions
-CFLAGS-send.c += -fexceptions
-endif