From d0804fcf6b690de364c35d8354b21f72422df079 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 9 Apr 2024 20:47:11 -0400 Subject: tests: Move newer_link out of posix/ POSIX has clarified that it's unspecified whether -newer uses times from stat() or lstat(), because implementations vary. It does specify that it must fall back to lstat() for broken links, so test that. Link: https://austingroupbugs.net/view.php?id=1776 --- tests/posix/newer_broken.out | 1 + tests/posix/newer_broken.sh | 4 ++++ tests/posix/newer_link.out | 1 - tests/posix/newer_link.sh | 1 - 4 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 tests/posix/newer_broken.out create mode 100644 tests/posix/newer_broken.sh delete mode 100644 tests/posix/newer_link.out delete mode 100644 tests/posix/newer_link.sh (limited to 'tests/posix') diff --git a/tests/posix/newer_broken.out b/tests/posix/newer_broken.out new file mode 100644 index 0000000..d2dcdd1 --- /dev/null +++ b/tests/posix/newer_broken.out @@ -0,0 +1 @@ +times diff --git a/tests/posix/newer_broken.sh b/tests/posix/newer_broken.sh new file mode 100644 index 0000000..dccaa73 --- /dev/null +++ b/tests/posix/newer_broken.sh @@ -0,0 +1,4 @@ +ln -s nowhere "$TEST/broken" +"$XTOUCH" -h -t "1991-12-14 00:03" "$TEST/broken" + +bfs_diff times -newer "$TEST/broken" diff --git a/tests/posix/newer_link.out b/tests/posix/newer_link.out deleted file mode 100644 index d2dcdd1..0000000 --- a/tests/posix/newer_link.out +++ /dev/null @@ -1 +0,0 @@ -times diff --git a/tests/posix/newer_link.sh b/tests/posix/newer_link.sh deleted file mode 100644 index 685ac78..0000000 --- a/tests/posix/newer_link.sh +++ /dev/null @@ -1 +0,0 @@ -bfs_diff times -newer times/l -- cgit v1.2.3