From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 7833) id BED7F3858D28; Fri, 7 Jan 2022 22:44:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BED7F3858D28 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Lancelot SIX To: gdb-cvs@sourceware.org Subject: [binutils-gdb] gdb/testsuite: Remove duplicates from gdb.base/miscexprs.exp X-Act-Checkin: binutils-gdb X-Git-Author: Lancelot SIX X-Git-Refname: refs/heads/master X-Git-Oldrev: 3c1f0c735d69d8e06003f5344d4a19b4320f10d8 X-Git-Newrev: aaff91fdf209a03c91a59681ca187c92d94826b8 Message-Id: <20220107224435.BED7F3858D28@sourceware.org> Date: Fri, 7 Jan 2022 22:44:35 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jan 2022 22:44:35 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Daaff91fdf209= a03c91a59681ca187c92d94826b8 commit aaff91fdf209a03c91a59681ca187c92d94826b8 Author: Lancelot SIX Date: Fri Nov 19 19:05:37 2021 +0000 gdb/testsuite: Remove duplicates from gdb.base/miscexprs.exp =20 When running the testsuite I=C2=A0see: =20 Running .../gdb/testsuite/gdb.base/miscexprs.exp ... DUPLICATE: gdb.base/miscexprs.exp: print value of !ibig.i[100] DUPLICATE: gdb.base/miscexprs.exp: print value of !ibig.i[100] =20 This is due to an explicit test name repeated across multiple tests. The actual test explicit names do not add much over the command from wich default test names are derived. =20 Fix by removing the explicit test names across the file where they do not add value. While at doing some cleaning, also use $gdb_test_name in the various uses of gdb_test_multiple. =20 Tested on x86_64-linux. Diff: --- gdb/testsuite/gdb.base/miscexprs.exp | 73 ++++++++++++++------------------= ---- 1 file changed, 28 insertions(+), 45 deletions(-) diff --git a/gdb/testsuite/gdb.base/miscexprs.exp b/gdb/testsuite/gdb.base/= miscexprs.exp index cbf6715758d..68d8cab656c 100644 --- a/gdb/testsuite/gdb.base/miscexprs.exp +++ b/gdb/testsuite/gdb.base/miscexprs.exp @@ -69,85 +69,68 @@ gdb_test "up" " main .*" "up from marker1" =20 global hex =20 -gdb_test "print &ibig.i\[0\]" " =3D \\(int \\*\\) $hex" \ - "print value of &ibig.i\[0\]" +gdb_test "print &ibig.i\[0\]" " =3D \\(int \\*\\) $hex" =20 -gdb_test_multiple "print &cbig.c\[0\]" "print value of &cbig.c\[0\]" { +gdb_test_multiple "print &cbig.c\[0\]" "" { -re ".\[0-9\]* =3D $hex \"\".*$gdb_prompt $" { - pass "print value of &cbig.c\[0\]" + pass $gdb_test_name } -re ".\[0-9\]* =3D $hex \"*\".*$gdb_prompt $" { - pass "print value of &cbig.c\[0\]" + pass $gdb_test_name } } =20 -gdb_test "print &fbig.f\[0\]" " =3D \\(float \\*\\) $hex" \ - "print value of &fbig.f\[0\]" +gdb_test "print &fbig.f\[0\]" " =3D \\(float \\*\\) $hex" =20 -gdb_test "print &dbig.d\[0\]" " =3D \\(double \\*\\) $hex" \ - "print value of &dbig.d\[0\]" +gdb_test "print &dbig.d\[0\]" " =3D \\(double \\*\\) $hex" =20 -gdb_test_multiple "print &sbig.s\[0\]" "print value of &sbig.s\[0\]" { +gdb_test_multiple "print &sbig.s\[0\]" "" { -re ".\[0-9\]* =3D \\(short \\*\\) $hex.*$gdb_prompt $" { - pass "print value of &sbig.s\[0\]" + pass $gdb_test_name } -re ".\[0-9\]* =3D \\(short int \\*\\) $hex.*$gdb_prompt $" { - pass "print value of &sbig.s\[0\]" + pass $gdb_test_name } } =20 -gdb_test_multiple "print &lbig.l\[0\]" "print value of &lbig.l\[0\]" { +gdb_test_multiple "print &lbig.l\[0\]" "" { -re ".\[0-9\]* =3D \\(long \\*\\) $hex.*$gdb_prompt $" { - pass "print value of &lbig.l\[0\]" + pass $gdb_test_name } -re ".\[0-9\]* =3D \\(long int \\*\\) $hex.*$gdb_prompt $" { - pass "print value of &lbig.l\[0\]" + pass $gdb_test_name } } =20 -gdb_test "print ibig.i\[100\] | 1" " =3D 5" \ - "print value of ibig.i\[100\] | 1" +gdb_test "print ibig.i\[100\] | 1" " =3D 5" =20 -gdb_test "print sbig.s\[90\] & 127" " =3D 127" \ - "print value of sbig.s\[90\] & 127" +gdb_test "print sbig.s\[90\] & 127" " =3D 127" =20 -gdb_test "print !ibig.i\[100\]" " =3D $false" \ - "print value of !ibig.i\[100\]" +gdb_test "print !ibig.i\[100\]" " =3D $false" =20 -gdb_test "print !sbig.s\[90\]" " =3D $false" \ - "print value of !sbig.s\[90\]" +gdb_test "print !sbig.s\[90\]" " =3D $false" =20 -gdb_test "print !fbig.f\[100\]" " =3D $false" \ - "print value of !ibig.i\[100\]" +gdb_test "print !fbig.f\[100\]" " =3D $false" =20 -gdb_test "print !dbig.d\[202\]" " =3D $false" \ - "print value of !ibig.i\[100\]" +gdb_test "print !dbig.d\[202\]" " =3D $false" =20 -gdb_test "print sbig.s\[90\] * 10" " =3D 2550" \ - "print value of !sbig.s\[90\] * 10" +gdb_test "print sbig.s\[90\] * 10" " =3D 2550" =20 -gdb_test "print ibig.i\[100\] * sbig.s\[90\]" " =3D 1275" \ - "print value of ibig.i\[100\] * sbig.s\[90\]" +gdb_test "print ibig.i\[100\] * sbig.s\[90\]" " =3D 1275" =20 -gdb_test "print fbig.f\[100\] * dbig.d\[202\]" " =3D 119.99\[0-9\]*" \ - "print value of fbig.f\[100\] * dbig.d\[202\]" +gdb_test "print fbig.f\[100\] * dbig.d\[202\]" " =3D 119.99\[0-9\]*" =20 -gdb_test "print !(sbig.s\[90\] * 2)" " =3D $false" \ - "print value of !(sbig.s\[90\] * 2)" +gdb_test "print !(sbig.s\[90\] * 2)" " =3D $false" =20 -gdb_test "print sizeof(sbig)" " =3D 800" "print value of sizeof sbig" +gdb_test "print sizeof(sbig)" " =3D 800" =20 -gdb_test "print sizeof(cbig)" " =3D 100" "print value of sizeof cbig" +gdb_test "print sizeof(cbig)" " =3D 100" =20 -gdb_test "print sizeof(lbig)/sizeof(long)" " =3D 900" \ - "print value of sizeof lbig / sizeof long" +gdb_test "print sizeof(lbig)/sizeof(long)" " =3D 900" =20 -gdb_test "print ibig.i\[100\] << 2" " =3D 20" \ - "print value of ibig.i\[100\] << 2" +gdb_test "print ibig.i\[100\] << 2" " =3D 20" =20 -gdb_test "print sbig.s\[90\] >> 4" " =3D 15" \ - "print value of sbig.s\[90\] >> 4" +gdb_test "print sbig.s\[90\] >> 4" " =3D 15" =20 -gdb_test "print lbig.l\[333\] >> 6" " =3D 15624999" \ - "print value of lbig.l\[333\] >> 6" +gdb_test "print lbig.l\[333\] >> 6" " =3D 15624999"