]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite: Remove duplicates from gdb.base/ui-redirect.exp
authorLancelot SIX <lsix@lancelotsix.com>
Sun, 21 Nov 2021 00:20:56 +0000 (00:20 +0000)
committerLancelot SIX <lsix@lancelotsix.com>
Fri, 7 Jan 2022 22:43:33 +0000 (22:43 +0000)
When running the testsuite, I have:

    Running .../gdb/testsuite/gdb.base/ui-redirect.exp ...
    DUPLICATE: gdb.base/ui-redirect.exp: redirect while already logging: set logging redirect off

Fix by moving the first 'set logging redirect off' to the end of the
previous [with_test_prefix] test block. The statement's purpose is to
clean the on flag set in this previous block, so moving it there makes
sense and does not change the sequence of commands in the test file.

Tested on x86_64-linux.

gdb/testsuite/gdb.base/ui-redirect.exp

index 7d9f26862b0e708f792b0a96e5222a267176c02c..13bc964f46c92c4956fb659335f184d7e00f7d8e 100644 (file)
@@ -95,10 +95,10 @@ with_test_prefix "redirect" {
     gdb_test_no_output "userdefined"
     gdb_test "set logging enabled off" "Done logging to /dev/null\\."
     gdb_test "help" "List of classes of commands:.*"
+    gdb_test_no_output "set logging redirect off"
 }
 
 with_test_prefix "redirect while already logging" {
-    gdb_test_no_output "set logging redirect off"
     gdb_test "set logging enabled on" \
     "Copying output to /dev/null.*Copying debug output to /dev/null\\."
     gdb_test "set logging redirect on" \