libstdc++: Abort test after 1000 lines of output

Handle overly large output by aborting the log and thus the test. This
is a similar condition to a timeout.

libstdc++-v3/ChangeLog:

	* testsuite/experimental/simd/driver.sh: When handling the pipe
	to log (and on verbose to stdout) count the lines. If it exceeds
	1000 log the issue and exit 125, which is then handled as a
	failure.
This commit is contained in:
Matthias Kretz 2021-02-03 15:49:30 +00:00 committed by Jonathan Wakely
parent b83a52fe07
commit ec384c5690

View File

@ -258,7 +258,11 @@ BEGIN { count = 0 }
/^###exitstatus### [0-9]+$/ { exit \$2 }
{
print >> \"$log\"
if (count >= 1000) next
if (count >= 1000) {
print \"Aborting: too much output\" >> \"$log\"
print \"Aborting: too much output\"
exit 125
}
++count
if (length(\$0) > $maxcol) {
i = 1
@ -282,8 +286,17 @@ END { close(\"$log\") }
"
else
awk "
BEGIN { count = 0 }
/^###exitstatus### [0-9]+$/ { exit \$2 }
{ print >> \"$log\" }
{
print >> \"$log\"
if (count >= 1000) {
print \"Aborting: too much output\" >> \"$log\"
print \"Aborting: too much output\"
exit 125
}
++count
}
END { close(\"$log\") }
"
fi