renatahodovan / picire Goto Github PK
View Code? Open in Web Editor NEWParallel Delta Debugging Framework
License: Other
Parallel Delta Debugging Framework
License: Other
As per title: If you use the --atom=both
flag then the initial message about the test case size says that the file contains (say) 15 "boths". This is presumably the line count (at least, the numbers agree), so it should say 15 lines.
It correctly reports "characters" rather than "boths" for the second run when it minimizes by character.
(I apologise for how incredibly nitpicky this issue is)
When I try to run picire
with an uninteresting initial run, it crashes with an assertion failure:
Initial test contains 4 lines
Iteration #0
Run #0
Config size: 4
Traceback (most recent call last):
File "REDACTED/picire/.venv/bin/picire", line 8, in <module>
sys.exit(execute())
File "REDACTED/picire/picire/cli.py", line 286, in execute
out_src = reduce(args.src,
File "REDACTED/picire/picire/cli.py", line 249, in reduce
min_set = dd(list(range(len(src))))
File "REDACTED/picire/picire/dd.py", line 63, in __call__
assert self._test_config(config, (f'r{run}', 'assert')) is Outcome.FAIL
AssertionError
I expected picire
to exit and state that the initial run is uninteresting.
Here is the example I used:
(.venv) picire % cat foo.txt
a
b
c
d
(.venv) picire % cat dumb_tester.sh
#!/usr/bin/env bash
exit 1
(.venv) picire % picire -i foo.txt --test ./dumb_tester.sh
I'm using commit 63668bb0409f4078ff84564065d161661bd388ae
I'm currently using the following patch as a workaround:
diff --git a/picire/dd.py b/picire/dd.py
index 888679d..ffeef28 100644
--- a/picire/dd.py
+++ b/picire/dd.py
@@ -60,7 +60,12 @@ class DD(object):
for run in itertools.count():
logger.info('Run #%d', run)
logger.info('\tConfig size: %d', len(config))
- assert self._test_config(config, (f'r{run}', 'assert')) is Outcome.FAIL
+ outcome = self._test_config(config, (f'r{run}', 'assert'))
+ if run == 0 and outcome is Outcome.PASS:
+ # Initial run is not interesting, so we can't expect any
+ # reductions or subsets to be interesting either.
+ break
+ assert outcome is Outcome.FAIL
# Minimization ends if the configuration is already reduced to a single unit.
if len(config) < 2:
but it cannot distinguish between an uninteresting initial run and an interesting run that requires all inputs.
P.S. This tool is great! It's saved me a lot of debugging time.
EDIT: updated the patch
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.