From 311d36251dfcdc45d81b88e5bc27c5bb5a9721d0 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Fri, 29 Oct 2021 22:15:55 -0400 Subject: gdb: fix gdb.gdb/unittest.exp with C++17 compiler On a machine with gcc 11, I get: FAIL: gdb.gdb/unittest.exp: test_completion: tab complete "maintenance selftest string_v" (second tab) (timeout) FAIL: gdb.gdb/unittest.exp: test_completion: tab complete "maintenance selftest string_vie" (timeout) That's because when compiling with C++ >= 17, we use the standard version of string_view, and don't have a selftest for it. So the list of selftests shown by the tab completion when completing "string_v" differs. Change the test to use the copy_* tests instead. Change-Id: I85f6aa44ee5fc9652b9bd4451e0506b89773526b --- gdb/testsuite/gdb.gdb/unittest.exp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'gdb') diff --git a/gdb/testsuite/gdb.gdb/unittest.exp b/gdb/testsuite/gdb.gdb/unittest.exp index bcb4bbd..d25f87b 100644 --- a/gdb/testsuite/gdb.gdb/unittest.exp +++ b/gdb/testsuite/gdb.gdb/unittest.exp @@ -73,13 +73,13 @@ proc_with_prefix test_completion {} { clean_restart if { $self_tests_enabled } { - test_gdb_complete_tab_multiple "maintenance selftest string_v" "" \ - {string_vappendf string_view string_vprintf} - test_gdb_complete_tab_unique "maintenance selftest string_vie" \ - "maintenance selftest string_view" " " + test_gdb_complete_tab_multiple "maintenance selftest copy" "_" \ + {copy_bitwise copy_integer_to_size} + test_gdb_complete_tab_unique "maintenance selftest copy_bit" \ + "maintenance selftest copy_bitwise" " " } else { - test_gdb_complete_tab_none "maintenance selftest string_v" - test_gdb_complete_tab_none "maintenance selftest string_vie" + test_gdb_complete_tab_none "maintenance selftest copy_" + test_gdb_complete_tab_none "maintenance selftest copy_bit" } test_gdb_complete_tab_unique "maintenance selftest -ver" "maintenance selftest -verbose" " " test_gdb_complete_tab_none "maintenance selftest name_that_does_not_exist" -- cgit v1.1