Skip to content
Snippets Groups Projects
Commit 58d047ac authored by Andrew Burgess's avatar Andrew Burgess
Browse files

gdb/testsuite: tighten patterns in build-id-no-debug-warning.exp

Tighten the expected output pattern in the test script:

  gdb.debuginfod/build-id-no-debug-warning.exp

While working on some other patch I broke GDB such that this warning:

  warning: "FILENAME": separate debug info file has no debug info

(which is generated in build-id.c) didn't actually include the
FILENAME any more -- yet this test script continued to pass.  It turns
out that this script doesn't actually check for FILENAME.

This commit extends the test pattern to check for the full warning
string, including FILENAME, and also removes some uses of '.*' to make
the test stricter.
parent 23323938
No related branches found
No related tags found
No related merge requests found
......@@ -87,10 +87,12 @@ gdb_test_no_output "set debug-file-directory ${debug_file_directory}" \
"set debug-file-directory"
# Now load the file into GDB, and look for the warning.
set debug_file_re [string_to_regexp $build_id_debug_file]
gdb_test "file ${build_id_debug_file}" \
[multi_line \
".*Reading symbols from.*debuginfo.*" \
".*separate debug info file has no debug info.*"] \
"Reading symbols from $debug_file_re\\.\\.\\." \
"warning: \"$debug_file_re\": separate debug info file has no debug info" \
"\\(No debugging symbols found in \[^\r\n\]+\\)"] \
"load test file, expect a warning"
# Now we should close GDB.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment