Skip to content

Commit 51fa119

Browse files
authored
[AIX] Fix AIX failures due to switch to internal shell (#160566)
This PR fixes a bunch of failures on AIX that occurred due to the switch to lit internal shell by default. The failures deal with the following: 1. unset not being supported by lit internal shell 2. A bug with echo -n on AIX when there are multiple pipes in the RUN command 3. ulimit test case not supported on AIX due to the -v option 4. platform specific error message for missing file
1 parent 1b944e2 commit 51fa119

File tree

11 files changed

+25
-25
lines changed

11 files changed

+25
-25
lines changed

llvm/test/CodeGen/AMDGPU/lds-run-twice-absolute-md.ll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
; XFAIL: target={{.*}}-aix{{.*}}
2-
31
; RUN: opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds %s -o %t.ll
42
; RUN: opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds %t.ll -o %t.second.ll
53
; RUN: diff -ub %t.ll %t.second.ll -I ".*ModuleID.*"

llvm/test/CodeGen/AMDGPU/lds-run-twice.ll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
; XFAIL: target={{.*}}-aix{{.*}}
2-
31
; RUN: opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds %s -o %t.ll
42
; RUN: opt -S -mtriple=amdgcn-- -amdgpu-lower-module-lds %t.ll -o %t.second.ll
53
; RUN: diff -ub %t.ll %t.second.ll -I ".*ModuleID.*"

llvm/test/tools/llvm-ar/option-X.test

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,14 @@
33
## The option specifies the type of object file llvm-ar will operate on.
44

55
# RUN: rm -rf %t && mkdir %t && cd %t
6-
# RUN: unset OBJECT_MODE
76
# RUN: yaml2obj --docnum=1 -DCLASS=ELFCLASS32 %s -o elf32.o
87
# RUN: yaml2obj --docnum=1 -DCLASS=ELFCLASS64 %s -o elf64.o
98

109
# RUN: yaml2obj --docnum=2 -DFLAG=0x1DF %s -o xcoff32.o
1110
# RUN: yaml2obj --docnum=2 -DFLAG=0x1F7 %s -o xcoff64.o
1211

1312
## Test default -X option when creating a new archive.
14-
# RUN: llvm-ar -q -c archive-default.a xcoff32.o elf32.o xcoff64.o elf64.o 2>&1 | \
13+
# RUN: env -u OBJECT_MODE llvm-ar -q -c archive-default.a xcoff32.o elf32.o xcoff64.o elf64.o 2>&1 | \
1514
# RUN: FileCheck %s --check-prefixes=WARN-XCOFF64,WARN-ELF64
1615
# RUN: llvm-ar -t -Xany archive-default.a | \
1716
# RUN: FileCheck %s --check-prefixes=OBJ32
@@ -74,7 +73,7 @@
7473
# RUN: FileCheck %s --check-prefixes=OBJ32_64
7574

7675
## Test -X option for print operation.
77-
# RUN: llvm-ar -t archive-any.a | \
76+
# RUN: env -u OBJECT_MODE llvm-ar -t archive-any.a | \
7877
# RUN: FileCheck %s --check-prefixes=OBJ32
7978

8079
# RUN: llvm-ar -t -X32 archive-any.a | \
@@ -115,7 +114,7 @@
115114
# RUN: cmp elf64.o any/elf64.o
116115

117116
## Extract a 64-bit object file with option -X32 (or default object mode).
118-
# RUN: not llvm-ar --output=err64 -x archive-any.a xcoff64.o 2>&1 | \
117+
# RUN: env -u OBJECT_MODE not llvm-ar --output=err64 -x archive-any.a xcoff64.o 2>&1 | \
119118
# RUN: FileCheck %s -DFILE=xcoff64.o --check-prefixes=ERR64
120119
# RUN: not llvm-ar --output=err64 -x -X32 archive-any.a xcoff64.o 2>&1 | \
121120
# RUN: FileCheck %s -DFILE=xcoff64.o --check-prefixes=ERR64
@@ -156,7 +155,7 @@
156155
## Without -X64, -X32_64 or -Xany, nothing changed here,
157156
## since xcoff.o is a 64-bit object file in command line, but
158157
## the xcoff.o member in archive-rep.a is a 32-bit object file.
159-
# RUN: llvm-ar -r archive-rep.a xcoff.o
158+
# RUN: env -u OBJECT_MODE llvm-ar -r archive-rep.a xcoff.o
160159
# RUN: llvm-ar -t -Xany archive-rep.a | \
161160
# RUN: FileCheck %s --check-prefixes=REP
162161
# RUN: llvm-nm -Xany --print-armap archive-rep.a | \
@@ -178,7 +177,7 @@
178177
## Test move member.
179178
# RUN: cp archive-any.a archive.a
180179
## Do not move 64-bit object without options -X64, -X32_64, Xany.
181-
# RUN: llvm-ar -ma elf32.o archive.a xcoff64.o 2>&1 | \
180+
# RUN: env -u OBJECT_MODE llvm-ar -ma elf32.o archive.a xcoff64.o 2>&1 | \
182181
# RUN: FileCheck %s --check-prefix=WARN-XCOFF64
183182

184183
# RUN: llvm-ar -t -Xany archive.a | \
@@ -240,7 +239,7 @@
240239
# MOVE32-EMPTY:
241240

242241
## Move after a file with a bitness that doesn't match the object mode.
243-
# RUN: not llvm-ar -ma xcoff64.o archive-any.a xcoff32.o 2>&1 | \
242+
# RUN: env -u OBJECT_MODE not llvm-ar -ma xcoff64.o archive-any.a xcoff32.o 2>&1 | \
244243
# RUN: FileCheck %s --check-prefixes=ERR-INSERT-POINT
245244

246245
# RUN: not llvm-ar -X32 -ma xcoff64.o archive-any.a xcoff32.o 2>&1 | \
@@ -308,7 +307,7 @@
308307
# RUN: yaml2obj --docnum=5 %s -o wasm.o
309308
# RUN: yaml2obj --docnum=6 %s -o coff.o
310309

311-
# RUN: llvm-ar -q -c archive-other32.a coff.o 32.bc 64.bc wasm.o macho32.o macho64.o 2>&1 | \
310+
# RUN: env -u OBJECT_MODE llvm-ar -q -c archive-other32.a coff.o 32.bc 64.bc wasm.o macho32.o macho64.o 2>&1 | \
312311
# RUN: FileCheck %s --check-prefixes=WARN-64
313312
# RUN: llvm-ar -t -Xany archive-other32.a | \
314313
# RUN: FileCheck %s --check-prefixes=OTHER32

llvm/test/tools/llvm-nm/option-X-AIX.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,10 @@
44
# RUN: yaml2obj -DFLAG=0x1DF %s -o %t_xcoff32.o
55
# RUN: yaml2obj -DFLAG=0x1F7 %s -o %t_xcoff64.o
66
# RUN: rm -rf %t.a
7-
# RUN: unset OBJECT_MODE
87
# RUN: env OBJECT_MODE=any llvm-ar -q -c %t.a %t_xcoff32.o %t_xcoff64.o
98

109
## Test default "-X" option.
11-
# RUN: llvm-nm --format=just-symbols %t_xcoff32.o %t_xcoff64.o | \
10+
# RUN: env -u OBJECT_MODE llvm-nm --format=just-symbols %t_xcoff32.o %t_xcoff64.o | \
1211
# RUN: FileCheck -DFILE32=%t_xcoff32.o --check-prefixes=XCOFF32 %s --implicit-check-not={{.}}
1312

1413
## Test environment variable "OBJECT_MODE".

llvm/test/tools/llvm-ranlib/aix-X-option.test

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,7 @@
1414
# RUN: cp t_all.a t_X32_64.a
1515

1616
## Test the OBJECT_MODE environment variable when adding symbol table.
17-
# RUN: unset OBJECT_MODE
18-
# RUN: llvm-ranlib t_X32.a
17+
# RUN: env -u OBJECT_MODE llvm-ranlib t_X32.a
1918
# RUN: llvm-nm --print-armap t_X32.a 2>&1 | FileCheck --check-prefixes=GLOB32 --implicit-check-not="in t64" %s
2019
# RUN: cp t_all.a t_X32.a
2120
# RUN: env OBJECT_MODE=32 llvm-ranlib t_X32.a
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
## Show that llvm-strings prints the last string in the input even if no
22
## unprintable character follows it.
33

4-
RUN: echo -n abcdefg | llvm-strings - | FileCheck %s --check-prefix=PRINT
4+
RUN: echo -n abcdefg > %t
5+
RUN: llvm-strings %t - | FileCheck %s --check-prefix=PRINT
56
PRINT: abcdefg
67

78
## Show that llvm-strings does not print the last string in the input if it is
89
## too short and no unprintable character follows it.
910

10-
RUN: echo -n abc | llvm-strings - | FileCheck --allow-empty %s --check-prefix=NOPRINT
11+
RUN: echo -n abc > %t
12+
RUN: llvm-strings %t - | FileCheck --allow-empty %s --check-prefix=NOPRINT
1113
NOPRINT-NOT: {{.}}

llvm/test/tools/llvm-strings/stdin.test

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
## Show that llvm-strings can handle stdin input properly.
22

33
## Case 1: output with single string.
4-
RUN: echo -n "abcdefg" | llvm-strings - | FileCheck %s --check-prefix=CASE1 --implicit-check-not={{.}}
4+
RUN: echo -n "abcdefg" > %t
5+
RUN: llvm-strings %t - | FileCheck %s --check-prefix=CASE1 --implicit-check-not={{.}}
56
CASE1: abcdefg
67

78
## Case 2: output too short for string.
8-
RUN: echo -n "abc" | llvm-strings - | FileCheck %s --implicit-check-not={{.}} --allow-empty
9+
RUN: echo -n "abc" > %t
10+
RUN: llvm-strings %t - | FileCheck %s --implicit-check-not={{.}} --allow-empty
911

1012
## Case 3: output with new line.
1113
RUN: printf "abcd\nefgh" | llvm-strings - | FileCheck %s --check-prefix=CASE3 --implicit-check-not={{.}}
@@ -19,4 +21,5 @@ CASE4-NEXT: ghij
1921
CASE4-NEXT: klmn
2022

2123
## Case 5: no file name specified is equivalent to explicitly requesting stdin.
22-
RUN: echo -n "abcdefg" | llvm-strings | FileCheck %s --check-prefix=CASE1 --implicit-check-not={{.}}
24+
RUN: echo -n "abcdefg" > %t
25+
RUN: llvm-strings %t - | FileCheck %s --check-prefix=CASE1 --implicit-check-not={{.}}
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
## Show that the default output format matches GNU strings.
2-
RUN: echo -n abcd | llvm-strings - | FileCheck %s --strict-whitespace --implicit-check-not={{.}}
2+
RUN: echo -n abcd > %t
3+
RUN: llvm-strings %t - | FileCheck %s --strict-whitespace --implicit-check-not={{.}}
34
CHECK: {{^}}abcd{{$}}

llvm/test/tools/yaml2obj/empty-or-invalid-doc.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# RUN: echo "" | not yaml2obj 2>&1 | FileCheck %s
2-
# RUN: echo -n "" | not yaml2obj 2>&1 | FileCheck %s
2+
# RUN: echo -n "" > %t
3+
# RUN: not yaml2obj %t 2>&1 | FileCheck %s
34
# RUN: echo " " | not yaml2obj 2>&1 | FileCheck %s
45
# RUN: echo " " | not yaml2obj 2>&1 | FileCheck %s
56
# CHECK: yaml2obj: error: unknown document type

llvm/utils/lit/tests/shtest-readfile-external.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
# CHECK-LABEL: FAIL: shtest-readfile :: file-does-not-exist.txt ({{[^)]*}})
1313
# CHECK: echo $(cat /file/does/not/exist) && test -e /file/does/not/exist {{.*}}
14-
# CHECK: cat: /file/does/not/exist: No such file or directory
14+
# CHECK: {{.*}}cat{{.*}}/file/does/not/exist{{.*}}
1515

1616
# CHECK-LABEL: FAIL: shtest-readfile :: relative-paths.txt ({{[^)]*}})
1717
# CHECK: echo $(cat rel_path_test_folder/test_file) && test -e rel_path_test_folder/test_file {{.*}}

0 commit comments

Comments
 (0)