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 ESMTP id 588023858D28 for ; Wed, 30 Oct 2024 15:58:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 588023858D28 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 588023858D28 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=170.10.129.124 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730303936; cv=none; b=v57zEOQ0ay1iCg5v69C65+xFtLTsIojM+PFIg2OkcMkcy7wb76M3/jDMEyXXumHFnCwI5HjwwHFwgxBRRn5/BYMQO2HhTqmVXC2GX8XqZ0tuWsYum4KY0UMune6qi0vw1m1sHdvwMRhiOPj0Q6eaIdJ/Fe8ds7a//QLmXo2zxHQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1730303936; c=relaxed/simple; bh=DOvQM1tD6EIWgZ477ZtL2DxoUZVZMPxUwNL3fZo27dw=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=bdmKkQyZfBjTtlY0VSc0UAsfT0prtFln6VncagwhOtTX5HTmZbVpA4scJtsHFfOzA9FxdWl6/gR0F9CHBByJ9gVBQ8TsPJuMf9ggRddLM2aM3xBWDTZj0YtJxJGA6zR3rvmspTdlBuio29DGChOX+DNQDlUPbn1WvGxm3z3SlCg= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1730303933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jXP2zPOADA1USpxlsMxQYPbKHkQs2ibzXqq89/QVwo8=; b=Vg4UJHsb8m591ouKiPeWFa5apuxqNhVcZ4gXzbw7QVbdOHBNDVxXztn02m2Xmmyi1sSfcG OXbnCbqPqitsNrXvO+k7KHodHUX7KU9R9UiMdzPfaUroBiC+uVVtmw7W1Qsb1s9+BQBj8r s20N9KVRscR06nJgixGKbZoLr3XRYkg= Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-47-mrpsOf-uMP-9tlSA_IdkGw-1; Wed, 30 Oct 2024 11:58:51 -0400 X-MC-Unique: mrpsOf-uMP-9tlSA_IdkGw-1 Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-43151a9ea95so6484715e9.1 for ; Wed, 30 Oct 2024 08:58:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730303930; x=1730908730; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jXP2zPOADA1USpxlsMxQYPbKHkQs2ibzXqq89/QVwo8=; b=Xdk9h+I9diO0zu+k3lopIb0Blgz+mSX6CxXtid/R09rnctDkLpVAqNtmC6WCrLOJ9u cxEcLDhJoWCgtG6URrY5LBmfblwy0wDNeepIMIsUWRjkTR2boSn5jSL4iBFu/uIz58Jy Z1vfVcyAiC+S9p0MBbJayqapqZa48659KSglbevRrIpHwgVahf9uygfXFP7rjCfuiWac AlIxwTeNUinRZgNktVpb4Up6JMv0On1GbLJ5sQXMZ8B7b6I1CCXeTlg8IgIwUpQ5BOHR /EGJQ+JANd6NLkUPgcYvz5YlDYhKEiZWwwVT2w6ovosgBPP06tDh/X5BQ+OEoS41pvMB w4XA== X-Forwarded-Encrypted: i=1; AJvYcCWZURAEuito5Pv1R9gH480AVts42UtPWctGn+87XaTz+wIC6hrT1Qj5idcMeo5Uucda6paOeEeA41GJdA==@sourceware.org X-Gm-Message-State: AOJu0Yyb3YGmxTDkz6mhQdtqwIuEHX1d/W1GSCob7KhUM7ijVJIy4yog K6qToURky/HmCTA6FL4L1NH1v87ANXj2BEP+kkJs6slAGuE1WhO/JiStpQSJ/JkFphqVt9XJOb9 f8i74aK0Y9TKrAHLBKMACvoTihnIJJIHF2kiGN7QfHy0L+s1HF9Xj6FI8p+I= X-Received: by 2002:a5d:4c4e:0:b0:37c:ca20:52a with SMTP id ffacd0b85a97d-3817d61324emr5677026f8f.8.1730303930039; Wed, 30 Oct 2024 08:58:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHKL0p2nyBG+ZdCBhRL+216bhrBcrb9xvl2T3B908Qgi50CpDTJ8s0XLAoJjx5mH8QGdC0Fzw== X-Received: by 2002:a5d:4c4e:0:b0:37c:ca20:52a with SMTP id ffacd0b85a97d-3817d61324emr5677016f8f.8.1730303929704; Wed, 30 Oct 2024 08:58:49 -0700 (PDT) Received: from localhost (197.209.200.146.dyn.plus.net. [146.200.209.197]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-38058b48226sm15702011f8f.60.2024.10.30.08.58.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Oct 2024 08:58:49 -0700 (PDT) From: Andrew Burgess To: Keith Seitz , gdb-patches@sourceware.org Cc: Michael Weghorn Subject: Re: [PATCH 15/16] gdb: new maintenance command to help debug remote argument issues In-Reply-To: References: <4d76e490c2285dd7858b853f03465a1d798d6240.1704809585.git.aburgess@redhat.com> <35768eb4-f1b1-4284-89ea-007bcde80f5a@redhat.com> <87r086x272.fsf@redhat.com> Date: Wed, 30 Oct 2024 15:58:48 +0000 Message-ID: <877c9pvayv.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.8 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 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: Keith Seitz writes: > On 10/23/24 8:34 AM, Andrew Burgess wrote: >> Keith Seitz writes: >> >>> On 1/9/24 06:26, Andrew Burgess wrote: >>> >>>> +gdb_test "maint test-remote-args a b c" \ >>>> + [multi_line \ >>>> + "Input \\(a b c\\)" \ >>>> + " \\(a\\)" \ >>>> + " \\(b\\)" \ >>>> + " \\(c\\)" \ >>>> + "Output \\(a b c\\)"] >>> >>> Is it possible to add a test to exercise the failure mode, too? >> >> I don't think so. If I could find some input that hits the failure path >> then I'd just fix that case. >> >> During development I was using this command to investigate different >> inputs and check they produced the correct output. I could have the >> maintenance command gdb_assert that the final joined args match the >> original args... but then every time I found a broken example, GDB would >> terminal (with an assertion failure), which would have been pretty >> annoying. But now this is being proposed for master, maybe I should >> switch to using asserts? >> >> Thoughts? > > I was referring to this from a coverage perspective. So, yeah, I guess > I've asked to you to nigh the impossible, since, as you say, if you > had found an issue, you would have fixed it. > > As for using asserts... That seems a bit aggressive? Asserts are not > testing, and this is clearly the realm of testing. So from my POV, > I would not encourage that change. Great! I think we both agree then. I'll finish getting this series rebased, and post a v2 sometime soon. Thanks, Andrew