From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc33.google.com (mail-oo1-xc33.google.com [IPv6:2607:f8b0:4864:20::c33]) by sourceware.org (Postfix) with ESMTPS id 4B9A43858D1E for ; Wed, 24 Jan 2024 10:48:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4B9A43858D1E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linaro.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 4B9A43858D1E Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c33 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706093304; cv=none; b=fadp8dtMz2yehkFsp8ie0SUGgSSXdKTbCQh+ukUVYfmhqlJw/WPbkF+v2iqy/Gl2odht6G5pTKoGf9ZCzIcrp7RxyXBq1+OX74BxS4qz5UMtugExjxTXPvbIa8yxEHuYFoGUnXjN87QYj6zqnEybhhIjpjOo6aF9aekdjyq3oyI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706093304; c=relaxed/simple; bh=POmHkxzPZ/3kVSxOmFJlF/gCdtQsPnss0Ohg44jy/sk=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=Pkc77AACv4u/UGOkswYeyKwdh2hdWEZCVDgOGcOA2jqVAvbpdTMCr8DAaqsctwZIyJgzOl3G1oH39We6XRlhKM2KIF1siarz11zloxcUg+rI6FGmcrTpDJoW0hIWe4bns/DgyClPd3FeoBNpWU1c333wCR7RPesC0SuhIoKuRJs= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oo1-xc33.google.com with SMTP id 006d021491bc7-595b208a050so3205659eaf.0 for ; Wed, 24 Jan 2024 02:48:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1706093301; x=1706698101; darn=gcc.gnu.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=CvScwkt1d2kNcguwYqqmPSJcPo2nWJ5DU/8ESmZPyb4=; b=MJwQhdS/029Bdvbqhk7ztQ/O90lJ7OL50m+4+3n2cLRWUwVwlODZ0gLuovF2FqyGaa elr8XWEg7zh5wGoRo8whIjQb7hxDqFIO7M7uuaON62UNTqa19W04DkO2y48zZXd2AD5q +wLTnlofp5X9HCEcOrrBv0vZj47ETMUWEJCbdzMO20/Az1HM5oRb4QzqKHeimO27H2E4 TBOS5axz2TPR15PFjpDZwseVrrfU0ThjnrUcbGCU7G4YX6NgsmtKyWQowbfcRa0fDKPk gJt4AAt8HxO9Tg3Fe6tU3zW+ymn5urdRo0QoJKu/YlvbEukCHHz3qB8Bx9wJhnHI5hMs RcAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706093301; x=1706698101; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=CvScwkt1d2kNcguwYqqmPSJcPo2nWJ5DU/8ESmZPyb4=; b=EHEp+XmOoQQ5mPjTheSQkM+EA+enlj4VNTUOIatmZTWDtHz3Y9N60xeQxDwuddwZ7n BiVvqJcIjVgVHPBpHXmalvMQgiyJPzTbybT7w3v3ycarX3hpWm73+FsCUXbSMzpd+fJW vE+Qy+1GYhWg25aW2kssV3LL7CJgY7c3cLeAYJpce4DjUY0ANA+gPUjM8rbIXoFK0JpN yKFb6HsYYYJdOVRaYWeWpIXwTVBTKm7qVK+3R50PSuTdqBasYUcIobAxCDOMy4qDs8kd ZoqPrRZFpF1wiJTf4dMhE0zjwFGIs9KWYIARz0gUVUCqIU7j2/ooxfeqKGw6Y+PzuTdZ SlXQ== X-Gm-Message-State: AOJu0Yz4St3hPGf7icDKaP5eHr9blRjb1Nfkghaymb5P8yx7QMTbfpw1 RCd2H7AZKTyBJ8fUEfVm6ue3MG+z1PlLvNnNSkrtc3wHd5KUmwVZNLJs4u/TK0nPLalsANJzDzs wNEg= X-Google-Smtp-Source: AGHT+IE0teaG8tBUpQatTrqD1P/bwvg78ASSkdHiDOKvnhEn77pABiRoa6rN9SCxfaqoYP4QKYOQ4Q== X-Received: by 2002:a05:6820:359:b0:599:9710:55f4 with SMTP id m25-20020a056820035900b00599971055f4mr1047995ooe.19.1706093300672; Wed, 24 Jan 2024 02:48:20 -0800 (PST) Received: from localhost.localdomain ([139.178.84.207]) by smtp.gmail.com with ESMTPSA id g13-20020a4adc8d000000b0059984e8d5c0sm1335360oou.44.2024.01.24.02.48.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Jan 2024 02:48:20 -0800 (PST) From: Christophe Lyon To: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org, tom@tromey.com, jwakely@redhat.com Cc: Christophe Lyon Subject: [PATCH] [testsuite] Fix pretty printers regexps for GDB output Date: Wed, 24 Jan 2024 10:47:50 +0000 Message-Id: <20240124104750.1024129-1-christophe.lyon@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,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: GDB emits end of lines as \r\n, we currently match the reverse \n\r, possibly leading to mismatches under racy conditions. I noticed this while running the GCC testsuite using the equivalent of GDB's READ1 feature [1] which helps detecting bufferization issues. Adjusting the first regexp to match the right order implied fixing the second one, to skip the empty lines. Tested on aarch64-linux-gnu. [1] https//github.com/bminor/binutils-gdb/blob/master/gdb/testsuite/README#L269 2024-01-24 Christophe Lyon libstdc++-v3/ * testsuite/lib/gdb-test.exp (gdb-test): Fix regexps. --- libstdc++-v3/testsuite/lib/gdb-test.exp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/testsuite/lib/gdb-test.exp b/libstdc++-v3/testsuite/lib/gdb-test.exp index 31206f2fc32..0de8d9ee153 100644 --- a/libstdc++-v3/testsuite/lib/gdb-test.exp +++ b/libstdc++-v3/testsuite/lib/gdb-test.exp @@ -194,7 +194,7 @@ proc gdb-test { marker {selector {}} {load_xmethods 0} } { set test_counter 0 remote_expect target [timeout_value] { - -re {^(type|\$([0-9]+)) = ([^\n\r]*)[\n\r]+} { + -re {^(type|\$([0-9]+)) = ([^\n\r]*)\r\n} { send_log "got: $expect_out(buffer)" incr test_counter @@ -250,7 +250,7 @@ proc gdb-test { marker {selector {}} {load_xmethods 0} } { return } - -re {^[^$][^\n\r]*[\n\r]+} { + -re {^[\r\n]*[^$][^\n\r]*\r\n} { send_log "skipping: $expect_out(buffer)" exp_continue } -- 2.34.1