Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id C9DC6C433FE for ; Sun, 23 Oct 2022 01:16:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8F7EB84D5E; Sun, 23 Oct 2022 03:16:43 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="b1U2NghH"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B4D4884D88; Sun, 23 Oct 2022 03:16:38 +0200 (CEST) Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 2FB7F84CBC for ; Sun, 23 Oct 2022 03:16:35 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=seanga2@gmail.com Received: by mail-qk1-x736.google.com with SMTP id j21so4292537qkk.9 for ; Sat, 22 Oct 2022 18:16:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=VpSiPKP0e9jjwX0r4A506iXds7+ekYlzaDrdz+6kTmo=; b=b1U2NghHI3o+h1OJDFCbReigMI+veEZ3ruXTVu9v0AsxAc9FnNu9rPYw4LNWPwUptJ Ui0rbmV4bf0Dxhhoa1hjNJHeANMY/aPuNiXCpU58p9Ml55NFjHLvkXmmuRO/MVYV11T0 4YrlaiGlKj4a16rM9BguJyQ+5aNYPtwW16wVKZD6x3t35BcZ6k3mE8s6fwIWAZqdhu/7 5b7tEjaTSgZMheti4UT79P6ILDHEwGEWiSlhqSHTJCHis+9X+PMnaCxYwmjtJuP/Hpoh GqaKJBGPHU8zNPsxkQGSWD9d5g0FeZRSYGN9FRG4PXO2jBk9lswef1m3N02vTWBFOE/1 nPNA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=VpSiPKP0e9jjwX0r4A506iXds7+ekYlzaDrdz+6kTmo=; b=cv5G/GrGUjtZE4OlHkoJMWYvEGgiTC4VXp4VDar/fivOwzJ6sEF00Lu5QixTNG508t sgvxY4ydU4SwQbbk/LWhtlkV3CpfCHOJ/petyPpbWeeQ2rgfDlBmqImJlCfGlPzPQl76 WWmH1U9aI1koEyyKrjbx/2mtbhT+FsubNhRFOZZ0oT8RHOkFge5a54sm9DQmrVwnSGiQ ZJoB4EI5ZcASrySAKuvM9VdzuZRQG36ebqM2VsDzLyQKfchMN/y5JZZ3FyPenB/jtJSu p+YJxPyhf2TOE+HOgtf5ZX1EwVzJTUUJx5e2KzIEx7EuKK9xas1ZRaWpNGJPq/czD4S0 hwKg== X-Gm-Message-State: ACrzQf1n2R24sJ94TkKWVEjawWd9DziyKLC3rQShne/5vAXMBmWpQPZn YtQnKZaKN2zZe+5WE+OpDXc= X-Google-Smtp-Source: AMsMyM6EmTREklnzjVFxy0+B1TA/Vb+wLFOOvfMB45abHZ/hw3h6ifXjRElP7KKBtYdl2zyBMOnMdQ== X-Received: by 2002:ae9:e8ce:0:b0:6ed:22ee:305e with SMTP id a197-20020ae9e8ce000000b006ed22ee305emr18193825qkg.255.1666487793939; Sat, 22 Oct 2022 18:16:33 -0700 (PDT) Received: from [192.168.1.201] (pool-173-73-95-180.washdc.fios.verizon.net. [173.73.95.180]) by smtp.gmail.com with ESMTPSA id ck10-20020a05622a230a00b0039d085a2571sm6448765qtb.55.2022.10.22.18.16.32 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sat, 22 Oct 2022 18:16:33 -0700 (PDT) Message-ID: Date: Sat, 22 Oct 2022 21:16:32 -0400 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: Don't use sudo in python tests Content-Language: en-US To: Heinrich Schuchardt , Tom Rini Cc: Simon Glass , U-Boot Mailing List References: <0bafee35-c9e2-9062-b26e-7052de28a354@gmx.de> <20221022120435.GG2020586@bill-the-cat> <2436cd26-54e2-5e4d-2280-010e8de754d6@gmail.com> <4B5F1332-98AD-4AA6-B6D4-18330A37F567@gmx.de> From: Sean Anderson In-Reply-To: <4B5F1332-98AD-4AA6-B6D4-18330A37F567@gmx.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 10/22/22 18:00, Heinrich Schuchardt wrote: > > > Am 22. Oktober 2022 20:44:27 MESZ schrieb Sean Anderson : >> On 10/22/22 08:04, Tom Rini wrote: >>> On Sat, Oct 22, 2022 at 10:24:33AM +0200, Heinrich Schuchardt wrote: >>>> Hello Simon, >>>> >>>> As described in doc/develop/py_testing.doc using sudo in python tests >>>> should be avoided. >>>> >>>> * users building U-Boot may not be sudoers >>>> * running code as sudo comes with a risk >>>> >>>> You added sudo in test/py/tests/test_ut.py >>>> >>>> Can we use virt-make-fs here? >>> >>> Note that virt-make-fs is only suitable for trivial cases as it's >>> otherwise too slow. This is possibly one of the cases where it's too >>> slow. >>> >> >> An easy way to do this is to use fuse2fs/fusefat. > > My experience with fusefat is that it was terribly buggy 2-3 years ago. > > Last upstream source is from 2018. Yeah, I had not used it before. fuse2fs is nice. It doesn't support replaying the journal, but this doesn't matter when creating a filesystem. mtools seems incredibly clunky, but it appears to work, and has reasonable performance. LKL [1] seemed like it might have been the most robust solution (with lklfuse), but it hasn't made it upstream yet (and the primary author seems to have stopped trying). --Sean [1] https://github.com/lkl/linux