From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) by sourceware.org (Postfix) with ESMTPS id 249983858D38 for ; Fri, 8 Mar 2024 10:30:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 249983858D38 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=suse.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.de ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 249983858D38 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709893820; cv=none; b=NXYQG9P5dPqOEDriwY8HjExY4eJaFjdhLB6uqXnPWS6U5oPraY20xd1sBfufog9E10KcAPLlUHX9e/2FEbbcApBN1rbcQTT8VfeQE0+hP3lIK4czCT6VebwmsIwnhtyLpjdvly7rZFnjWmyVOr/tH1JrFMEaiMwPEJvyvnpu0iE= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1709893820; c=relaxed/simple; bh=R4i3eWGqTGySPR622oCpmiARc3sGQUGRaCxlML2T+nk=; h=DKIM-Signature:DKIM-Signature:DKIM-Signature:DKIM-Signature:From: To:Subject:Date:Message-Id:MIME-Version; b=JevoxVhm+KfcwoOkL445wydYeUExh+umFOLarQvfPkEaDBQEeyeoIqx8VKzqwf8hhlAp4f3lIjHFB3tyM5Zj6u9lS+fZ4zhYqPAD57oQxE7OrRwJMeej1FwXQm++GK0R0R84h/HmOTLiFsmod0wjIIi8JfeTiWlPAPiQo5gVXmo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 34BA017158 for ; Fri, 8 Mar 2024 09:33:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1709890386; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xXhNy1SQOl8MgjMuihXwGU2rTiJNcHeP/7fNwIPvqFs=; b=vKzS84J9bpsJGf13gLVBrR+leB+PPGYfKU+wMZBMh3N3XvMF/L/mc6H6qLvjuHEJ2Kcfwo KkQtBkY/xyph+wzD2RFDfz0Ot8Jygxvc3TrP4TPGEjy+PpYPsrJpd6NZLZKO7L505AZZrw RCIHUgTJBDOsQAcL+cWanEpe0tzbyHg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1709890386; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xXhNy1SQOl8MgjMuihXwGU2rTiJNcHeP/7fNwIPvqFs=; b=1WONzbuFZViSxiuZtUa32NLOiI+VfP7UHx9CSCpOF/JsSGKKADjHLFfRh4OkbQpJkI4i3T EAL1/pMbDUAlE9AQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1709890386; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xXhNy1SQOl8MgjMuihXwGU2rTiJNcHeP/7fNwIPvqFs=; b=vKzS84J9bpsJGf13gLVBrR+leB+PPGYfKU+wMZBMh3N3XvMF/L/mc6H6qLvjuHEJ2Kcfwo KkQtBkY/xyph+wzD2RFDfz0Ot8Jygxvc3TrP4TPGEjy+PpYPsrJpd6NZLZKO7L505AZZrw RCIHUgTJBDOsQAcL+cWanEpe0tzbyHg= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1709890386; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xXhNy1SQOl8MgjMuihXwGU2rTiJNcHeP/7fNwIPvqFs=; b=1WONzbuFZViSxiuZtUa32NLOiI+VfP7UHx9CSCpOF/JsSGKKADjHLFfRh4OkbQpJkI4i3T EAL1/pMbDUAlE9AQ== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id 1964913786 for ; Fri, 8 Mar 2024 09:33:05 +0000 (UTC) Received: from dovecot-director2.suse.de ([2a07:de40:b281:106:10:150:64:167]) by imap1.dmz-prg2.suse.org with ESMTPSA id 0KAHBVHb6mWLYAAAD6G6ig (envelope-from ) for ; Fri, 08 Mar 2024 09:33:05 +0000 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [PATCH v4 1/6] gdb/testsuite: Reduce indentation in gdb.threads/threadcrash.exp Date: Fri, 8 Mar 2024 10:33:37 +0100 Message-Id: <20240308093342.26745-2-tdevries@suse.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20240308093342.26745-1-tdevries@suse.de> References: <20240308093342.26745-1-tdevries@suse.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: smtp-out1.suse.de; none X-Spam-Score: 3.52 X-Spamd-Result: default: False [3.52 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; R_MISSING_CHARSET(2.50)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[gdb-patches@sourceware.org]; BROKEN_CONTENT_TYPE(1.50)[]; RCPT_COUNT_ONE(0.00)[1]; NEURAL_HAM_LONG(-1.00)[-1.000]; RCVD_COUNT_THREE(0.00)[3]; TO_DN_NONE(0.00)[]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-1.000]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-0.18)[70.49%] X-Spam-Status: No, score=-12.3 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: In test-case gdb.threads/threadcrash.exp we have an unnecessarily indented gdb_test_multiple: ... gdb_test_multiple "thread apply all backtrace" \ "Get thread information" -lbl { -re "#\[0-9\]+\\\?\\\?\[^\n\]*" { ... Fix this by moving the command into a variable, allowing the "gdb_test_multiple ... {" to fit on a single 80 chars line. Tested on arm-linux and x86_64-linux. --- gdb/testsuite/gdb.threads/threadcrash.exp | 116 +++++++++++----------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/gdb/testsuite/gdb.threads/threadcrash.exp b/gdb/testsuite/gdb.threads/threadcrash.exp index 996e020d1e8..3d269ec88c5 100644 --- a/gdb/testsuite/gdb.threads/threadcrash.exp +++ b/gdb/testsuite/gdb.threads/threadcrash.exp @@ -53,64 +53,64 @@ proc thread_apply_all {} { set unwind_fail false - gdb_test_multiple "thread apply all backtrace" \ - "Get thread information" -lbl { - -re "#\[0-9\]+\\\?\\\?\[^\n\]*" { - set unwind_fail true - exp_continue - } - -re "\[^\n\]*syscall_task .location=SIGNAL_ALT_STACK\[^\n\]*" { - lappend test_list [multi_line ".*sleep.*" \ - ".*do_syscall_task .location=SIGNAL_ALT_STACK.*" \ - ".*signal_handler.*" \ - ".*signal handler called.*" \ - ".*pthread_kill.*" \ - ".*thread_function.*"] - exp_continue - } - -re "\[^\n\]*syscall_task .location=SIGNAL_HANDLER\[^\n\]*" { - lappend test_list [multi_line ".*sleep.*" \ - ".*do_syscall_task .location=SIGNAL_HANDLER.*" \ - ".*signal_handler.*" \ - ".*signal handler called.*" \ - ".*pthread_kill.*" \ - ".*thread_function.*"] - exp_continue - } - -re "\[^\n\]*syscall_task .location=NORMAL\[^\n\]*" { - lappend test_list [multi_line ".*sleep.*" \ - ".*do_syscall_task .location=NORMAL.*" \ - ".*thread_function.*"] - exp_continue - } - -re "\[^\n\]*spin_task .location=SIGNAL_ALT_STACK\[^\n\]*" { - lappend test_list [multi_line ".*do_spin_task .location=SIGNAL_ALT_STACK.*" \ - ".*signal_handler.*" \ - ".*signal handler called.*" \ - ".*pthread_kill.*" \ - ".*thread_function.*"] - exp_continue - } - -re "\[^\n\]*spin_task .location=SIGNAL_HANDLER\[^\n\]*" { - lappend test_list [multi_line ".*do_spin_task .location=SIGNAL_HANDLER.*" \ - ".*signal_handler.*" \ - ".*signal handler called.*" \ - ".*pthread_kill.*" \ - ".*thread_function.*"] - exp_continue - } - -re "\[^\n\]*spin_task .location=NORMAL\[^\n\]*" { - lappend test_list [multi_line ".*do_spin_task .location=NORMAL..*" \ - ".*thread_function.*"] - exp_continue - } - -re "\[^\n\]*main\[^\n\]*" { - lappend test_list ".*main.*" - exp_continue - } - -re "$::gdb_prompt " { - pass $gdb_test_name - } + set cmd "thread apply all backtrace" + gdb_test_multiple $cmd "Get thread information" -lbl { + -re "#\[0-9\]+\\\?\\\?\[^\n\]*" { + set unwind_fail true + exp_continue + } + -re "\[^\n\]*syscall_task .location=SIGNAL_ALT_STACK\[^\n\]*" { + lappend test_list [multi_line ".*sleep.*" \ + ".*do_syscall_task .location=SIGNAL_ALT_STACK.*" \ + ".*signal_handler.*" \ + ".*signal handler called.*" \ + ".*pthread_kill.*" \ + ".*thread_function.*"] + exp_continue + } + -re "\[^\n\]*syscall_task .location=SIGNAL_HANDLER\[^\n\]*" { + lappend test_list [multi_line ".*sleep.*" \ + ".*do_syscall_task .location=SIGNAL_HANDLER.*" \ + ".*signal_handler.*" \ + ".*signal handler called.*" \ + ".*pthread_kill.*" \ + ".*thread_function.*"] + exp_continue + } + -re "\[^\n\]*syscall_task .location=NORMAL\[^\n\]*" { + lappend test_list [multi_line ".*sleep.*" \ + ".*do_syscall_task .location=NORMAL.*" \ + ".*thread_function.*"] + exp_continue + } + -re "\[^\n\]*spin_task .location=SIGNAL_ALT_STACK\[^\n\]*" { + lappend test_list [multi_line ".*do_spin_task .location=SIGNAL_ALT_STACK.*" \ + ".*signal_handler.*" \ + ".*signal handler called.*" \ + ".*pthread_kill.*" \ + ".*thread_function.*"] + exp_continue + } + -re "\[^\n\]*spin_task .location=SIGNAL_HANDLER\[^\n\]*" { + lappend test_list [multi_line ".*do_spin_task .location=SIGNAL_HANDLER.*" \ + ".*signal_handler.*" \ + ".*signal handler called.*" \ + ".*pthread_kill.*" \ + ".*thread_function.*"] + exp_continue + } + -re "\[^\n\]*spin_task .location=NORMAL\[^\n\]*" { + lappend test_list [multi_line ".*do_spin_task .location=NORMAL..*" \ + ".*thread_function.*"] + exp_continue + } + -re "\[^\n\]*main\[^\n\]*" { + lappend test_list ".*main.*" + exp_continue + } + -re "$::gdb_prompt " { + pass $gdb_test_name + } } gdb_assert {$unwind_fail == false} -- 2.35.3