Skip to content

Commit

Permalink
remove equivalence check for property files during parsing task defin…
Browse files Browse the repository at this point in the history
…tions.

The method `os.path.samefile` does not work reliably on Windows when using network storage.

Using VirtualBox with shared directories,
Python seems to be not able to distinguish reliably between different property files.
I do not know the exact reason, but the following benchmark definition causes a weird behaviour:
(requires CPAchecker r35613 and a current BenchExec version)
scripts/benchmark.py @WebCloud test/test-sets/integration-bam.xml

The benchmark is expected to have 1847 tasks,
and Linux shows that number when submitting the tasks.
Windows however finds for the same benchmark 2070 tasks,
because it ignores seme invalid property matches.
I have even seen other numbers, between the real one and 2070.
The bug seems to deoend on the provided inodes for those files.

I do not know, when files need to be identical, whether this is a bug
in our scripts or in Python (3.9.0 for Win64) or in VirtualBox 5.2.42.
The fix in these lines fix the bug, however it removed the equivalence check.
I do not know a case where the equivalence check would have helped.
  • Loading branch information
kfriedberger committed Oct 18, 2020
1 parent e73e799 commit 099b616
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions benchexec/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -853,9 +853,7 @@ def create_run_from_task_definition(

# TODO We could reduce I/O by checking absolute paths and using os.path.samestat
# with cached stat calls.
if prop.filename == expanded[0] or os.path.samefile(
prop.filename, expanded[0]
):
if prop.filename == expanded[0]:
expected_result = prop_dict.get("expected_verdict")
if expected_result is not None and not isinstance(
expected_result, bool
Expand Down

0 comments on commit 099b616

Please sign in to comment.