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

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