mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-11 13:50:06 +00:00
fbd01e6c44
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.
12 lines
357 B
Makefile
12 lines
357 B
Makefile
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
|
|
# has no corresponding warning option to allow it to be disabled with
|
|
# diagnostic pragmas).
|
|
CFLAGS-sigaction.c += -Wno-error
|
|
endif
|
|
|
|
ifeq ($(subdir),nptl)
|
|
CFLAGS-sigaction.c += -Wno-error
|
|
endif
|