diff --git a/igt-vis/.gitignore b/igt-vis/.gitignore index dfe0837ef40ed6e712102f85d4810bf51c2db994..c51e34995635c471384b0ea9b5e09f4ff802e098 100644 --- a/igt-vis/.gitignore +++ b/igt-vis/.gitignore @@ -2,4 +2,5 @@ __pycache__/ *.pyc *.pyo *~ +hostaliases.rx diff --git a/igt-vis/hostaliases.rx.example b/igt-vis/hostaliases.rx.example new file mode 100644 index 0000000000000000000000000000000000000000..331cbdd6d5dd6f4eb2ed4275b1676267fe3486a7 --- /dev/null +++ b/igt-vis/hostaliases.rx.example @@ -0,0 +1,2 @@ +^shard-(.*?)-?\d+$ shard-\1 +^test1$ test2 diff --git a/igt-vis/templates/test-result.mako b/igt-vis/templates/test-result.mako index 53a8bb9e0c6c15c243c681a43c399744c8fea0bc..f07f6284aeae76ea6fc384f5411436c89baca74f 100644 --- a/igt-vis/templates/test-result.mako +++ b/igt-vis/templates/test-result.mako @@ -15,6 +15,7 @@ if 'run' in test: filelist.append(("dmesg%d.txt" % test['run'],)) filelist.append(("hostdmesg%d.txt" % test['run'],)) filelist.append(("runtimes%d.txt" % test['run'],)) + filelist.append(("results%d.json.bz2" % test['run'],)) %> @@ -82,7 +83,7 @@ if 'run' in test: % if var == 'dmesg': % for idx, dmesg in enumerate(test[var]): -
${dmesg.message | h}
+
${dmesg.message | h}
% endfor % else:
${test[var] | h}
@@ -95,7 +96,7 @@ if 'run' in test: ## Highlighting logs with [IGT] in them diff --git a/igt-vis/templates/view-byhost.mako b/igt-vis/templates/view-byhost.mako index 80447026ff6f4675bc767a6a251eb1c6c6001f0b..08597da2cbff5bd18123bee89afc44e21dfe5f3c 100644 --- a/igt-vis/templates/view-byhost.mako +++ b/igt-vis/templates/view-byhost.mako @@ -24,9 +24,9 @@ % endif % if build == new: - ${build} + ${build} % else: - ${build} + ${build} % endif % endfor diff --git a/igt-vis/vis-history.py b/igt-vis/vis-history.py index 965d029e584109028cd6612f13d1bda83acbf7dc..5ae5d92ed06492e41896b5736d172a76b495b714 100755 --- a/igt-vis/vis-history.py +++ b/igt-vis/vis-history.py @@ -18,7 +18,7 @@ if __name__ == "__main__": ap.add_argument('-o','--output', help="Output html prefix", type=str, default='') ap.add_argument('--heatmap', help="Create heatmap", default=False, action='store_true') ap.add_argument('--combine', type=str, default=None, - help="Combine results for similar hosts") + help="Deprecated| Combine results for similar hosts") ap.add_argument('--testsort', default=False, action='store_true', help="Sort tests in alphabetical order") ap.add_argument('-d', '--depth', type=int, default=0, @@ -26,6 +26,8 @@ if __name__ == "__main__": ap.add_argument('--buildorder', type=str, default=None, help="Filename for build order information") ap.add_argument('files', help="Files to be visualized", metavar='files', nargs='+', type=str) + ap.add_argument('-a','--hostalias-file', type=str, default=None, + help="Combine results for similiar hosts based on RegEx file") args = ap.parse_args() @@ -33,6 +35,17 @@ if __name__ == "__main__": if args.buildorder: readbuildorder(args.buildorder) + if args.hostalias_file: + try: + read_hostalias_file(args.hostalias_file) + except Exception as e: + print("Err:",e) + exit(1) + else: + try: + read_hostalias_file(os.path.join(os.path.dirname(os.path.realpath(__file__)), "hostaliases.rx")) + except: pass + try: jsons = readfiles(args.files, combine=args.combine) # arranged by [(build,host)] except (KeyboardInterrupt) as e: print("ERROR: Keyboard interrupt while reading files") diff --git a/igt-vis/vis-test-results.py b/igt-vis/vis-test-results.py index 327c84c3c3e3e2b8bf5ca4165712858b497d9446..36ad9e49ae0fc941c11f9f7434563e6f1d62d666 100755 --- a/igt-vis/vis-test-results.py +++ b/igt-vis/vis-test-results.py @@ -50,7 +50,7 @@ def writehtml(q): realhost = host path = os.path.join(args.output, build, realhost) - try: os.mkdir(path) + try: os.makedirs(path) except FileExistsError: pass filepath = os.path.join(path, htmlname(testname)) title = testname+" on "+host+"@"+build diff --git a/igt-vis/vis.py b/igt-vis/vis.py index aa2886b97ed49dd97fb4ea50a95454f5699a714e..fc80ab6890b554508b5626773021d28030716484 100755 --- a/igt-vis/vis.py +++ b/igt-vis/vis.py @@ -30,7 +30,7 @@ def parse_args(): ap.add_argument('-c','--collate', type=str, default=None, help="Collate these results, example: -c notrun,pass") ap.add_argument('--combine', type=str, default=None, - help="Combine results for similar hosts") + help="Deprecated| Combine results for similar hosts") ap.add_argument('--buildorder', type=str, default=None, help="Filename for build order information") ap.add_argument('--builddesc', type=str, default=None, @@ -39,7 +39,8 @@ def parse_args(): help="Create html page with only changed results within test/host") ap.add_argument('files', metavar='files', nargs='+', type=str, help="Piglit json files to be visualized") - + ap.add_argument('-a','--hostalias-file', type=str, default=None, + help="Combine results for similiar hosts based on RegEx file") return ap.parse_args() # Truncate and remove single test result as much as we can for size @@ -70,6 +71,17 @@ def main(): if args.buildorder: readbuildorder(args.buildorder) + if args.hostalias_file: + try: + read_hostalias_file(args.hostalias_file) + except Exception as e: + print("Err:",e) + exit(1) + else: + try: + read_hostalias_file(os.path.join(os.path.dirname(os.path.realpath(__file__)), "hostaliases.rx")) + except: pass + # Build a dict for extra information in html # builddesc file format: # builddescription diff --git a/igt-vis/visutils.py b/igt-vis/visutils.py index db65479284f153c032073444238e843174de3e9a..afad45bfdfdc790d6440e42a5ca48cf411015aeb 100644 --- a/igt-vis/visutils.py +++ b/igt-vis/visutils.py @@ -53,7 +53,34 @@ intel_gpu_gens = [ ( "cl-", 4.2 ) # Crestline Gen4 GMAX3100 ] -def readfiles_parallel(q, files=[], combine='shard'): +hostaliases = {} + + +def read_hostalias_file(filename): + '''Read in regex-replace pairs for hostname aliasing''' + global hostaliases + try: + with open(filename, 'r') as fp: + for line in fp.readlines(): + r,s = line.strip().split(' ', 1) + hostaliases[re.compile(r)]=s + print(f'Host alias file loaded from: {filename}') + except (OSError, IOError, UnicodeDecodeError, EOFError) as e: + raise e + return hostaliases + + +def hostalias(hostname): + '''Go through ordered dict of regex matches. + Use first matching or return None (no matches)''' + global hostaliases + for r in hostaliases.keys(): + if r.match(hostname): + return re.sub(r, hostaliases[r],hostname,count=1) + return None + + +def readfiles_parallel(q,files=[], combine='shard'): for filename in files: j = None try: @@ -122,14 +149,15 @@ def readfiles_parallel(q, files=[], combine='shard'): if j['tests'][test]['result'] == 'incomplete': incompleted = True - # Workaround: combine shards - # This is needed for sensible comparison and more concise html - if combine and combine in host: + + alias = hostalias(host) + # combine will be deprecated + if not alias and combine and combine in host: + alias=re.match("(.*?)-?[0-9]{1,3}$", host).group(1) + if alias: for test in j['tests']: j['tests'][test]['hostname']=host - # need number in the end of hostname - host=re.match("(.*?)?[0-9]{1,3}$", host).group(1) - + host=alias q.put((build, host, j)) diff --git a/site-publishing/assets/test_result.css b/site-publishing/assets/test_result.css index ee35f194cee3c7b477160cf33a826de804afe9fc..ad8492bc86803a53e135a07b853e812ab16af8ef 100644 --- a/site-publishing/assets/test_result.css +++ b/site-publishing/assets/test_result.css @@ -38,16 +38,16 @@ tr:nth-child(odd) > td:first-child { visibility: hidden; } -.dmesg-warnings { +span.dmesg-warnings { color: orangered; font-weight: bold; } -.dmesg-igt { +span.dmesg-igt { background-color: #ffffba; } -.dmesg-warnings, .dmesg-normal { +span.dmesg { white-space: pre; font-family: monospace; word-wrap: normal; diff --git a/site-publishing/lib/custom.rb b/site-publishing/lib/custom.rb index 3fafff9bdca912d0ed43c7affd2f66bf54ce3a9c..74bdc2a554ef4e6fd669c809e82ae2db156ce1ef 100644 --- a/site-publishing/lib/custom.rb +++ b/site-publishing/lib/custom.rb @@ -124,8 +124,7 @@ module HardwareList content += " " end - raw_name = host.start_with?('shard-') ? "#{host}1" : host - content += "[raw data](/hardware/#{raw_name}/filelist.html)\n" + content += "[raw data](/hardware/#{host}/filelist.html)\n" content += "
#{hw_description_to_pretty_yaml(data)}
\n\n" end end diff --git a/site-publishing/lib/hw_parse.rb b/site-publishing/lib/hw_parse.rb index 347a66dc252710603e0313eb6e013812efa9dc56..79a1bf47043d6440495a19d0228d2df98c827667 100755 --- a/site-publishing/lib/hw_parse.rb +++ b/site-publishing/lib/hw_parse.rb @@ -79,7 +79,7 @@ end module I915DisplayInfo def self.is_connector_line?(line) - line =~ /^connector \d+:/ + line =~ /^\[?connector:? ?\d+/i end @@ -102,7 +102,7 @@ module I915DisplayInfo def self.get_status_and_name(line) - connector = line.scan(/connector \d+: type (\S+), status: (connected|disconnected)/) + connector = line.scan(/\[?connector(?: |:)\d+:(?: type )?(\S+)?(?:]:|,) status: (connected|disconnected)/i) connector.flatten! end diff --git a/site/index.md b/site/index.md index bc9bfa182c3a61f9f2c3fee271c7d1a4c3fc66d9..e22e47ddada7bf3d462f74361d28e0fddcebefc2 100644 --- a/site/index.md +++ b/site/index.md @@ -240,6 +240,12 @@ pre-merge/post-merge). [kasan]: https://www.kernel.org/doc/html/latest/dev-tools/kasan.html +### Other Runs + +**Resume runs** are using the same test list as Full IGT but are done on a +single machine. In case of hangs/incompletes the run is resumed. They are not +a part of regular CI and are tiggered on demand. + ## Contacts * **IRC:** #intel-gfx-ci @ freenode diff --git a/site/pre-merge-results.md b/site/pre-merge-results.md index 339efc4efe97e15409dda88a09f81e71db1ba310..40fa91e9baca8d64a71ab40fce586fdb2166a94b 100644 --- a/site/pre-merge-results.md +++ b/site/pre-merge-results.md @@ -91,6 +91,20 @@ Each test state change (e.g. pass→fail) has few things listed: * **numer of occurences of same transition across multiple machines:** `+3 similar issues` +## How Serious Are Incompletes And Aborts? + +**Incomplete** means that the machine haven't been able to complete execution +of a test (most often because of a kernel panic or a hard hang). Incompletes +signal very serious issues with stability. Any tests that were supposed to +follow, that are on the same testlist (shard, fast-feedback), are not going to +be executed. + +**Aborts** are as serious as incompletes but the abnormal state was detected +either by IGT Runner or the test itself. They signal that no further testing +is going to be done because the results would not be trustworthy do to the +machine's / kernel condition. + + ## I've Got Some False Positives, What Now? Reply to the e-mail with the results and explain why do those results are diff --git a/site/test-with.md b/site/test-with.md index c19d0e6cbe530762695911b3c192bdc4e31212b1..65da75ee84fde6ec53891a8a8a51e0aac9366e22 100644 --- a/site/test-with.md +++ b/site/test-with.md @@ -21,6 +21,10 @@ cover letter and all the patches (e.g. `[PATCH 0/1]`). Older versions of git do not add those for series with just a single patch. Patchwork uses "patch number 0" to tell that the mail is a cover letter. +**Warning:** Don't test-with old series. The historical builds artifact are +being removed aggressively. As of now if you test-with anything older than a +day the behavior is undefined. + ## Results If the `Test-with:` has been picked up correctly you should see, near the