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.133.124]) by sourceware.org (Postfix) with ESMTPS id 959F3385840E for ; Wed, 24 Nov 2021 10:51:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 959F3385840E 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.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-500-t-wowvFkOiuzpzFoyfz2cw-1; Wed, 24 Nov 2021 05:51:32 -0500 X-MC-Unique: t-wowvFkOiuzpzFoyfz2cw-1 Received: by mail-wm1-f70.google.com with SMTP id g81-20020a1c9d54000000b003330e488323so1559465wme.0 for ; Wed, 24 Nov 2021 02:51:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=Bvf1XX8sX0RqwVXOiDaJf0jciVLrwQ39ymtGbiU+Xjw=; b=C4CZ1n384GO9+GZuBrmyLkKJKIH91kn33F32wywVZYC7i/hR0qwfU/IZz63D8J4apB koij2GKmMo6U7w68HQ00Ir5+/g+qxu15RJtCRCpCAlszdXRbivfYFuWN1OG24exG3472 sCdawpnd05OGwx1Qa5XlK0Jt/9oPqHhVmTzDt5wOefQSTsRkx1OdSY0lCk2FhuBkX1jU BgJYu3h/MV++kCWS5Il1yFb5b13VZwp/PCmgucu5MNVt/Bx/rUrq/hrGkWWmsHq9x0+p py8fPWMHt6+bRfT6dGwjnX+/VwZ30FOsq/7i1G2zpWS7hCpv/3pr90VrI5Tvm09CZ0E2 pFHg== X-Gm-Message-State: AOAM530gN5BgwMZIch/Axb62iqim1BvwgbGQDQXIMRRhQaF8tggmENCF go06U3Vwru/SlXP6K1R8SPonz9FvJGPOVOBqvlzrJN7QCvUXszr6Cl1hoZyMzu3smKOzeC3K2Lx GMoQ31krbXmNPf2jam9cW8w== X-Received: by 2002:a05:600c:3658:: with SMTP id y24mr13889919wmq.161.1637751090806; Wed, 24 Nov 2021 02:51:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJx8v8A+wwZtcZYfs+lwJSaKDskh8UJaRs2GBHbgOnvzJe2czmpzFtVX4Fh4LoHEjwUCgUawEQ== X-Received: by 2002:a05:600c:3658:: with SMTP id y24mr13889874wmq.161.1637751090502; Wed, 24 Nov 2021 02:51:30 -0800 (PST) Received: from localhost (host86-166-129-255.range86-166.btcentralplus.com. [86.166.129.255]) by smtp.gmail.com with ESMTPSA id t8sm5014783wmq.32.2021.11.24.02.51.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Nov 2021 02:51:30 -0800 (PST) Date: Wed, 24 Nov 2021 10:51:29 +0000 From: Andrew Burgess To: Tiezhu Yang Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb: testsuite: show print array-indexes after set in arrayidx.exp Message-ID: <20211124105129.GN2514@redhat.com> References: <1637737987-12558-1-git-send-email-yangtiezhu@loongson.cn> MIME-Version: 1.0 In-Reply-To: <1637737987-12558-1-git-send-email-yangtiezhu@loongson.cn> X-Operating-System: Linux/5.8.18-100.fc31.x86_64 (x86_64) X-Uptime: 10:50:25 up 4 days, 23:48, X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline X-Spam-Status: No, score=-11.0 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Nov 2021 10:51:35 -0000 * Tiezhu Yang [2021-11-24 15:13:07 +0800]: > Add "show print array-indexes" testcases after set print array-indexes > to off or on. > > Without this patch: > > PASS: gdb.base/arrayidx.exp: set print array-indexes to off > PASS: gdb.base/arrayidx.exp: print array with array-indexes off > PASS: gdb.base/arrayidx.exp: set print array-indexes to on > PASS: gdb.base/arrayidx.exp: print array with array-indexes on > > With this patch: > > PASS: gdb.base/arrayidx.exp: set print array-indexes to off > PASS: gdb.base/arrayidx.exp: show print array-indexes is off > PASS: gdb.base/arrayidx.exp: print array with array-indexes off > PASS: gdb.base/arrayidx.exp: set print array-indexes to on > PASS: gdb.base/arrayidx.exp: show print array-indexes is on > PASS: gdb.base/arrayidx.exp: print array with array-indexes on > > Signed-off-by: Tiezhu Yang > --- > gdb/testsuite/gdb.base/arrayidx.exp | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/gdb/testsuite/gdb.base/arrayidx.exp b/gdb/testsuite/gdb.base/arrayidx.exp > index af792ed..b2d52cf 100644 > --- a/gdb/testsuite/gdb.base/arrayidx.exp > +++ b/gdb/testsuite/gdb.base/arrayidx.exp > @@ -36,6 +36,10 @@ if ![runto_main] then { > gdb_test_no_output "set print array-indexes off" \ > "set print array-indexes to off" > > +gdb_test "show print array-indexes" \ > + "Printing of array indexes is off." \ This should be: "Printing of array indexes is off\\." \ Otherwise the '.' is matching any character. > + "show print array-indexes is off" > + > gdb_test "print array" \ > "\\{1, 2, 3, 4\\}" \ > "print array with array-indexes off" > @@ -45,6 +49,10 @@ gdb_test "print array" \ > gdb_test_no_output "set print array-indexes on" \ > "set print array-indexes to on" > > +gdb_test "show print array-indexes" \ > + "Printing of array indexes is on." \ Same again here. OK to apply with these two fixes. Thanks, Andrew > + "show print array-indexes is on" > + > gdb_test "print array" \ > "\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \ > "print array with array-indexes on" > -- > 2.1.0 >