Skip to content

Make test execution abort when no more input values exist

Thomas Lemberger requested to merge provoke-eof-for-missing-inputs into main

The test executables already abort with an error message if a test input is expected but an EOF is encountered. But this abort was not provoked yet, because we used stdin for communicating inputs to test executions. Stdin was only closed after the process finished, so a missing input (and consequently, no more inputs on stdin) lead the test execution to wait for a new input indefinitely. The test execution was then abort once a time limit was hit.

We now change this by introducing an EOF after the last test input is read: This correctly provokes the test-execution abort. We could introduce the EOF manually by closing stdin, but this requires manual management of the process communication. To avoid this, we introduce a temporary file as input file. This automatically has an EOF after it is fully read.

Merge request reports