Blame SOURCES/gdb-rhbz1971095-libthread_db-update-5of5.patch

405ea9
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
405ea9
From: Kevin Buettner <kevinb@redhat.com>
405ea9
Date: Wed, 9 Jun 2021 19:52:08 -0700
405ea9
Subject: gdb-rhbz1971095-libthread_db-update-5of5.patch
405ea9
405ea9
;; Backport "mi-sym-info.exp: Increase timeout for 114-symbol-info-functions"
405ea9
;; (Kevin Buettner, RH BZ 1971095)
405ea9
405ea9
Loading libc.so's symbols increased the amount of time needed for
405ea9
114-symbol-info-function to fetch symbols, causing a timeout during my
405ea9
testing.  I enclosed the entire block with a "with_timeout_factor 4",
405ea9
which fixes the problem for me.  (Using 2 also fixed it for me, but it
405ea9
might not be enough when running this test on slower machines.)
405ea9
405ea9
gdb/testsuite/ChangeLog:
405ea9
405ea9
	* gdb.mi/mi-sym-info.exp (114-symbol-info-function test): Increase
405ea9
	timeout.
405ea9
405ea9
diff --git a/gdb/testsuite/gdb.mi/mi-sym-info.exp b/gdb/testsuite/gdb.mi/mi-sym-info.exp
405ea9
--- a/gdb/testsuite/gdb.mi/mi-sym-info.exp
405ea9
+++ b/gdb/testsuite/gdb.mi/mi-sym-info.exp
405ea9
@@ -122,33 +122,35 @@ gdb_test_multiple $cmd $testname -prompt "${mi_gdb_prompt}$" {
405ea9
 # (from the symbol table).  There's often so much output output from
405ea9
 # this command that we overflow expect's buffers, avoid this by
405ea9
 # fetching the output piece by piece.
405ea9
-set testname "List all functions"
405ea9
-set cmd "114-symbol-info-functions --include-nondebug"
405ea9
-set state 0
405ea9
-gdb_test_multiple $cmd ${testname} -prompt "${mi_gdb_prompt}$" {
405ea9
-    -re "114\\^done,symbols=\{" {
405ea9
-	if { $state == 0 } { set state 1 }
405ea9
-	exp_continue
405ea9
-    }
405ea9
-    -re "debug=\\\[${symtab_re}" {
405ea9
-	if { $state == 1 } { set state 2 }
405ea9
-	exp_continue
405ea9
-    }
405ea9
-    -re ",${symtab_re}" {
405ea9
-	exp_continue
405ea9
-    }
405ea9
-    -re "\\\],nondebug=\\\[" {
405ea9
-	if { $state == 2 } { set state 3 }
405ea9
-	exp_continue
405ea9
-    }
405ea9
-    -re "\{address=${qstr},name=${qstr}\}," {
405ea9
-	exp_continue
405ea9
-    }
405ea9
-    -re "\{address=${qstr},name=${qstr}\}\\\]\}\r\n${mi_gdb_prompt}$" {
405ea9
-	if { $state == 3 } {
405ea9
-	    pass $gdb_test_name
405ea9
-	} else {
405ea9
-	    fail $gdb_test_name
405ea9
+with_timeout_factor 4 {
405ea9
+    set testname "List all functions"
405ea9
+    set cmd "114-symbol-info-functions --include-nondebug"
405ea9
+    set state 0
405ea9
+    gdb_test_multiple $cmd ${testname} -prompt "${mi_gdb_prompt}$" {
405ea9
+	-re "114\\^done,symbols=\{" {
405ea9
+	    if { $state == 0 } { set state 1 }
405ea9
+	    exp_continue
405ea9
+	}
405ea9
+	-re "debug=\\\[${symtab_re}" {
405ea9
+	    if { $state == 1 } { set state 2 }
405ea9
+	    exp_continue
405ea9
+	}
405ea9
+	-re ",${symtab_re}" {
405ea9
+	    exp_continue
405ea9
+	}
405ea9
+	-re "\\\],nondebug=\\\[" {
405ea9
+	    if { $state == 2 } { set state 3 }
405ea9
+	    exp_continue
405ea9
+	}
405ea9
+	-re "\{address=${qstr},name=${qstr}\}," {
405ea9
+	    exp_continue
405ea9
+	}
405ea9
+	-re "\{address=${qstr},name=${qstr}\}\\\]\}\r\n${mi_gdb_prompt}$" {
405ea9
+	    if { $state == 3 } {
405ea9
+		pass $gdb_test_name
405ea9
+	    } else {
405ea9
+		fail $gdb_test_name
405ea9
+	    }
405ea9
 	}
405ea9
     }
405ea9
 }