From patchwork Mon Dec 19 13:53:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maurizio Papini X-Patchwork-Id: 34554 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:e747:0:0:0:0:0 with SMTP id c7csp2400010wrn; Mon, 19 Dec 2022 05:55:19 -0800 (PST) X-Google-Smtp-Source: AA0mqf7cqOMI0x/UgpCMstjsvrtr94izBi2gr9VAbTcmTQl2CRJ5yTKCK4Roj6ckLBVjiC7knzGi X-Received: by 2002:aa7:d54a:0:b0:461:b93c:47d2 with SMTP id u10-20020aa7d54a000000b00461b93c47d2mr53265092edr.27.1671458119216; Mon, 19 Dec 2022 05:55:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671458119; cv=none; d=google.com; s=arc-20160816; b=NQysE7xwH2tLpFAxgIPS9GMiZ+TS/ngPZ5c381ZN1wkmImiV/GcsOxUOPHufKCx9LE Qubq1wKWOJb0kCHCtLYAnHpu8Cj3IZ/8u2E3egMr7QnkFLbI6Pq8+6e05/QDezNGkObE jTP4yU0074aW4cib78y82PqsxoLEpcslbpIN3ZgNXKzHwZh/zOzyLDwO+oDxAu3+EDi1 7HLe4FdvtYx91KOD+7OuQPiuHtBX2oyTmpYn3xWyyi0qaoWtcatuCN3mrvYGNgTZLln/ FLn6D795yOVOrvi/U0W7vuOROzKHm8NUVQ4I5tVwSQbxXqSJG6FXIT48E2FMvxv4leJC HZaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=EwJv5lfRo2co2JlD5RBcqC2eu3pUtMyk+SNLIS9lONE=; b=iu+8MaN1aJBlWEJyT/k5bq833tQ2Gno3rx7+HGF0RqClZJVBx4ErXh056CYZvRz5RO W5NFDJ6GHhfEBfF7etaHnQWVpy9YfhpXSFSC+JOMmC0UoTf3XeHGA8MNdtYCaGEiovlo X9nT7umTj++TFFqFfHa7Y9folkYw558ZpnA39DOpmhHJTKWUZ1itJtMJERe1PpAds5j1 69dpUIWKmkeWG21NCbBvKPYv+ugP0deWKyI77LVxXMLEni6rAMZe0cUz9exFV8vu7R7S cftf+j8G9jUsvMVxa4mWgDjJz8oJHVODHs2y3dQMokoqN/7VrSPAs19egXHOcTln8JeD rRoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="E8t/w0EY"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from sourceware.org (ip-8-43-85-97.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id s9-20020a508dc9000000b00469e7011949si7972024edh.508.2022.12.19.05.55.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Dec 2022 05:55:19 -0800 (PST) Received-SPF: pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org header.s=default header.b="E8t/w0EY"; spf=pass (google.com: domain of binutils-bounces+ouuuleilei=gmail.com@sourceware.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="binutils-bounces+ouuuleilei=gmail.com@sourceware.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 14E383858039 for ; Mon, 19 Dec 2022 13:55:08 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 14E383858039 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1671458108; bh=EwJv5lfRo2co2JlD5RBcqC2eu3pUtMyk+SNLIS9lONE=; h=To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=E8t/w0EY9dxaQiSCV7ypsKrJ4qAMh0OHNOeAjynMzx0KxxjIiuAVkPS75hAyE1mTG PpP4Mr/+UvEwS3irccWr+2mh4pbhSwBx843m3wAZ86lViM1GE2Ur5yReRQcxnbsjtA PVLVcftmXTS2ks3+LWX+prC/w6v3j87hqfV2+nA4= X-Original-To: binutils@sourceware.org Delivered-To: binutils@sourceware.org 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 8E9313858C1F for ; Mon, 19 Dec 2022 13:53:55 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 8E9313858C1F Received: from mail-ed1-f69.google.com (mail-ed1-f69.google.com [209.85.208.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-619-R8paYlmQMJ-QHKucajHj4g-1; Mon, 19 Dec 2022 08:53:54 -0500 X-MC-Unique: R8paYlmQMJ-QHKucajHj4g-1 Received: by mail-ed1-f69.google.com with SMTP id t17-20020a056402525100b00478b85eecedso3090874edd.18 for ; Mon, 19 Dec 2022 05:53:54 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EwJv5lfRo2co2JlD5RBcqC2eu3pUtMyk+SNLIS9lONE=; b=F/ojaXur41UoVVk5oUSZnxXGhJ2/ndgMuFj95pu3FHJzST+Jq8AzhnIpAJGZKcRmCq bPfJqvEn6P7nQeyi6g4F5N/dHpbUYHpsbp9DPMLTx5yEYcWC9aR4NeJWGFdRueW/Y8eM BMnMGFMTYi6vmCAuP2/Ir9tmt+MqPOY86vrKoEiYO0j1FyhljqaW981hNONrRBVgq5GX 4eKhllB8cMEogBMXVODIoEg/WLVkl7w5MR5ZaPOWo0JDviitu+tDPkM2sA/hMiXJSIi9 4LWLx01Ct5a+A3ZS47u/5AlhaLo6rfey9xUcvQznlFXiMV7kyTfxUtDXkj4MPytvcCbG 3zjw== X-Gm-Message-State: ANoB5pm38shWtLbl92zF0L4UZ6JSwsFwTuHSw/wgeHRyLOdjSQAY5+2V ce9CKcwuWjdFTOZPE+3qUsedw/d+5XWyu7rbx5WqGTVoWkydp3mFW8oQCtt8N0SHdTo5ZpU2D0v Gxq/NgRfs45H+MpJ2tj5uIQaFddb9y2XiRU4OyDgNX0br/SQNxhnAEa4tg5ejjxmqiAv4 X-Received: by 2002:a17:906:5655:b0:7c1:5464:3360 with SMTP id v21-20020a170906565500b007c154643360mr44269065ejr.65.1671458032935; Mon, 19 Dec 2022 05:53:52 -0800 (PST) X-Received: by 2002:a17:906:5655:b0:7c1:5464:3360 with SMTP id v21-20020a170906565500b007c154643360mr44269041ejr.65.1671458032666; Mon, 19 Dec 2022 05:53:52 -0800 (PST) Received: from ulissedini.. ([81.56.11.23]) by smtp.gmail.com with ESMTPSA id t21-20020a056402021500b00463bc1ddc76sm4377476edv.28.2022.12.19.05.53.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Dec 2022 05:53:52 -0800 (PST) To: binutils@sourceware.org Cc: Maurizio Papini Subject: [PATCH 2/2] addr2line: test to check -n option Date: Mon, 19 Dec 2022 14:53:03 +0100 Message-Id: <20221219135303.116222-3-mpapini@redhat.com> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221219135303.116222-1-mpapini@redhat.com> References: <20221219135303.116222-1-mpapini@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-11.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, 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 X-BeenThere: binutils@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Maurizio Papini via Binutils From: Maurizio Papini Reply-To: Maurizio Papini Errors-To: binutils-bounces+ouuuleilei=gmail.com@sourceware.org Sender: "Binutils" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1752650869250257029?= X-GMAIL-MSGID: =?utf-8?q?1752650869250257029?= --- binutils/testsuite/binutils-all/addr2line.exp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/binutils/testsuite/binutils-all/addr2line.exp b/binutils/testsuite/binutils-all/addr2line.exp index 957ae55df33..59c0924412c 100644 --- a/binutils/testsuite/binutils-all/addr2line.exp +++ b/binutils/testsuite/binutils-all/addr2line.exp @@ -61,6 +61,16 @@ if ![regexp -line "^(\[0-9a-fA-F\]+)? +\[Tt\] ${dot}fn" $output contents] then { pass "$testname -f option" } +#testcase for -n option: check the extra newline +#Using the same fn function address used in -f option. + set got [binutils_run $ADDR2LINE "-n -f -e tmpdir/testprog$exe [lindex $list 0]"] + set want "fn\n$srcdir/$subdir/testprog.c:\[0-9\]+\n\n" + if ![regexp $want $got] then { + fail "$testname -fn option $got\n" + } else { + pass "$testname -fn option" + } + #testcase for -s option. #Using the same fn function address used in -f option. set got [binutils_run $ADDR2LINE "-s -e tmpdir/testprog$exe [lindex $list 0]"]