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

181 lines, 133 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 patterns[9] = "fatal: Undefined variable"
56
57 # mawk, openvpn: trap 0
58 patterns["#2339"] = "requires a signal or hook name"
59
60 # pkgconf
61 patterns[11] = " with multiple files"
62
63 # xz
64 # musl libc error - with glibc, we get a parsing error
65 patterns["#2336"] = "Extended glob won"
66
67 # sqlite
68 patterns[13] = "No working C compiler"
69
70 # sfic
71 patterns["#2411"] = "terminate called after throwing an instance of"
72
73 # screen
74 patterns["#2364"] = "mkdir: unrecognized option: /" # changed 2025-08-04-rootbld
75 patterns["##2364"] = "mkdir: invalid option --"
76
77 # make
78 patterns["#2335"] = "oils I/O error"
79 # patch is the same ulimit bug, but the "invalid argument" EINVAL string
80 # occurs in test-suite.log
81 patterns["##2335"] = "patch: check failed"
82
83 # sqsh
84 patterns["#2409"] = "(test) Unexpected trailing word"
85
86 # xz
87 # note: with glibc, a different string will appear
88 patterns["#2336"] = "Extended glob won't work without FNM_EXTMATCH support in libc"
89
90 # lua-*
91 # umask with symbolic input not implemented yet
92 patterns["#2484"] = "umask with symbolic input isn't implemented"
93
94 # tclx
95 patterns["#2557"] = "oils: Invalid applet "
96
97 # shunit2
98 patterns["#2561"] = "assert message was not generated"
99
100 # ifupdown-ng
101 patterns["#2546"] = "Fail: regexp local "
102
103 # py3-adblock
104 patterns["#2562"] = "Invalid descriptor"
105
106 #
107 # BUGS that only occur with OSH as BUSYBOX ASH
108 #
109
110 # heimdal, perl
111 patterns["#2424"] = "Found uncompressed man pages:"
112
113 # nginx
114 patterns["#2425"] = "'cd' got too many arguments"
115
116 # xcb-util-render-util
117 patterns["#2552"] = "/home/udu/aports/community/xcb-util-renderutil/APKBUILD:16: Unexpected word while parsing compound command"
118
119 # py3-userpath
120 patterns["#2563"] = "Exception: Unable to find "
121
122 #
123 # BUGS that only occur with OSH as BASH
124 #
125
126 # chrony and x42-plugins
127 patterns["#2426"] = "In expressions, remove $ and use"
128
129 # shorewall - BAD version detection - fixed
130 #patterns["#2427"] = "ERROR: This program requires Bash 4.0 or later"
131
132 # gdbm
133 patterns["#2429"] = "ERROR: gdbm: check failed"
134
135 # shorewall
136 patterns["#2438"] = "Assoc array keys must be strings"
137
138 # zfs
139 patterns["#2441"] = "Token starting at column"
140
141 # 2025-10-26: demo for updating cause.awk, already fixed
142 patterns["#2477"] = "printf expected an integer, got"
143
144 # mdev-conf
145 patterns["#2500"] = "readlink disk/by-label/EFI"
146
147 # zeitgeist
148 patterns["#2528"] = "Unexpected argument to 'exit'"
149
150 # dircproxy
151 patterns["#2535"] = "fatal: Pat Sub op expected Str, BashArray, or BashAssoc, got Int"
152
153 # jq
154 patterns["#2540"] = "FAIL: tests/shtest"
155
156 # libidn
157 patterns["#2523"] = "ERROR: libidn2: check failed"
158
159 # R, rkward
160 patterns["#2560"] = "fatal: Assignment builtin expected NAME=value"
161
162 found = 0
163}
164{
165 for (i in patterns) {
166 # search for the line
167 if (index($0, patterns[i]) > 0) {
168 print i
169 found = 1
170
171 # just print the first one, not every occurrence
172 nextfile
173 }
174 }
175}
176
177END {
178 if (!found) {
179 print "unknown" # no cause assigned
180 }
181}