[FIX]: Guard against empty output file path in ServerComparer#14
Open
x15sr71 wants to merge 1 commit into
Open
[FIX]: Guard against empty output file path in ServerComparer#14x15sr71 wants to merge 1 commit into
x15sr71 wants to merge 1 commit into
Conversation
…nt silent comparison failure
9 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
When CCExtractor produces no output file,
ServerComparer.CompareAndAddToResult()callsFile.Open("", FileMode.Open), which throwsArgumentException. The caller inTester.csswallows it and unconditionally callsSendExitCodeAndRuntime()— so the test is marked finished with noTestResultFilerow written and no comparison data sent to the platform.Execution chain
Findings
Command run on the sample-platform server:
Logs —
[ERROR] Path is emptyimmediately followed by[INFO] Finished entry Xin 10 production log files (4778, 4782, 4790, 4792, 4794, 4798, 4804, 4828, 5124, 9298). Example from log 9298 (25 occurrences,
wc -lverified):Log 9299 (same test, Windows): 0 occurrences — Windows missing rows have a separate unrelated cause not addressed here.
DB —
test_resultrow exists (finish received) but notest_result_filerow (comparison never ran),exit_code=0,expected_rc=0, excluding ignored/stdout tests (139, 238, 239):Counts tests where finish was received but no comparison row was written — includes but is not limited to instances caused by this bug.
11 affected regression test IDs (7, 16, 138, 140, 143, 144, 145, 148, 150, 154, 155) all have thousands of historical
TestResultFilerows, confirming this is a runtime failure not a data model gap.Fix
Add a guard inside the
!Hasher.filesAreEqualbranch that checksstring.IsNullOrEmpty(data.ProducedFile) || !File.Exists(data.ProducedFile)and returns early, preventingFile.Open("")from being called.Impact
ArgumentExceptionswallowedTestResultFilerow[ERROR]in logRisks
TestResultFilerow — that requiresserver-side changes and is out of scope.
sample-platformaddresses the counting logic.Deployment
Independent of
sample-platform. Can deploy in parallel with #1118.