From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 2B95D3856DDF for ; Fri, 28 Apr 2023 14:05:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2B95D3856DDF Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1682690729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=2JgRClgwZZ6vztcqOhWzT4hBLaYo2o8BF9AL6DaPhz4=; b=fIiPUFnlkP7kprfTjH+sXF/ASAimB4xYm48DQvp1HJZrgUUmQPWUt8kJbRHxZuj2DhgzVR HhBkjRZd7HWn87H5ep7e/TphyGCoxa9KzYQ18KxwPQJWIW6FkL/Qd5MT6IufP7XUCm57J1 tuN1/FyD6jE+0qNNTj8sonC95ebjkzE= Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-621-qqrM8j8AMJqt7lE8j4GySA-1; Fri, 28 Apr 2023 10:05:27 -0400 X-MC-Unique: qqrM8j8AMJqt7lE8j4GySA-1 Received: by mail-wm1-f69.google.com with SMTP id 5b1f17b1804b1-3f080f53c49so58104415e9.0 for ; Fri, 28 Apr 2023 07:05:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682690725; x=1685282725; h=mime-version:message-id:date:references:in-reply-to:subject:to:from :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=2JgRClgwZZ6vztcqOhWzT4hBLaYo2o8BF9AL6DaPhz4=; b=CySuQowQfCua2frbkB/yt7NSKcx5wrpnQ6HbZ3w+G848XPF8yBvTpc8tUOqJAkJ5+h rOmVniyQfCoY43K8SJjquPehMTQ8D2xXDURF9yJ/Lj+mzRjhFBXSk8IAEX15vqeHt4p1 Bz6UDBCuz0uFt0EjVPfkFcz66P7fTFx2MIGW+x878s3ZNcCQ3+nij5Dv7At2KHtxPSsl 7Lhz2r3LsBLz9I8phJ79V470vnu6g65CxRWu6BxG2doAaxiYg4Z3213mI/GkcIhaog/T zU2qLl3bNfxIOkHltsqiO/I+kwpFfYvwYyi8SBxYvBKyYoGWVPqIBA4sgTGIhfR1TjEM 4Uog== X-Gm-Message-State: AC+VfDzYFVVxLSN7ujJbAHBihNwlT8eVR59zp7bIY6cR45VkTJ+L2pg+ 0xOEeGgBxUWTdhg6ZFp1KxNovFaUbBWMgWiD/efUyY1kYtgXwFSVNFErSmkZGWk2vkmGtJVklyY +X8yCab2E2RuTzf/Tp4sOtpmCafdwAg== X-Received: by 2002:a7b:c385:0:b0:3f1:72ee:97b7 with SMTP id s5-20020a7bc385000000b003f172ee97b7mr4469989wmj.15.1682690725142; Fri, 28 Apr 2023 07:05:25 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5SEXPtRDOzYy7Ia++/b8eLrO0//7I9iMsiHtRaiXMrVrR+y00oeM5XPYumqWakHJMHkS0FAQ== X-Received: by 2002:a7b:c385:0:b0:3f1:72ee:97b7 with SMTP id s5-20020a7bc385000000b003f172ee97b7mr4469895wmj.15.1682690724157; Fri, 28 Apr 2023 07:05:24 -0700 (PDT) Received: from localhost (11.72.115.87.dyn.plus.net. [87.115.72.11]) by smtp.gmail.com with ESMTPSA id q17-20020a1cf311000000b003eeb1d6a470sm24411091wmq.13.2023.04.28.07.05.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 28 Apr 2023 07:05:23 -0700 (PDT) From: Andrew Burgess To: Simon Marchi , gdb-patches@sourceware.org Subject: Re: [PATCH 4/5] gdb/testsuite: change newline patterns used in gdb_test In-Reply-To: <9c4e4ce6-9986-1c3a-9885-f4f3388e95f6@simark.ca> References: <464e64e3a3483c228f0a73c778bcaf79e4595abd.1680293848.git.aburgess@redhat.com> <9c4e4ce6-9986-1c3a-9885-f4f3388e95f6@simark.ca> Date: Fri, 28 Apr 2023 15:05:22 +0100 Message-ID: <875y9gayql.fsf@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE,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: Simon Marchi writes: > On 3/31/23 16:20, Andrew Burgess via Gdb-patches wrote: >> This commit makes two changes to how we match newline characters in >> the gdb_test proc. >> >> First, for the newline pattern between the command output and the >> prompt, I propose changing from '[\r\n]+' to an explicit '\r\n'. >> >> The old pattern would spot multiple newlines, and so there are a few >> places where, as part of this commit, I've needed to add an extra >> trailing '\r\n' to the pattern in the main test file, where GDB's >> output actually includes a blank line. >> >> But I think this is a good thing. If a command produces a blank line >> then we should be checking for it, the current test doesn't. >> >> Additionally, the existing pattern will happily match a partial >> newline. There are a strangely large number of tests that end with a >> random '.' character. Not matching a literal period, but matching any >> single character, this is then matching half of the trailing newline >> sequence, while the \[\r\n\]+ in gdb_test is matching the other half >> of the sequence. I can think of no reason why this would be >> intentional. All of these are cleaned up after this commit. >> >> The basic rule of gdb_test after this is that the expected pattern >> needs to match everything up to, but not including the newline >> sequence immediately before the GDB prompt. >> >> Second, while I was cleaning up newline matching in gdb_test, I've >> also removed the '[\r\n]*' that was added to the start of the pattern >> passed to gdb_test_multiple. >> >> The addition of this pattern adds no value. If the user pattern >> matches at the start of a line then this would match against the >> newline sequence. But, due to the '*', if the user pattern doesn't >> match at the start of a line then this group doesn't care, it'll >> happily match nothing. >> >> As such, there's no value to it, it just adds more complexity for no >> gain, so I'm removing it. No tests will need updating as a >> consequence of this part of the patch. > > Hi Andrew, > > Starting with this patch, I see many new failures in gdb.trace (using > one of the gdbserver boards), for instance the first one being: > > FAIL: gdb.trace/collection.exp: collect args collectively: collected arg char Sorry for that. I thought I'd run the gdbserver tests, but I guess not. I have a fix for gdb.trace/collection.exp, I'm just running the full set of tests to see if there are any other regressions I missed. I'll push the fix(es) soon. Thanks, Andrew