diff options
author | Alon Zakai <azakai@google.com> | 2024-11-20 08:23:14 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-20 08:23:14 -0800 |
commit | 81dbc52c446680469a5e00e4e26b091bfc266a59 (patch) | |
tree | 24fe508bbca08e559c5489a59209129667bdfb15 /test/unit/test_cluster_fuzz.py | |
parent | e13bf0fb72fca160f457570b930c4ba3c35ead3a (diff) | |
download | binaryen-81dbc52c446680469a5e00e4e26b091bfc266a59.tar.gz binaryen-81dbc52c446680469a5e00e4e26b091bfc266a59.tar.bz2 binaryen-81dbc52c446680469a5e00e4e26b091bfc266a59.zip |
Fuzzer: Legalize and prune the JS interface in pickPasses (#7092)
Also add a test that the ClusterFuzz run.py does not warn,
which was helpful when debugging this.
Diffstat (limited to 'test/unit/test_cluster_fuzz.py')
-rw-r--r-- | test/unit/test_cluster_fuzz.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/unit/test_cluster_fuzz.py b/test/unit/test_cluster_fuzz.py index 293cfa339..1d275c712 100644 --- a/test/unit/test_cluster_fuzz.py +++ b/test/unit/test_cluster_fuzz.py @@ -97,6 +97,18 @@ class ClusterFuzz(utils.BinaryenTestCase): self.assertTrue(not os.path.exists(fuzz_file)) self.assertTrue(not os.path.exists(flags_file)) + # Run.py should report no errors or warnings to stderr, except from + # those we know are safe. + SAFE_WARNINGS = [ + # When we randomly pick no passes to run, this is shown. + 'warning: no passes specified, not doing any work', + ] + stderr = proc.stderr + for safe in SAFE_WARNINGS: + stderr = stderr.replace(safe, '') + stderr = stderr.strip() + self.assertEqual(stderr, '') + def test_fuzz_passes(self): # We should see interesting passes being run in run.py. This is *NOT* a # deterministic test, since the number of passes run is random (we just |