about summary refs log tree commit diff
path: root/sysdeps/unix
Commit message (Collapse)AuthorAgeFilesLines
* linux: Use statx for MIPSn64Adhemerval Zanella2021-03-293-33/+29
| | | | | | | | | | | MIPSn64 kernel ABI for legacy stat uses unsigned 32 bit for second timestamp, which limits the maximum value to y2106. This patch make mips64 use statx as for 32-bit architectures. Thie __cp_stat64_t64_statx is open coded, its usage is solely on fstatat64 and it avoid the need to redefine the name for mips64 (which will call __cp_stat64_statx since its does not use __stat64_t64 internally).
* linux: Disable fstatat64 fallback if __ASSUME_STATX is definedAdhemerval Zanella2021-03-291-16/+40
| | | | | | | | | | | | If the minimum kernel supports statx there is no need to call the fallback stat legacy syscalls. The statx is also called on compat xstat syscall, but different than the fstatat it calls no fallback and it is assumed to be always present. Checked on powerpc-linux-gnu (with and without --enable-kernel=4.11) and on powerpc64-linux-gnu.
* linux: Implement fstatat with __fstatat64_time64Adhemerval Zanella2021-03-291-38/+11
| | | | | | | | | It makes fstatat use __NR_statx, which fix the s390 issue with missing nanoxsecond support on compat stat syscalls (at least on recent kernels) and limits the statx call to only one function (which simplifies the __ASSUME_STATX support). Checked on i686-linux-gnu and on powerpc-linux-gnu.
* nptl: Remove __libc_allocate_rtsig, __libc_current_sigrtmax, and ↵Adhemerval Zanella2021-03-2630-87/+5
| | | | | | | | __libc_current_sigrtmin The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Move sigaction to libcAdhemerval Zanella2021-03-2629-58/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove pthread raise implementationAdhemerval Zanella2021-03-2631-50/+0
| | | | | | | | | | The Linux version already target the current thread by using tgkill along with getpid and gettid. For arm, libpthread does not do a intra PLT since it will call the raise from libc. Checked on x86_64-linux-gnu.
* nptl: Move pthread_kill to libcAdhemerval Zanella2021-03-2661-29/+64
| | | | | | A new 2.34 version is also provided. Checked on x86_64-linux-gnu.
* nptl: Remove pwrite from libpthreadAdhemerval Zanella2021-03-2638-87/+37
| | | | | | | The libc version is identical and built with same flags, it is also uses as the default version. Checked on x86_64-linux-gnu.
* nptl: Remove pread from libpthreadAdhemerval Zanella2021-03-2638-87/+37
| | | | | | | The libc version is identical and built with same flags, it is also uses as the default version. Checked on x86_64-linux-gnu.
* nptl: Remove open from libpthreadAdhemerval Zanella2021-03-2637-117/+12
| | | | | | | The libc version is identical and built with same flags. The libc version is set as the default version. Checked on x86_64-linux-gnu.
* nptl: Remove lseek from libpthreadAdhemerval Zanella2021-03-2637-89/+12
| | | | | | | | | | | The libc version is identical and built with same flags. The libc version is set as the default version. The libpthread compat symbol requires to mask it when building the loader object otherwise ld might complain about a missing versioned symbol (as for alpha). Checked on x86_64-linux-gnu.
* nptl: Remove send from libpthreadAdhemerval Zanella2021-03-2637-72/+20
| | | | | | | | | | | | | The libc version is identical and built with same flags. Both aarch64 and nios2 also requires to export __send and tt was done previously with the HAVE_INTERNAL_SEND_SYMBOL (which forced the symbol creation). All __send callers are internal to libc and the original issue that required the symbol export was due a missing libc_hidden_def. So a compat symbol is added for __send and the libc_hidden_def is defined regardless. Checked on x86_64-linux-gnu and i686-linux-gnu.
* tst: Add test for sigtimedwaitLukasz Majewski2021-03-232-1/+63
| | | | | | | | | | | | | This change adds new test to assess sigtimedwait's timeout related functionality - the sigset_t is configured for SIGUSR1, which will not be triggered, so sigtimedwait just waits for timeout. To be more specific - two use cases are checked: - if sigtimedwait times out immediately when passed struct timespec has zero values of tv_nsec and tv_sec. - if sigtimedwait times out after timeout specified in passed argument Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Add test for ntp_gettimexLukasz Majewski2021-03-232-1/+23
| | | | | | This test is a wrapper on tst-ntp_gettime test. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Add test for ntp_gettimeLukasz Majewski2021-03-232-1/+57
| | | | | | | This code provides test to check if time on target machine is properly read via ntp_gettime syscall. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* fix: Always export ntp_gettimex functionLukasz Majewski2021-03-231-1/+1
| | | | | | After this patch applied the ntp_gettimex function is always declared in the sys/timex.h header. Currently it is not when __REDIRECT_NTH is defined (i.e. in ARM 32 bit port).
* signal: Add __libc_sigactionAdhemerval Zanella2021-03-189-10/+7
| | | | | | | | The generic implementation basically handle the system agnostic logic (filtering out the invalid signals) while the __libc_sigaction is the function with implements the system and architecture bits. Checked on x86_64-linux-gnu and i686-linux-gnu.
* nptl: Move system to libcAdhemerval Zanella2021-03-1825-25/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Move fcntl from libpthreadAdhemerval Zanella2021-03-1827-101/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove sendmsg from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove recvmsg from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove sigwait from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove tcdrain from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove pause from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove msync from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove fsync from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove sendto from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove recvfrom from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove recv from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove connect from libpthreadAdhemerval Zanella2021-03-1829-58/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove accept from libpthreadAdhemerval Zanella2021-03-1829-29/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove close from libpthreadAdhemerval Zanella2021-03-1829-58/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove read from libpthreadAdhemerval Zanella2021-03-1829-58/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Remove write from libpthreadAdhemerval Zanella2021-03-1829-58/+0
| | | | | | The libc version is identical and built with same flags. Checked on x86_64-linux-gnu.
* nptl: Move fork into libcAdhemerval Zanella2021-03-1225-50/+0
| | | | | | | | This is part of the libpthread removal project: <https://sourceware.org/ml/libc-alpha/2019-10/msg00080.html> Checked on x86_64-linux-gnu.
* nptl: Move Linux pthread_kill to nptlAdhemerval Zanella2021-03-121-57/+0
| | | | | | | The nptl already expects a Linux syscall internally. Also __is_internal_signal is used and the DEBUGGING_P check is removed. Checked on x86_64-linux-gnu.
* io: Return UNSUPPORTED if filesystem do not support 64 bit timestampsAdhemerval Zanella2021-03-123-3/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some Linux filesystems might not fully support 64 bit timestamps [1], which make some Linux specific tests to fail when they check for the functionality. This patch adds a new libsupport function, support_path_support_time64, that returns whether the target file supports or not 64 bit timestamps. The support is checked by issuing a utimensat and verifying both the last access and last modification time against a statx call. The tests that might fail are also adjusted to check the file support as well: $ dd if=/dev/zero of=loopbackfile.img bs=100M count=1 1+0 records in 1+0 records out 104857600 bytes (105 MB, 100 MiB) copied, 0,0589568 s, 1,8 GB/s $ sudo losetup -fP loopbackfile.img $ mkfs.xfs loopbackfile.img meta-data=loopbackfile.img isize=512 agcount=4, agsize=6400 blks = sectsz=512 attr=2, projid32bit=1 = crc=1 finobt=1, sparse=1, rmapbt=0 = reflink=1 data = bsize=4096 blocks=25600, imaxpct=25 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0, ftype=1 log =internal log bsize=4096 blocks=1368, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 $ mkdir loopfs $ sudo mount -o loop /dev/loop0 loopfs/ $ sudo chown -R azanella:azanella loopfs $ TMPDIR=loopfs/ ./testrun.sh misc/tst-utimes error: ../sysdeps/unix/sysv/linux/tst-utimes.c:55: File loopfs//utimesfECsK1 does not support 64-bit timestamps [1] https://bugzilla.redhat.com/show_bug.cgi?id=1795576
* io: Return EBAFD for negative file descriptor on fstat (BZ #27559)Adhemerval Zanella2021-03-112-0/+18
| | | | | | | | Now that fstat is implemented on top fstatat we need to handle negative inputs. The implementation now rejects AT_FDCWD, which would otherwise be accepted by the kernel. Checked on x86_64-linux-gnu and on i686-linux-gnu.
* Update kernel version to 5.11 in tst-mman-consts.py.Joseph Myers2021-03-101-1/+1
| | | | | | | | This patch updates the kernel version in the test tst-mman-consts.py to 5.11. (There are no new MAP_* constants covered by this test in 5.11 that need any other header changes.) Tested with build-many-glibcs.py.
* Linux: misc/tst-ofdlocks-compat can be a regular testFlorian Weimer2021-03-092-9/+7
| | | | | | | | Now that compat_symbol_reference works in non-internal tests. Also do not build and run the test at all on architectures which do not have the pre-2.28 symbol version of fcntl. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* Linux: dirent/tst-readdir64-compat can be a regular testFlorian Weimer2021-03-092-6/+5
| | | | | | | | | | compat_symbol_reference works in non-internal tests now. Also avoid building the test for unsupported configurations at all. I verified by building with build-many-glibcs.py that GLIBC_2.1.3 works as the predecessor of GLIBC_2.2. (Symbol versions in the early days are complex.) Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Add test for ntp_adjtimeLukasz Majewski2021-03-082-1/+23
| | | | | | This test is a wrapper on tst-clock_adjtime test. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Add test for adjtimexLukasz Majewski2021-03-082-1/+23
| | | | | | This test is a wrapper on tst-clock_adjtime test. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Modify tst-clock_adjtime to allow reuse of its codeLukasz Majewski2021-03-081-1/+5
| | | | | | | The tst-clock_adjtime can be adjusted to be reused for also testing adjtimex. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Add test for clock_adjtimeLukasz Majewski2021-03-082-1/+59
| | | | | | | | | | | This code privides test to check if time on target machine is properly adjusted. The time is altered only when cross-test-ssh.sh is executed with --allow-time-setting flag. As the delta added to CLOCK_REALTIME is only 1 sec the original time is not restored and further tests are executed with this bias. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* linux: Fix __thrd_sleep64 hidden definitionAdhemerval Zanella2021-03-052-2/+2
| | | | The symbol is exported by libc.
* tst: Fix tst-timerfd testLukasz Majewski2021-03-021-11/+4
| | | | | | | | | | | | | | | | | | | There were following problems discovered for tst-timerfd test: 1. Do not set the struct itimerspec's it_interval tv_sec to 2 seconds. After this change the timerfd will trigger only once (the it_value is only set in this case). 2. The 'val1' variable (including the call to timerfd_gettime) is not needed anymore, as it is just enough to read the struct itimerspec after sleep. As a consequence the 'val2' has been renamed to 'val'. 3. After calling timerfd_gettime, the value of struct itimerspec time, when timer is running, is the remaining time. In the case of this test it would be less than 1 second. As a result the TEST_COMPARE macro logic had to be adjusted. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* ld.so: Implement the --list-diagnostics optionFlorian Weimer2021-03-021-0/+77
|
* tst: Add test for utimesLukasz Majewski2021-03-022-1/+89
| | | | | | | | | | | This patch provides test for utimes. It uses wrapper to read access and modification times to compare them with ones written by utimes. Moreover, access and modification times beyond the Y2038 threshold date (i.e. 32 bit time_t overflow) are also checked. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
* tst: Add test for utimeLukasz Majewski2021-03-022-1/+88
| | | | | | | | | | This patch provides test for utime. It uses wrapper to read access and modification times to compare them with ones written by utime. Moreover, access and modification times beyond the Y2038 threshold date (i.e. 32 bit time_t overflow) are also checked. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>