gdb: fix gdb.gdb/unittest.exp with C++17 compiler
authorSimon Marchi <simon.marchi@polymtl.ca>
Sat, 30 Oct 2021 02:15:55 +0000 (22:15 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sat, 30 Oct 2021 02:17:07 +0000 (22:17 -0400)
commit311d36251dfcdc45d81b88e5bc27c5bb5a9721d0
treef7d1ba6a55a0d83220ade1b617419e18bff9147f
parent3ea44f212995117414bf0fee9aaa430f1e59fa20
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