From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id PQeBINXPc2IBdwQAWB0awg (envelope-from ) for ; Thu, 05 May 2022 09:23:33 -0400 Received: by simark.ca (Postfix, from userid 112) id 75D971E086; Thu, 5 May 2022 09:23:33 -0400 (EDT) Authentication-Results: simark.ca; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.a=rsa-sha256 header.s=default header.b=ZQmaAzWk; dkim-atps=neutral X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,NICE_REPLY_A,RDNS_DYNAMIC, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 Received: from sourceware.org (ip-8-43-85-97.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 0A1961E048 for ; Thu, 5 May 2022 09:23:33 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 593EB384B0CB for ; Thu, 5 May 2022 13:23:32 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 593EB384B0CB DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1651757012; bh=S5izXhPqXZ5+UiTCnqC7BEQ0BfbZvMXn5U8xIUXY/Gk=; h=Date:Subject:To:References:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=ZQmaAzWkP6J+iVr/coeK9F0kTAzd7/T/lcc9LR36CukpuHtqTY38FjL0WfmOfiSeN rMmgYyax699ZCbAhDRX5XIG7q7Jp9Fo20un5N2ezMfL+RsL+diNs0SYZwGHd1f232b OQc17/6TZ3BZYtr54Z3WPaMRXY5xF3e0Sr8zMfyA= Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 4A0A4385735C for ; Thu, 5 May 2022 13:23:14 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4A0A4385735C Received: from [172.16.0.95] (192-222-180-24.qc.cable.ebox.net [192.222.180.24]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id A885F1E048; Thu, 5 May 2022 09:23:13 -0400 (EDT) Message-ID: Date: Thu, 5 May 2022 09:23:12 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [PATCH, v2][gdb/testsuite] Handle pipe2 syscall in gdb.base/catch-syscall.exp Content-Language: tl To: Tom de Vries , gdb-patches@sourceware.org References: <20220503145732.GA26729@delia.home> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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: , From: Simon Marchi via Gdb-patches Reply-To: Simon Marchi Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 2022-05-05 07:47, Tom de Vries via Gdb-patches wrote: > On 5/3/22 16:57, Tom de Vries wrote: >> Hi, >> >> When running test-case gdb.reverse/pipe-reverse.exp on openSUSE Tumbleweed, >> I run into: >> ... >> (gdb) continue^M >> Continuing.^M >> ^M >> Catchpoint 2 (returned from syscall pipe2), in pipe () from /lib64/libc.so.6^M >> (gdb) FAIL: gdb.base/catch-syscall.exp: without arguments: \ >>    syscall pipe has returned >> ... >> >> The current glibc on Tumbleweed is 2.35, which contains commit >> "linux: Implement pipe in terms of __NR_pipe2", and consequently syscall pipe2 >> is used in stead of syscall pipe. >> >> Fix this by detecting whether syscall pipe or pipe2 is used before running the tests. >> >> Tested on x86_64-linux, specifically on: >> - openSUSE Tumbleweed (with glibc 2.35), and >> - openSUSE Leap 15.3 (with glibc 2.31). >> >> Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29056 >> >> Any comments? >> > > I'm submitting a v2.  I found out that with target board unix/-m32, pipe2 is not recognized as syscall name (which I'll fix in a follow-up patch), so I made the test robust against this, by using the syscall number instead. > > Thanks, > - Tom > I don't understand why we would want that fallback to use numbers. If GDB doesn't know about pipe2 (like it does now), it's a GDB bug that needs to be fixed. I don't see why we would want to adjust the test instead of fixing GDB. Simon