From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x62f.google.com (mail-pl1-x62f.google.com [IPv6:2607:f8b0:4864:20::62f]) by sourceware.org (Postfix) with ESMTPS id 80FAF3858D33 for ; Mon, 16 Oct 2023 23:48:50 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 80FAF3858D33 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 80FAF3858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::62f ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697500132; cv=none; b=BSU0QM/NDTZWWFzdE+Awc52GKcfnS2ZP4wJ2EFGAn7JlbTH8i/qJrzAsHsUav9wtTdd41L3iFD7rbp3nhlju0WFT6+wWVAKezk3qV2HgGdVcNNBhd515rX7DBugcI+CATSCBb/gKF02Pmo/VI/+lvkTj5rtggPj1VK1YUnbo0EQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1697500132; c=relaxed/simple; bh=JBYdA7Xr+WR3WqHYMyscu6DTYYp3kJtvHCN4e62Rkhs=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=YJSQOhAR/+VMpC5eg+P2PPNq54jpa5Fts005EG3nwCgI8ZmvpEZm1LXlZKgB4vIgJYPq3n1GzIz3TGl7fJh9+kxcR4a57sHcv91zQ9XilW0QEvpa2Akzakl7AFsXDeNxhVNC/jbh27r/Ih96NvRX/xZ8K+jSAcVjUcfvRKobeus= ARC-Authentication-Results: i=1; server2.sourceware.org Received: by mail-pl1-x62f.google.com with SMTP id d9443c01a7336-1c9bca1d96cso33372395ad.3 for ; Mon, 16 Oct 2023 16:48:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697500129; x=1698104929; darn=sourceware.org; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=vTWKY7nhQoaSWZJ7d+ONjo6FQ8edSwm/cKWerXPXl3s=; b=OpzLrq3ZL8GJ6mi8+sF1H3zBjSGpqO30tjyZ7bxKjIidE/xHvAL5WbdkdiM3rHh/HR y7m/Z1LkBJGKpJDgBLJyI7YiHls3m7ry7IScq1uPkVfQ+OtzWKDkJ+BuDNCOmI5K5hoe bimnyBHsViYUWeTCiJkQ8qwBREKCT/CChZU9OlhwWHgMgVGlnYeDJaY32rm/pjYsExqm sQMixXP3Of+DDu9HY5PQWzl2rQE/iB8j2gItgNScLFNkV5D1ssUlVcfvseMX4yb/4sP+ FoA1AQ7PVBI8FWAuCqZo+LKptlQ/g9kvrDqB3OIOHD0v7RAdLTyaghooxQdbPv6CE37I lhAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697500129; x=1698104929; h=mime-version:message-id:date:in-reply-to:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=vTWKY7nhQoaSWZJ7d+ONjo6FQ8edSwm/cKWerXPXl3s=; b=m+JzPnXGjqWbdlN6l5jauNWDmkTXLdnx4kOPnFxOZsUr2rtWhClhwgBH4bOdGVRHaW tRTnZLvu14LONC0GrNth4CORHHxTkjHo7SwWNKef9LAS4J67s0mEJALqGnq8rgo/9l9f 8LRgEax3rT6+EQu5b35LPsp0SIIzrrww9ht+po6vqPNutvvCyRwIUFD0pwFTo4bVW8v+ Jci+knL84N2xyliHK1vGX4HEGzaP/JOW52L/qlHwtToO88iCBtOT6rrpNshcXLIF0yIo Wh1iNmp8BR8KCzTX8zP48P3U32TXPd9k0t6LCcHApEE6lJrP8jvYS2xXiRHO9MCMm+Xt K/WA== X-Gm-Message-State: AOJu0Yxp5HZkJ+1hRR4P3rf+CCQcmr4fZPS12aeVc6h7JCB6w22TG20W /Swt8z2z3PIUWB55JjlAw/jjHA== X-Google-Smtp-Source: AGHT+IHKEAdZCB/1KmERoNRYqN9CfEbTF3SXKLO3uHxs/KK4JW7ltIym6G8MN1IWy1j28/JnT9P33A== X-Received: by 2002:a17:902:7609:b0:1c9:dff1:6ded with SMTP id k9-20020a170902760900b001c9dff16dedmr838905pll.1.1697500129472; Mon, 16 Oct 2023 16:48:49 -0700 (PDT) Received: from localhost ([2804:14d:7e39:8470:f0f4:2624:c7f8:6dec]) by smtp.gmail.com with ESMTPSA id c12-20020a170903234c00b001c9c879ee4asm174380plh.17.2023.10.16.16.48.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Oct 2023 16:48:49 -0700 (PDT) References: <20230828113026.76323-1-blarsen@redhat.com> User-agent: mu4e 1.10.7; emacs 29.1 From: Thiago Jung Bauermann To: Guinevere Larsen Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v3] gdb/testsuite: fix completion tests when using READ1 In-reply-to: <20230828113026.76323-1-blarsen@redhat.com> Date: Mon, 16 Oct 2023 20:48:46 -0300 Message-ID: <87zg0if7s1.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-3.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,KAM_NUMSUBJECT,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello Guinevere, guinevere Larsen via Gdb-patches writes: > The commit a3da2e7e550c4fe79128b5e532dbb90df4d4f418 has introduced > regressions when testing using the READ1 mechanism. The reason for that > is the new failure path in proc test_gdb_complete_tab_unique, which > looks for GDB suggesting more than what the test inputted, but not the > correct answer, followed by a white space. Consider the following case: > > int foo(int bar, int baz); > > Sending the command "break foo" to GDB will return > > break foo(int, int) > > which easily fits the buffer in normal testing, so everything works, but > when reading one character at a time, the test will find the partial > "break foo(int, " and assume that there was a mistake, so we get a > spurious FAIL. > > That change was added because we wanted to avoid forcing a completion > failure to fail through timeout, which it had to do because there is no > way to verify that the output is done, mostly because when I was trying > to solve a different problem I kept getting reading errors and testing > completion was frustrating. > > This commit implements a better way to avoid that frustration, by first > testing gdb's complete command and only if that passes we will test tab > completion. The difference is that when testing with the complete > command, we can tell when the output is over when we receive the GDB > prompt again, so we don't need to rely on timeouts. With this, the > change to test_gdb_complete_tab_unique has been removed as that test > will only be run and fail in the very unlikely scenario that tab > completion is different than command completion. > --- > gdb/testsuite/lib/completion-support.exp | 31 +++++++++++++++--------- > 1 file changed, 20 insertions(+), 11 deletions(-) Great! I was seeing 422 FAILs in gdb.linespec/cpcompletion.exp, and also 1 FAIL in gdb.cp/cpcompletion.exp when using check-read1. With this patch all tests pass in both testcases, so: Tested-by: Thiago Jung Bauermann Also, the code looks good to me: Reviewed-by: Thiago Jung Bauermann -- Thiago