From 9750be79ccb3f97f1c71601007cae798f2281364 Mon Sep 17 00:00:00 2001 From: Douglas RAILLARD Date: Tue, 25 Jun 2019 14:33:42 +0100 Subject: [PATCH 1/2] lisa.exekall_customize: Fix NoValue handling in exekall compare Avoid counting NoValue as a failure, since we don't want exceptions to pollute the regression tables. --- lisa/exekall_customize.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lisa/exekall_customize.py b/lisa/exekall_customize.py index 7ac867372..ecb5461c2 100644 --- a/lisa/exekall_customize.py +++ b/lisa/exekall_customize.py @@ -235,8 +235,17 @@ comparison. Can be repeated.""") alpha = self.args.alpha / 100 show_non_significant = self.args.non_significant + def get_roots(db): + return { + froz_val + for froz_val in db.get_roots() + # Filter-out NoValue so it does not get counted as a failure, + # since bool(NoValue) is False + if froz_val.value is not NoValue + } + result_list_old, result_list_new = [ - db.get_roots() + get_roots(db) for db in db_list ] -- GitLab From 553143753df483a14939dea72a80db4d88ce9bf0 Mon Sep 17 00:00:00 2001 From: Douglas RAILLARD Date: Tue, 25 Jun 2019 15:19:58 +0100 Subject: [PATCH 2/2] bisector: Fix -oexport-db when db would be empty Avoid creating a ValueDB file when it would be empty, instead of raising an exception. --- tools/bisector/bisector/bisector.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tools/bisector/bisector/bisector.py b/tools/bisector/bisector/bisector.py index 68e450743..30d966d63 100755 --- a/tools/bisector/bisector/bisector.py +++ b/tools/bisector/bisector/bisector.py @@ -2364,12 +2364,13 @@ class LISATestStep(ShellStep): for db in {entry['db'] for entry in entry_list} ] - with contextlib.suppress(FileNotFoundError): - existing_db = ValueDB.from_path(export_db) - db_list.append(existing_db) + if db_list: + with contextlib.suppress(FileNotFoundError): + existing_db = ValueDB.from_path(export_db) + db_list.append(existing_db) - merged_db = ValueDB.merge(db_list) - merged_db.to_path(export_db, optimize=False) + merged_db = ValueDB.merge(db_list) + merged_db.to_path(export_db, optimize=False) return out -- GitLab