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 ESMTPS id 671623888825 for ; Fri, 18 Mar 2022 20:07:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 671623888825 Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-99-LwFMgstTOgmNmUPVRLcGzQ-1; Fri, 18 Mar 2022 16:07:26 -0400 X-MC-Unique: LwFMgstTOgmNmUPVRLcGzQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C3DA0811E7A; Fri, 18 Mar 2022 20:07:25 +0000 (UTC) Received: from f35-zws-1 (unknown [10.2.18.41]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6ACBD404D902; Fri, 18 Mar 2022 20:07:25 +0000 (UTC) Date: Fri, 18 Mar 2022 13:07:23 -0700 From: Kevin Buettner To: Tiezhu Yang Cc: gdb-patches@sourceware.org Subject: Re: [PATCH v5 2/2] gdb: testsuite: fix wrong expected result in attach-pie-noexec.exp Message-ID: <20220318130723.469573af@f35-zws-1> In-Reply-To: <1645584316-5375-3-git-send-email-yangtiezhu@loongson.cn> References: <1645584316-5375-1-git-send-email-yangtiezhu@loongson.cn> <1645584316-5375-3-git-send-email-yangtiezhu@loongson.cn> Organization: Red Hat MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, KAM_SHORT, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, 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: Fri, 18 Mar 2022 20:07:31 -0000 I'm seeing a problem with this commit: 1dbf27133db gdb: testsuite: fix wrong expected result in attach-pie-noexec.exp : FAIL: gdb.base/run-after-attach.exp: can spawn for attach Here's the relevant portion of the log file: Running /mesquite2/sourceware-git/f35-master/bld/../../worktree-master/gdb/testsuite/gdb.base/run-after-attach.exp ... Executing on host: gcc -fdiagnostics-color=never -c -o /mesquite2/sourceware-git/f35-master/bld/gdb/testsuite/temp/184212/ccopts184212.o /mesquite2/sourceware-git/f35-master/bld/gdb/testsuite/temp/184212/ccopts184212.c (timeout = 300) builtin_spawn -ignore SIGHUP gcc -fdiagnostics-color=never -c -o /mesquite2/sourceware-git/f35-master/bld/gdb/testsuite/temp/184212/ccopts184212.o /mesquite2/sourceware-git/f35-master/bld/gdb/testsuite/temp/184212/ccopts184212.c get_compiler_info: gcc-11-2-1 Executing on host: gcc -fno-stack-protector /mesquite2/sourceware-git/f35-master/bld/gdb/testsuite/temp/184212/can_spawn_for_attach-184212.c -fdiagnostics-color=never -w -g -lm -o /mesquite2/sourceware-git/f35-master/bld/gdb/testsuite/temp/184212/can_spawn_for_attach-184212.x (timeout = 300) builtin_spawn -ignore SIGHUP gcc -fno-stack-protector /mesquite2/sourceware-git/f35-master/bld/gdb/testsuite/temp/184212/can_spawn_for_attach-184212.c -fdiagnostics-color=never -w -g -lm -o /mesquite2/sourceware-git/f35-master/bld/gdb/testsuite/temp/184212/can_spawn_for_attach-184212.x builtin_spawn /mesquite2/sourceware-git/f35-master/bld/gdb/testsuite/temp/184212/can_spawn_for_attach-184212.x builtin_spawn /mesquite2/sourceware-git/f35-master/bld/gdb/testsuite/../../gdb/gdb -nw -nx -data-directory /mesquite2/sourceware-git/f35-master/bld/gdb/testsuite/../data-directory -iex set height 0 -iex set width 0 GNU gdb (GDB) 12.0.50.20220318-git Copyright (C) 2022 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-pc-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: . Find the GDB manual and other documentation resources online at: . For help, type "help". Type "apropos word" to search for commands related to "word". (gdb) set height 0 (gdb) set width 0 (gdb) attach 184257 Attaching to process 184257 Reading symbols from /mesquite2/sourceware-git/f35-master/bld/gdb/testsuite/temp/184212/.nfs0000000002713c210000000a... Reading symbols from /lib64/libm.so.6... Reading symbols from /usr/lib/debug/usr/lib64/libm.so.6-2.34-28.fc35.x86_64.debug... Reading symbols from /lib64/libc.so.6... Reading symbols from /usr/lib/debug/usr/lib64/libc.so.6-2.34-28.fc35.x86_64.debug... Reading symbols from /lib64/ld-linux-x86-64.so.2... [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib64/libthread_db.so.1". __GI___clock_nanosleep (clock_id=clock_id@entry=0, flags=flags@entry=0, req=req@entry=0x7ffc4d0e2210, rem=rem@entry=0x7ffc4d0e2210) at ../sysdeps/unix/sysv/linux/clock_nanosleep.c:71 71 return -r; (gdb) FAIL: gdb.base/run-after-attach.exp: can spawn for attach The attach appears to have worked. I think that this case was simply overlooked in the recent changes to can_spawn_for_attach. Kevin