testsuite: clarify scan-dump file globbing behavior
The test commands for scanning optimization dump files
perform globbing on the argument that specifies the suffix
of the dump files to be scanned. This behavior is currently
undocumented. Furthermore, the current implementation of
"scan-dump" and similar procedures yields an error whenever
the file name globbing matches more than one file (due to an
attempt to call "open" on multiple files) while a failure to
match any file results in an unresolved test.
This commit documents the globbing behavior. The dump
scanning procedures are changed to make the test unresolved
if globbing matches more than one file.
gcc/ChangeLog:
2020-06-29 Frederik Harwath <frederik@codesourcery.com>
* doc/sourcebuild.texi: Describe globbing of the
dump file scanning commands "suffix" argument.
gcc/testsuite/ChangeLog:
2020-06-29 Frederik Harwath <frederik@codesourcery.com>
* lib/scandump.exp (glob-dump-file): New proc.
(scan-dump): Use glob-dump-file for file name expansion.
(scan-dump-times): Likewise.
(scan-dump-dem): Likewise.
(scan-dump-dem-not): Likewise.
Reviewed-by: Thomas Schwinge <thomas@codesourcery.com>