From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 6o0fN0NF1mQ68z0AWB0awg (envelope-from ) for ; Fri, 11 Aug 2023 10:27:15 -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=PudoXozj; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id D73DB1E0BB; Fri, 11 Aug 2023 10:27:15 -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 C6FED1E028 for ; Fri, 11 Aug 2023 10:27:13 -0400 (EDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id F03703858CD1 for ; Fri, 11 Aug 2023 14:27:12 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org F03703858CD1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1691764033; bh=jx564FFezxC+ZEZ7H1vDuNT2E78lT+fmf/mrNNzmkO0=; h=Date:Subject:To:Cc:References:In-Reply-To:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=PudoXozj5FRZd2vqy0oiD3aQP07O1jaqfj+O3U9EfDRnfoevLb1urRRw5q9DATTah RpdX5Wjxoa+f6SHyuYs+U43pBHo8SDy31eC1SyHDeQOPRQMH+2yi0EWF8bLB241hUu sh+JfGc2NkEe5IdgBOytWmaqedjrNRQMiGsFoC6k= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id 98C103858D28 for ; Fri, 11 Aug 2023 14:26:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 98C103858D28 Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-634-2HQtR9KONeyRijpTzMkfHg-1; Fri, 11 Aug 2023 10:26:52 -0400 X-MC-Unique: 2HQtR9KONeyRijpTzMkfHg-1 Received: by mail-qv1-f70.google.com with SMTP id 6a1803df08f44-641aa322d8aso7329676d6.3 for ; Fri, 11 Aug 2023 07:26:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691764011; x=1692368811; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=jx564FFezxC+ZEZ7H1vDuNT2E78lT+fmf/mrNNzmkO0=; b=ZtN+83isA1RheROqBUIRHyP6iquXvfatWOX3SiGV9Dt0JwldGRzzW600YZwWQzS1cE B8wOcLkQ3zDfM1/wvvhKCPptdqGz1p9OZgaUuX353Wlfd9u1Wl5tjyoLiUwOR5azWHsy 0KUFJiAecRinzshpxFNouT8itsPWMdJ9+IuFBFvPfUzuljSq0rghaN4nydqIeMrRVRaL zNrrENqF0Hk/AQQGP0Pq7NbSQ/UXaRXEyb6z+tNAz0WUNwz2SRs0x1f7qmbXJ1dMGPCN 5iJ9FAOdXk51voh7K8yp9yXxrClvw1w2aXmdSJpVITfnfKlZLosVTb94NrFzsloXEWCP qstg== X-Gm-Message-State: AOJu0YxCbCixk4A81xMjitRf39U4Oris4YJzuC96oLEI1uV4As4Ebm1D EN4P6w3ZvKXr8TbOcJrgG8P5UKltVIatUhhKY3PJThbewj1HvQG4uA3lbWaQ6yZ6HX9T448Ra+O jFGx3jOCaA/uBawIv0DZDeczVqDJh7w== X-Received: by 2002:a0c:9781:0:b0:641:8a31:559c with SMTP id l1-20020a0c9781000000b006418a31559cmr2233160qvd.63.1691764011404; Fri, 11 Aug 2023 07:26:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHPF/RMpgNoEFDR5KlMzlCBAH2UjaSuNAqRjzH7H0EgYguigH6IOrPpM7/rjKF81Nulda26FQ== X-Received: by 2002:a0c:9781:0:b0:641:8a31:559c with SMTP id l1-20020a0c9781000000b006418a31559cmr2233145qvd.63.1691764011129; Fri, 11 Aug 2023 07:26:51 -0700 (PDT) Received: from [192.168.0.129] (ip-94-112-225-44.bb.vodafone.cz. [94.112.225.44]) by smtp.gmail.com with ESMTPSA id c14-20020a0ca9ce000000b0063d588c4111sm1262522qvb.82.2023.08.11.07.26.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 11 Aug 2023 07:26:50 -0700 (PDT) Message-ID: Date: Fri, 11 Aug 2023 16:26:48 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Re: [PATCH] gdb/testsuite: XFAIL some gdb.base/fileio.exp To: Lancelot SIX Cc: gdb-patches@sourceware.org References: <20230811102134.2796842-1-blarsen@redhat.com> <20230811131849.4inda7bmhiroknpl@octopus> In-Reply-To: <20230811131849.4inda7bmhiroknpl@octopus> X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Language: en-US Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, NICE_REPLY_A, RCVD_IN_BARRACUDACENTRAL, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no 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: Guinevere Larsen via Gdb-patches Reply-To: Guinevere Larsen Errors-To: gdb-patches-bounces+public-inbox=simark.ca@sourceware.org Sender: "Gdb-patches" On 11/08/2023 15:19, Lancelot SIX wrote: > 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. yeah, this is focused on VM/containers for testing infrastructure. > >> +# 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. Thank you. I always forget about how the remote stuff works, but I think you are correct, it does make more sense to use remote_exec, because the test failures are based on if the underlying program can access it or not. I'll fix this in v2. > > 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. I think you're right, being root wouldn't let you access those, but I am not sure many people are testing GDB with an NFS mounted build directory inside a VM/container. I think setups like that can be dealt with if they appear. -- Cheers, Guinevere Larsen She/Her/Hers > > 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 >>