From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id wG6qOoI11mSH6D0AWB0awg (envelope-from ) for ; Fri, 11 Aug 2023 09:20:02 -0400 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=ezu3capr; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id ECE701E0BB; Fri, 11 Aug 2023 09:20:02 -0400 (EDT) Received: from server2.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 ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id E0F8D1E028 for ; Fri, 11 Aug 2023 09:20:00 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 8BBA93857030 for ; Fri, 11 Aug 2023 13:20:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8BBA93857030 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1691760000; bh=etPKHPeZKoNEt17zVJ+Af2fhM6qqV3mfE7KZulMEwXA=; h=Date:To:Cc:Subject:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=ezu3capry7nKSswEI3lmUe72OT5cNKnBsAx/40xa4dz2Idc4QU4ppHfPq0Ghi7yEc B5sysxEzPzfvgRpLs/gv4McrXKHnKLRE89T8GyoRd2AHu6kZ/XbU8UkQeLeHaW4OSe F4NrTPEUznHb29sa9d4XHMWI+9kVEMdl8Obl5C3M= Received: from lndn.lancelotsix.com (lndn.lancelotsix.com [51.195.220.111]) by sourceware.org (Postfix) with ESMTPS id 415F23857020 for ; Fri, 11 Aug 2023 13:19:11 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 415F23857020 Received: from octopus (unknown [IPv6:2a02:390:9086:0:2bab:b31e:a91e:47b0]) by lndn.lancelotsix.com (Postfix) with ESMTPSA id BDB1B80AB2; Fri, 11 Aug 2023 13:19:09 +0000 (UTC) Date: Fri, 11 Aug 2023 14:19:05 +0100 To: Guinevere Larsen Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] gdb/testsuite: XFAIL some gdb.base/fileio.exp Message-ID: <20230811131849.4inda7bmhiroknpl@octopus> References: <20230811102134.2796842-1-blarsen@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230811102134.2796842-1-blarsen@redhat.com> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (lndn.lancelotsix.com [0.0.0.0]); Fri, 11 Aug 2023 13:19:09 +0000 (UTC) X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, 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: 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: Lancelot SIX via Gdb-patches Reply-To: Lancelot SIX Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" Hi Guinevere, I am not a big fan of the idea of running the testcases as root… but I guess this is what you have when running within a container. > +# Return 1 if the test is being run as root, 0 otherwise > + > +gdb_caching_proc root_user {} { > + # ID outputs to stdout, we have to use exec to capture it here > + set user [exec id] Shouldn't it be `[remote_exec target]` instead? You are interested in who will end up running the test executable, which can be different from who runs `runtest` locally. I am not entirely sure if it should be `host` or `target`. I would think `target`, but the testcase does use `host`, which seems odd to me. Also, what happens if the underlying filesystem is for example a NFS mount? I am not sure being root will change what unlink can do, but I have not tested. Maybe it is not worth trying to figure out all setups, if it comes up one can always adjust the test. Best, Lancelot. > + > + regexp -all ".*uid=(\[0-9\]+).*" $user user uid > + > + return [expr $uid == 0] > +} > + > # Always load compatibility stuff. > load_lib future.exp > -- > 2.41.0 >