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

154 lines, 114 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 #
89 # BUGS that only occur with OSH as BUSYBOX ASH
90 #
91
92 # heimdal, perl
93 patterns["#2424"] = "Found uncompressed man pages:"
94
95 # nginx
96 patterns["#2425"] = "'cd' got too many arguments"
97
98 #
99 # BUGS that only occur with OSH as BASH
100 #
101
102 # chrony and x42-plugins
103 patterns["#2426"] = "In expressions, remove $ and use"
104
105 # shorewall - BAD version detection - fixed
106 #patterns["#2427"] = "ERROR: This program requires Bash 4.0 or later"
107
108 # gdbm
109 patterns["#2429"] = "ERROR: gdbm: check failed"
110
111 # shorewall
112 patterns["#2438"] = "Assoc array keys must be strings"
113
114 # zfs
115 patterns["#2441"] = "Token starting at column"
116
117 # 2025-10-26: demo for updating cause.awk, already fixed
118 patterns["#2477"] = "printf expected an integer, got"
119
120 # mdev-conf
121 patterns["#2500"] = "readlink disk/by-label/EFI"
122
123 # zeitgeist
124 patterns["#2528"] = "Unexpected argument to 'exit'"
125
126 # dircproxy
127 patterns["#2535"] = "fatal: Pat Sub op expected Str, BashArray, or BashAssoc, got Int"
128
129 # jq
130 patterns["#2540"] = "FAIL: tests/shtest"
131
132 # libidn
133 patterns["#2523"] = "ERROR: libidn2: check failed"
134
135 found = 0
136}
137{
138 for (i in patterns) {
139 # search for the line
140 if (index($0, patterns[i]) > 0) {
141 print i
142 found = 1
143
144 # just print the first one, not every occurrence
145 nextfile
146 }
147 }
148}
149
150END {
151 if (!found) {
152 print "unknown" # no cause assigned
153 }
154}