[petsc-dev] Test parsing

Jacob Faibussowitsch jacob.fai at gmail.com
Thu Oct 28 08:22:46 CDT 2021


Fix is trivial, we just need to replace ‘\n’ with os.linesep everywhere.

https://docs.python.org/3/library/os.html#os.linesep <https://docs.python.org/3/library/os.html#os.linesep>

Best regards,

Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)

> On Oct 28, 2021, at 08:12, Matthew Knepley <knepley at gmail.com> wrote:
> 
> I just found a loophole in the test parsing happening here:
> 
>   https://gitlab.com/petsc/petsc/-/blob/main/config/testparse.py#L530 <https://gitlab.com/petsc/petsc/-/blob/main/config/testparse.py#L530>
> 
> If your file was produced on Windows (CRLF), then the parsing fails and tests
> are silently ignored. This took me some time to find and could be confusing
> for others. I think we should either:
> 
>   a) Fix the parser to work with CRLF as well
> 
> or
> 
>   b) Fail immediately for CRLF files
> 
> What do you think?
> 
>   Thanks,
> 
>      Matt
> 
> -- 
> What most experimenters take for granted before they begin their experiments is infinitely more interesting than any results to which their experiments lead.
> -- Norbert Wiener
> 
> https://www.cse.buffalo.edu/~knepley/ <http://www.cse.buffalo.edu/~knepley/>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-dev/attachments/20211028/bef21382/attachment.html>


More information about the petsc-dev mailing list