Skip to content

Commit 3c9f479

Browse files
committed
[lld-macho][test][nfc] Update stabs.s to use touch -d instead of -t
The test currently uses `touch -t` (e.g., `env TZ=UTC touch -t "197001010000.16"`) to set file timestamps. However, this does not seem to set the time zone correctly in a singularity container. While this is probably a bug/limitation of the singularity container, but we can instead use `touch -d` (e.g., `touch -d "1970-01-01 00:00:16 UTC"`) to achieve the same result without relying on a fix from singularity. Thoughts? Reviewed By: int3, #lld-macho Differential Revision: https://reviews.llvm.org/D139980
1 parent 2ee308c commit 3c9f479

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lld/test/MachO/stabs.s

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/foo.s -o %t/foo.o
66
# RUN: llvm-mc -filetype=obj -triple=x86_64-apple-darwin %t/no-debug.s -o %t/no-debug.o
77
## Set modtimes of the files for deterministic test output.
8-
# RUN: env TZ=UTC touch -t "197001010000.16" %t/test.o
9-
# RUN: env TZ=UTC touch -t "197001010000.32" %t/foo.o
8+
# RUN: touch -d "1970-01-01 00:00:16 UTC" %t/test.o
9+
# RUN: touch -d "1970-01-01 00:00:32 UTC" %t/foo.o
1010
# RUN: llvm-ar rcsU %t/foo.a %t/foo.o
1111

1212
# RUN: ZERO_AR_DATE=0 %lld -lSystem %t/test.o %t/foo.o %t/no-debug.o -o %t/test

0 commit comments

Comments
 (0)