brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.5 KiB · c08580f Raw
68 lines · plain
1# Note: ls -lu prints the accessed timestamp2# NetBSD: noatime mounts currently inhibit 'touch -a' updates3# Windows: the last access time is disabled by default in the OS4# This test is also known to fail on Mac (and possibly elsewhere) when Crowdstrike is installed;5# please make use of the LIT_XFAIL environment variable on such machines.6# UNSUPPORTED: system-netbsd, system-windows7 8# Preserve dates when stripping to an output file.9# RUN: yaml2obj %s -o %t.1.o10# RUN: touch -a -t 199505050555.55 %t.1.o11# RUN: llvm-strip -p %t.1.o -o %t-preserved.1.o12# RUN: ls -lu %t-preserved.1.o | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME13# Check that the stripped output is in fact a valid object file.14# RUN: llvm-readobj %t-preserved.1.o15 16# Preserve dates available via objcopy interface as well.17# RUN: yaml2obj %s -o %t.2.o18# RUN: touch -a -t 199505050555.55 %t.2.o19# RUN: llvm-objcopy -p %t.2.o %t-preserved.2.o20# RUN: ls -lu %t-preserved.2.o | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME21# RUN: llvm-readobj %t-preserved.2.o22 23# Preserve dates when stripping in place.24# RUN: yaml2obj %s -o %t.3.o25# RUN: touch -a -t 199505050555.55 %t.3.o26# RUN: llvm-strip -p %t.3.o27# RUN: ls -lu %t.3.o | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME28# RUN: llvm-readobj %t.3.o29 30# Without -p set, don't preserve dates.31# RUN: yaml2obj %s -o %t.4.o32# RUN: touch -a -t 199505050555.55 %t.4.o33# RUN: llvm-strip %t.4.o34# RUN: ls -lu %t.4.o | FileCheck %s --check-prefix=CHECK-NO-PRESERVE-ATIME35# RUN: llvm-readobj %t.4.o36 37# Preserve dates in archives.38# RUN: yaml2obj %s -o %t.5.o39# RUN: rm -f %t.a40# RUN: llvm-ar cr %t.a %t.5.o41# RUN: touch -a -t 199505050555.55 %t.a42# RUN: llvm-strip -p %t.a43# RUN: ls -lu %t.a | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME44# RUN: llvm-readobj %t.a45 46# Preserve dates in split DWO files.47# RUN: cp %p/Inputs/dwarf.dwo %t-input.dwo48# RUN: touch -a -t 199505050555.55 %t-input.dwo49# RUN: llvm-objcopy -p --split-dwo=%t-dwo %t-input.dwo %t-nondwo50# RUN: ls -lu %t-dwo | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME51# RUN: llvm-readobj %t-dwo52# RUN: ls -lu %t-nondwo | FileCheck %s --check-prefix=CHECK-PRESERVE-ATIME53# RUN: llvm-readobj %t-nondwo54 55# CHECK-PRESERVE-ATIME:        {{[[:space:]]1995}}56# CHECK-NO-PRESERVE-ATIME-NOT: {{[[:space:]]1995}}57 58!ELF59FileHeader:60  Class:           ELFCLASS6461  Data:            ELFDATA2LSB62  Type:            ET_REL63  Machine:         EM_X86_6464Sections:65  - Name:            .text66    Type:            SHT_PROGBITS67    Flags:           [ SHF_ALLOC, SHF_EXECINSTR ]68