OILS / regtest / aports / cause.awk View on Github | oils.pub

180 lines, 132 significant
1# "grep" through a log file, and print a cause string to stdout
2#
3# Invoked from aports/regtest-html.sh
4
5BEGIN {
6 patterns["makedepends"] = "ERROR: No such package: .makedepends"
7 # e.g. xkeyboard-config flakiness
8 patterns["fetch-failed"] = ": fetch failed"
9
10 # we can add the bug number like #2338
11 patterns["#2338"] = "\\@-D" # variant after attempted glob fix
12 # three backslashes is \\\-D
13 patterns[50] = "\\\\\\-D"
14
15 # This is a different pattern, so we use cause "##2338" to distinguish it
16 # from "#2338". It links to the same bug.
17 patterns["##2338"] = "\\@(cd" # variant after attempted glob fix
18 # \\\(cd
19 patterns[51] = "\\\\\\(cd"
20
21 patterns[2] = "cannot create executable"
22
23 patterns[3] = "cannot compile programs"
24
25 # abuild, ifupdown-ng, ...
26 patterns["#2416"] = "test case names with"
27 # jemalloc appears to be the same root cause
28 patterns["##2416"] = "jemalloc/internal/private_namespace.h: No such file or directory"
29
30 # e2fsprogs - not sure how to narrow this down more?
31 patterns["#2413"] = "382 tests succeeded 1 tests failed"
32
33 patterns[5] = "PHDR segment not covered"
34
35 # OSH string
36 patterns[6] = "error applying redirect:"
37
38 # parsing error
39 patterns["#2337"] = "(((grep"
40 #patterns["##2337"] = "Parser expected Id.Arith_RParen, got Id.Word_Compound"
41
42 # postfix
43 # gzip
44 patterns["##2337"] = "Unexpected token after arithmetic expression"
45
46 # kea package: suspicious
47 # oh this also fails with 124 though
48 patterns[8] = "find a separator character in"
49
50 # esh package: OSH string
51 # One case is definitely related to the linked issue, but multiple tests are failing.
52 # For the other test cases: I am not sure these are real bugs: it might be that esh
53 # expects and exact code string?
54 patterns["#2547"] = "Undefined variable 'OPTARG'"
55
56 # mawk, openvpn: trap 0
57 patterns["#2339"] = "requires a signal or hook name"
58
59 # pkgconf
60 patterns[11] = " with multiple files"
61
62 # xz
63 # musl libc error - with glibc, we get a parsing error
64 patterns["#2336"] = "Extended glob won"
65
66 # sqlite
67 patterns[13] = "No working C compiler"
68
69 # sfic
70 patterns["#2411"] = "terminate called after throwing an instance of"
71
72 # screen
73 patterns["#2364"] = "mkdir: unrecognized option: /" # changed 2025-08-04-rootbld
74 patterns["##2364"] = "mkdir: invalid option --"
75
76 # make
77 patterns["#2335"] = "oils I/O error"
78 # patch is the same ulimit bug, but the "invalid argument" EINVAL string
79 # occurs in test-suite.log
80 patterns["##2335"] = "patch: check failed"
81
82 # sqsh
83 patterns["#2409"] = "(test) Unexpected trailing word"
84
85 # xz
86 # note: with glibc, a different string will appear
87 patterns["#2336"] = "Extended glob won't work without FNM_EXTMATCH support in libc"
88
89 # lua-*
90 # umask with symbolic input not implemented yet
91 patterns["#2484"] = "umask with symbolic input isn't implemented"
92
93 # tclx
94 patterns["#2557"] = "oils: Invalid applet "
95
96 # shunit2
97 patterns["#2561"] = "assert message was not generated"
98
99 # ifupdown-ng
100 patterns["#2546"] = "Fail: regexp local "
101
102 # py3-adblock
103 patterns["#2562"] = "Invalid descriptor"
104
105 #
106 # BUGS that only occur with OSH as BUSYBOX ASH
107 #
108
109 # heimdal, perl
110 patterns["#2424"] = "Found uncompressed man pages:"
111
112 # nginx
113 patterns["#2425"] = "'cd' got too many arguments"
114
115 # xcb-util-render-util
116 patterns["#2552"] = "/home/udu/aports/community/xcb-util-renderutil/APKBUILD:16: Unexpected word while parsing compound command"
117
118 # py3-userpath
119 patterns["#2563"] = "Exception: Unable to find "
120
121 #
122 # BUGS that only occur with OSH as BASH
123 #
124
125 # chrony and x42-plugins
126 patterns["#2426"] = "In expressions, remove $ and use"
127
128 # shorewall - BAD version detection - fixed
129 #patterns["#2427"] = "ERROR: This program requires Bash 4.0 or later"
130
131 # gdbm
132 patterns["#2429"] = "ERROR: gdbm: check failed"
133
134 # shorewall
135 patterns["#2438"] = "Assoc array keys must be strings"
136
137 # zfs
138 patterns["#2441"] = "Token starting at column"
139
140 # 2025-10-26: demo for updating cause.awk, already fixed
141 patterns["#2477"] = "printf expected an integer, got"
142
143 # mdev-conf
144 patterns["#2500"] = "readlink disk/by-label/EFI"
145
146 # zeitgeist
147 patterns["#2528"] = "Unexpected argument to 'exit'"
148
149 # dircproxy
150 patterns["#2535"] = "fatal: Pat Sub op expected Str, BashArray, or BashAssoc, got Int"
151
152 # jq
153 patterns["#2540"] = "FAIL: tests/shtest"
154
155 # libidn
156 patterns["#2523"] = "ERROR: libidn2: check failed"
157
158 # R, rkward
159 patterns["#2560"] = "fatal: Assignment builtin expected NAME=value"
160
161 found = 0
162}
163{
164 for (i in patterns) {
165 # search for the line
166 if (index($0, patterns[i]) > 0) {
167 print i
168 found = 1
169
170 # just print the first one, not every occurrence
171 nextfile
172 }
173 }
174}
175
176END {
177 if (!found) {
178 print "unknown" # no cause assigned
179 }
180}