Fixes an existing bug in dup3 handling on AArch64. As SYS_dup2 is not available on AArch64, SYS_dup3 was not being included in the switch in pre-syscall handling due to a misplaced conditional compile statement. Note that on AArch64 dup2 automatically uses dup3 internally, so the bug affected also the dup2 calls in the client.file_io test.
Fixes close_range handling on AArch64 by updating the syscall defines from a newer header file that does define __NR_close_range. Defines the SYS_close_range constant for AArch64.
Enables the client.file_io test on AArchXX. Replaces the inline asm code to unmask divide-by-zero exceptions, with a glibc wrapper. Also adds a test for dup3. The clone_range part of this test is enabled on AArchXX but hasn't been run yet, because our CI machine does not have kernel >= 5.9.
Also, on AArch64, unmasking of float-point exceptions in the setup of the client.file_io test may be ignored as trapping exceptions is optional. https://code.woboq.org/userspace/glibc/sysdeps/aarch64/fpu/feenablxcpt.c.html#37
Issue: #5131 (closed)