]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
[gdb/testsuite] Use regexp to match $_gdb_{major,minor}
authorTom de Vries <tdevries@suse.de>
Sun, 17 Aug 2025 06:57:09 +0000 (08:57 +0200)
committerTom de Vries <tdevries@suse.de>
Sun, 17 Aug 2025 06:57:09 +0000 (08:57 +0200)
commitf28a89fd767ff58693b9d5af8e42e211168fae50
tree7eb3f9067e1961b72d81f6c97c31d55c94a2e542
parentf586f9b61d1e5d91f010e68922b8c8b86f787a27
[gdb/testsuite] Use regexp to match $_gdb_{major,minor}

Every time we update the gdb version number, test-case gdb.base/default.exp
needs updating because it matches the values of convenience variables
$_gdb_{major,minor} using hardcoded expected values:
...
{$_gdb_major = 17} \
{$_gdb_minor = 1} \
...

I'm assuming the values were hardcoded because gdb_test_list_exact was used.

Since the previous patch, that's not longer the case, so use regexps instead,
getting rid of this annoyance [1].

Tested on x86_64-linux.

[1] https://sourceware.org/pipermail/gdb-patches/2019-October/160935.html
gdb/testsuite/gdb.base/default.exp