From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-xc32.google.com (mail-oo1-xc32.google.com [IPv6:2607:f8b0:4864:20::c32]) by sourceware.org (Postfix) with ESMTPS id 7AD743858D37 for ; Wed, 24 Jan 2024 10:48:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7AD743858D37 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 7AD743858D37 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::c32 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1706093304; cv=none; b=Hp7rQT9rktHmiBT/eFWCOP7jjj/W2Psbn6F2q7WViwAi9ECtpiXonpKFf7H3W+4a4sVTy5+cihsKsIEFtZWG5FWROgkgYTyJIN2G4S5Z/YNZuVtN9iUwr/kHZ/IKzvz9XUUuwfV/9/j5RMQWX2zzHsj7p0veRbcCMzCVpAKqmYA= 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=bo7zTojN1KnzPmrABZmovg1sMyjymd8POftqYcN4b/YJ/xj9jj1uMEjFReSCTPz9kXtsWxjgCVKgSJTM5ojHbABYWSkYhLmDEroSZDSm5mVZaorGPgPSmNT8kT789IN+d8FrJKckCYUsbMZh5y5/BdxILTLZM7aU3vhW3t4ZziE= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-oo1-xc32.google.com with SMTP id 006d021491bc7-595b208a050so3205651eaf.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=1706093300; x=1706698100; 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=emtUMgO6AynwWdxi6DT0IIJnxbDljw91C3OZQ1f25Pa1/o9KCD/Pul6EOpV50wP7CL 9Zu5rqtrYP721VmvmMXpS/bFEacjFkdv7uxnVc4TgEEZcDLGMdrEWfMqv2Rtb7YrQ0Yo /yV4Jox6N3DgMbJfOcSVdPaYBp1fl8GbCnoyK03NFKo6oXuTX+VqixxgbJvhDXnN8V67 itXWjXUpAx89vMLkd9/D37nU7nokG7+LUo7xKdz2NxueDW2S+v6FDWNGV9tyyQjb/GYO UinCnfzVigpKDJHoO0XBQ26Ao/7+gSaMihpRm6PC7HjUhjX5bbXWFyhGzQcag7bx7dbn 6c/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1706093300; x=1706698100; 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=U5WyZNfA6TAG13Tg0uRXf4jD2XQFRDGbfI5cjJ4E5MWGWRaYPlxyvqIxRQwd9XHhXg VQcnASg2Xfdx5Jlv87TChhECiNikxPa3VB4iQuTupYpYWmE6XoO8xvqUFWRuyKBlzHAo AH4E52/dUVhmcSmmgXn3FX6ug0YJwKsRAkIZJguX9V54GwEY7yn78KHXhq0jRQ2FZahv UDHCHTVyO0Al14Y+AGbvQSfAd/4d7NFBD4m7BMGqLBYVszMBgNzqWR8aSxDMGNAmCDmD RSzWgDTp09VKEXHs1uL8T/qmenVq3IymdpJJe7E70yw5+aH3HrfSs++MBxX4Uo/5nGUC 8gEQ== X-Gm-Message-State: AOJu0Yw9+Z/xzUgMitAm4PwvrYMDiwRNJP5Ky79X9AJ34KQwiGBc87vb 4kBLutZHLTpZ5yYE6SwKUnSREqgG6yDzRLh1PflHFUIsvWnBdoPX1YxHRkHAlQs= 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