From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f52.google.com (mail-wm1-f52.google.com [209.85.128.52]) by sourceware.org (Postfix) with ESMTPS id A17003858C27 for ; Mon, 18 Apr 2022 16:25:38 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A17003858C27 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=palves.net Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-wm1-f52.google.com with SMTP id ay11-20020a05600c1e0b00b0038eb92fa965so12056060wmb.4 for ; Mon, 18 Apr 2022 09:25:38 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=gVLc7kWyntU1PidiMRyuunWe7isv2mN3/1hq34tpbCo=; b=nAE0fzlwa5MCBlqdpt0mYjfJM4DKfOyrjjx5D62lx36yEqlahea6IoxNiTdaH/ZgkP vUU3RY8XVlWEXHGnYf7YYUaXJCWC4eBhiZlVlA/EMWW5ZhPMLJyeIQ2j3qxgAUw1Q4ne VccEu8i/Lq/ZgnIKi/78FLExqUxHFF61WGhRg8Cs4pOFUwBAML5P1y0Kn2AjqXQNsu3C 9gfgxNTYtMZqKbicbM5rlrzpOdahHQfGs9QJzeN4ZaoIrBMQsnDXqjS0RZmbZcGQOGFt uiaxzRCCAq7z93XdGFn0kGauzvp8NDLf2TWE8rvEpYacAnTqpzo4q4ESAMvbl/Xu2rY5 zVag== X-Gm-Message-State: AOAM531lJ0jwuINjoQSFmggogtlZ3QC+ACLub5vqDY7UUQJUll92yhn/ sxjzg/DYW/ztIPh/wY3Arl1RFjvxJxk= X-Google-Smtp-Source: ABdhPJxVfZRPUR6dzhRGn+URZXDvpwnLelZQmdJVOV1r5BnktJA2w/DdSVYsVRpEUMxIPoKoXLxJQg== X-Received: by 2002:a7b:cb05:0:b0:38c:7910:d935 with SMTP id u5-20020a7bcb05000000b0038c7910d935mr15810574wmj.170.1650299137649; Mon, 18 Apr 2022 09:25:37 -0700 (PDT) Received: from ?IPV6:2001:8a0:f924:2600:209d:85e2:409e:8726? ([2001:8a0:f924:2600:209d:85e2:409e:8726]) by smtp.gmail.com with ESMTPSA id w8-20020a1cf608000000b0038c8fdc93d6sm16680046wmc.28.2022.04.18.09.25.36 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 18 Apr 2022 09:25:36 -0700 (PDT) Message-ID: <00e0f16f-cd16-c143-e901-802015fc629c@palves.net> Date: Mon, 18 Apr 2022 17:25:35 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.0 Subject: Re: [PATCH] gdb/debuginfod: Prevent out_of_range exception Content-Language: en-US To: Aaron Merey , simon.marchi@polymtl.ca Cc: gdb-patches@sourceware.org References: <20220414185631.28493-1-amerey@redhat.com> From: Pedro Alves In-Reply-To: <20220414185631.28493-1-amerey@redhat.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, NICE_REPLY_A, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, SPF_HELO_NONE, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE 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: Mon, 18 Apr 2022 16:25:40 -0000 On 2022-04-14 19:56, Aaron Merey via Gdb-patches wrote: > + # Test that URLs are printed correctly for the first-use notice > + set testname "Notice empty URL" > + set url "" > + setenv DEBUGINFOD_URLS $url With remote-host testing, this will only change the environment on the build machine, while GDB runs on the host machine. Looking at the file, I see it is already doing a bunch of things that won't work in remote-host scenario, so we can ignore it for this patch, but really the testcase should have an early exit if [is_remote host]. > + clean_restart > + send_gdb "file $binfile\n" > + gdb_expect { > + -re ".*Enable debuginfod.*" { fail $testname } > + -re ".*$gdb_prompt" { pass $testname } > + timeout { fail $testname } > + } > + We really shouldn't be adding plain gdb_expect uses for GDB matches. E.g., why not gdb_test here?