From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f46.google.com (mail-wm1-f46.google.com [209.85.128.46]) by sourceware.org (Postfix) with ESMTPS id 5315C385842E for ; Tue, 22 Mar 2022 11:24:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 5315C385842E 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-f46.google.com with SMTP id r64so10459722wmr.4 for ; Tue, 22 Mar 2022 04:24:10 -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=8rxczU/rGISZFsQ/J9pvbJ93GFBKRC09X1R0rfqmdbI=; b=ugVn6U2a7lYVGA63wDcGF5quOUX5WS0Bjh9A93ON+GLzSzvJcJtrJZGqF5QsTBCZ8d 3zvibboHWglfpqPDoFSYDEvC6cCPE9OTcZ9caFKKkL25F+y9xtR710/Vt0dq/pzTclh6 KHI+1sBVJzm41BLqvdbyd4P7hqaZxA3Xt/rGXy2vKY0nXGJAYJ54OtWQRN5P1i/JTPO2 1C7u66NmFGmjQrhw87fcbUJ4Qw4A83Q6YtUa6ELOsoH8PLNlWnNu5Danlar8CdfkEc7B EwXfueeGyGS/c0HHZwfv3CZPZiWB5dYLPfI+DOvbXWYGLUAv1RNfGcbbfJ2JXE00IalS vIbA== X-Gm-Message-State: AOAM532Pv4BQhLrU+xDObBJU7RYYZKtNUq9yijHXk+ril4Gr5e6dzWb5 hY7rwIh0Ovqu7nHaIzfVKXA= X-Google-Smtp-Source: ABdhPJy0N3Eaz6wamcSOvyr+ZT4P9tYrKb1Ox7koNqauhyQQnOC6sBBybtpr4eKyppgamstOw7ywkA== X-Received: by 2002:adf:dd0c:0:b0:203:f0c0:f1a5 with SMTP id a12-20020adfdd0c000000b00203f0c0f1a5mr19465361wrm.523.1647948249051; Tue, 22 Mar 2022 04:24:09 -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 l11-20020a5d674b000000b0020402c09067sm7978678wrw.50.2022.03.22.04.24.07 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 22 Mar 2022 04:24:08 -0700 (PDT) Message-ID: <41315662-0b71-2c78-c5c9-56209196ca73@palves.net> Date: Tue, 22 Mar 2022 11:24:07 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH v5 0/4] gdb: add gdb_attach to fix failed testcases Content-Language: en-US To: Tiezhu Yang , gdb-patches@sourceware.org References: <1647931285-6283-1-git-send-email-yangtiezhu@loongson.cn> From: Pedro Alves In-Reply-To: <1647931285-6283-1-git-send-email-yangtiezhu@loongson.cn> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-3.7 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=no 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: Tue, 22 Mar 2022 11:24:12 -0000 On 2022-03-22 06:41, Tiezhu Yang wrote: > Please review this v5 patchset, thank you. Looks fine to me. BTW, I tried setting ptrace_scope=1 and then running gdb.base/attach.exp, as probably the main attach testcase, and it unsurprisingly FAILs: $ echo 1 | sudo tee /proc/sys/kernel/yama/ptrace_scope $ make check TESTS="gdb.base/attach.exp" ... Running /home/pedro/gdb/build/gdb/testsuite/../../../src/gdb/testsuite/gdb.base/attach.exp ... FAIL: gdb.base/attach.exp: do_attach_tests: attach1, after setting file FAIL: gdb.base/attach.exp: do_attach_tests: attach1 detach (the program is no longer running) FAIL: gdb.base/attach.exp: do_attach_tests: attach2, with no file FAIL: gdb.base/attach.exp: do_attach_tests: after attach2, set should_exit FAIL: gdb.base/attach.exp: do_attach_tests: continue to breakpoint: postloop (the program is no longer running) FAIL: gdb.base/attach.exp: do_attach_tests: continue until exit at after attach2, exit (the program is no longer running) FAIL: gdb.base/attach.exp: do_attach_tests: attach when process' a.out not in cwd ... The curious thing is that the first FAIL is already a gdb_test_multiple: set test "attach1, after setting file" gdb_test_multiple "attach $testpid" "$test" { -re "Attaching to program.*`?$escapedbinfile'?, process $testpid.*main.*at .*$srcfile:.*$gdb_prompt $" { pass "$test" } -re "Attaching to program.*`?$escapedbinfile\.exe'?, process $testpid.*\[Switching to thread $testpid\..*\].*$gdb_prompt $" { # Response expected on Cygwin pass "$test" } } So I really think we will want to do the idea at . But it can be done after your patches are in. I'm fine with you merging what you have as is.