[01/15] io: Move file timestamps tests out of Linux

Message ID 20210323134458.2563022-2-adhemerval.zanella@linaro.org
State New
Headers show
Series
  • Add some tests and infra changes
Related show

Commit Message

Nart Tlisha via Libc-alpha March 23, 2021, 1:44 p.m.
Now that libsupport abstract Linux possible missing support (either
due FS limitation that can't handle 64 bit timestamp or architectures
that do not handle values larger than unsigned 32 bit values) the
tests can be turned generic.

Checked on x86_64-linux-gnu and i686-linux-gnu.  I also built the
tests for i686-gnu.
---
 io/Makefile                                              | 5 ++++-
 {sysdeps/unix/sysv/linux => io}/tst-futimens.c           | 0
 {sysdeps/unix/sysv/linux => io}/tst-utime.c              | 0
 {sysdeps/unix/sysv/linux => io}/tst-utimensat-skeleton.c | 0
 {sysdeps/unix/sysv/linux => io}/tst-utimes.c             | 0
 sysdeps/unix/sysv/linux/Makefile                         | 2 +-
 6 files changed, 5 insertions(+), 2 deletions(-)
 rename {sysdeps/unix/sysv/linux => io}/tst-futimens.c (100%)
 rename {sysdeps/unix/sysv/linux => io}/tst-utime.c (100%)
 rename {sysdeps/unix/sysv/linux => io}/tst-utimensat-skeleton.c (100%)
 rename {sysdeps/unix/sysv/linux => io}/tst-utimes.c (100%)

-- 
2.27.0

Comments

Siddhesh Poyarekar April 15, 2021, 5:04 a.m. | #1
On 3/23/21 7:14 PM, Adhemerval Zanella via Libc-alpha wrote:
> Now that libsupport abstract Linux possible missing support (either

> due FS limitation that can't handle 64 bit timestamp or architectures

> that do not handle values larger than unsigned 32 bit values) the

> tests can be turned generic.

> 

> Checked on x86_64-linux-gnu and i686-linux-gnu.  I also built the

> tests for i686-gnu.


OK.

Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Siddhesh Poyarekar April 15, 2021, 5:15 a.m. | #2
On 4/15/21 10:34 AM, Siddhesh Poyarekar wrote:
> On 3/23/21 7:14 PM, Adhemerval Zanella via Libc-alpha wrote:

>> Now that libsupport abstract Linux possible missing support (either

>> due FS limitation that can't handle 64 bit timestamp or architectures

>> that do not handle values larger than unsigned 32 bit values) the

>> tests can be turned generic.

>>

>> Checked on x86_64-linux-gnu and i686-linux-gnu.  I also built the

>> tests for i686-gnu.

> 

> OK.

> 

> Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>

> 


I should mention that I had to fix up the patch before commit because 
sysdeps/unix/sysv/linux/Makefile had changed.  It was a trivial change 
though.

Siddhesh

Patch

diff --git a/io/Makefile b/io/Makefile
index c9919d666f..3411573cf3 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -68,7 +68,10 @@  tests		:= test-utime test-stat test-stat2 test-lfs tst-getcwd \
 		   tst-fts tst-fts-lfs tst-open-tmpfile \
 		   tst-copy_file_range tst-getcwd-abspath tst-lockf \
 		   tst-ftw-lnk tst-file_change_detection tst-lchmod \
-		   tst-ftw-bz26353 tst-stat tst-stat-lfs
+		   tst-ftw-bz26353 tst-stat tst-stat-lfs \
+		   tst-utime \
+		   tst-utimes \
+		   tst-futimens \
 
 # Likewise for statx, but we do not need static linking here.
 tests-internal += tst-statx
diff --git a/sysdeps/unix/sysv/linux/tst-futimens.c b/io/tst-futimens.c
similarity index 100%
rename from sysdeps/unix/sysv/linux/tst-futimens.c
rename to io/tst-futimens.c
diff --git a/sysdeps/unix/sysv/linux/tst-utime.c b/io/tst-utime.c
similarity index 100%
rename from sysdeps/unix/sysv/linux/tst-utime.c
rename to io/tst-utime.c
diff --git a/sysdeps/unix/sysv/linux/tst-utimensat-skeleton.c b/io/tst-utimensat-skeleton.c
similarity index 100%
rename from sysdeps/unix/sysv/linux/tst-utimensat-skeleton.c
rename to io/tst-utimensat-skeleton.c
diff --git a/sysdeps/unix/sysv/linux/tst-utimes.c b/io/tst-utimes.c
similarity index 100%
rename from sysdeps/unix/sysv/linux/tst-utimes.c
rename to io/tst-utimes.c
diff --git a/sysdeps/unix/sysv/linux/Makefile b/sysdeps/unix/sysv/linux/Makefile
index e42bc7f13b..aa1e4e991e 100644
--- a/sysdeps/unix/sysv/linux/Makefile
+++ b/sysdeps/unix/sysv/linux/Makefile
@@ -107,7 +107,7 @@  tests += tst-clone tst-clone2 tst-clone3 tst-fanotify tst-personality \
 	 test-errno-linux tst-memfd_create tst-mlock2 tst-pkey \
 	 tst-rlimit-infinity tst-ofdlocks tst-gettid tst-gettid-kill \
 	 tst-tgkill tst-sysvsem-linux tst-sysvmsg-linux tst-sysvshm-linux \
-	 tst-timerfd tst-ppoll tst-futimens tst-utime tst-utimes \
+	 tst-timerfd tst-ppoll \
 	 tst-clock_adjtime tst-adjtimex tst-ntp_adjtime
 
 # Test for the symbol version of fcntl that was replaced in glibc 2.28.