Added additional bad inputs and enhanced error handling.#205
Added additional bad inputs and enhanced error handling.#205milkshakeuk merged 6 commits intonHapiNET:masterfrom
Conversation
|
@JlKmn I don't suppose you could cast your eyes over this to make sure we haven't misunderstood anything? |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
@milkshakeuk no problem I will take a look soon |
|
also i will do another last fuzzing run with a new server cluster I have access to now after the pr is done |
kulgg
left a comment
There was a problem hiding this comment.
@milkshakeuk seems good. the annoying test fails are fixed as well now. good style improvement for the parser tests.
one thing i notice when i actually pipe input into my parser harness cs program with the new nhapi package is that it gives an error for the ConfigurationManager version 4.7.0. I always fix this by changing the version in nHapi.v2.nuspec to
<dependency id="System.Configuration.ConfigurationManager" version="5.0.0" />
Might be worth an extra commit.
So far in the new Fuzzing run i have only found 1 exception after doing a short 4million executions run. The common errors are fixed. I will do a longer run now.
This comment has been minimized.
This comment has been minimized.
|
@AMCN41R @JlKmn the Linux build and test action is still failing on this PR, one of the (bad) inputs, most likely a line endings git checkout issue? |
|
@milkshakeuk
So even though there is no newline character in the file, in Linux there is an extra 0x0A Byte at the end. That's what makes the difference i think. A .gitattributes for the BadInputs Folder could work. |
|
Now that I think about it the correct exception for the bug is NullReference since the Fuzzing results are from Linux. The problem is with debugging these on Windows with the extra linux newline at the end missing. It just wasn't a difference maker in any of the other testcases. We just need to add an extra newline at the end when debugging under Windows. The .gitattributes can stay the same. |
|
So i think the fix is simply adding \n after the ReadAllText in the BadInputTests |
This comment has been minimized.
This comment has been minimized.
|
@AMCN41R I was wrong, i think we need a .gitattributes. The Linux Tests now have \n\n at the end, they need to always have Windows file ending without \n. |
|
Also for the handed gracefully function adding the \n is missing |
@AMCN41R @JlKmn I don't think manually adding It might be easier to commit the files from source unmodified (using git on Linux) but instruct git via This should ensure we get the same result regardless of running the tests on windows or Linux... then we can fix the parser 😁. maybe add and commit something like this to This should instruct git to prevent attempting to normalize the files regardless of content. |
|
@milkshakeuk ok I will add the additional Fuzz Results from my last run as an issue. not that many crash inputs. |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Unit Test Results 5 files 103 suites 16s ⏱️ Results for commit 12aafec. |
Addresses issue #203
LegacyPipeParserBadInputTestsand createdPipeParserBadInputTests