From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Tue, 28 Jul 2026 17:20:06 +0200 X-Sieve: CMU Sieve 2.4 Received: from mail-wm1-f64.google.com (mail-wm1-f64.google.com [209.85.128.64]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 66SFK51n010440 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 28 Jul 2026 17:20:05 +0200 Received: by mail-wm1-f64.google.com with SMTP id 5b1f17b1804b1-4955e865174sf23221765e9.3 for ; Tue, 28 Jul 2026 08:20:05 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1785252000; cv=pass; d=google.com; s=arc-20260327; b=kPczbSXVDsJP1kZXKHZH151KCEX/un6MZU5IgtErkjqvgGX6qQanoNMCgG4gi+RdDk 1dvtVRRzx9jljUdg+0XjwNt5uachU9KK6s2DupyzfEHT6898LryY+frycWTql/JsFILZ b6FH6v1hoTLEhlO8IqzCfsiEjfwWUONsfy0UXZeN+NKTQj07DCx0mB4vBrH37L/VFu73 1QY9E9HP5xWuaKuHd8qzi6V1npuuDscRl6rCjXwWIRdJ/k+CRpQ0CFCvD4BBmPiln3AG A6OmfW4jpyVkzXMlre5Q0pgYTim3BypMzj7JAId+ZJMf65uhPV1GvYd+BtMj9Or7v4FA u8iQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:in-reply-to:content-language :references:to:from:subject:user-agent:mime-version:date:message-id :sender:dkim-signature; bh=tL8YnAgKvGx8/zlYdsXAv2OKikO0pkeSaPFIvmA4sFw=; fh=WT2IMv3rFLpqOkI55rMd/ipC6nzxMaCG5OZKOiiUPr4=; b=e5DBFsN2WJ2jjlXo0U563YmZPaP/j1xFJbLMrV+WvKCwsEWvnJ+fyB/+3Fi0WvnRjf rkumeDyfa++7MrK0eyyM5Y6OcfyG45jYzXgurNERpHabZNWposqehuf1/LZOHuQ5TXCX MKo4ZgJgLoSvbPsZJcSF7TmhGjgB6j/3H9i4t8LDa700MALhQjh/vjdctf6SP99yKdW7 FlN0cEXxV/Qlr/HJ1xoL28DyMHDztld5DVCfk65wFXadvh+pGAGzNao11glAihCpkFhD w9CVWMgLrExdpSCJcqrN9sfr+BJAHOmGo+3IozRd896KHQCzVfg0w9X/L/GVXWGywJ6z iOKA==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20251104; t=1785252000; x=1785856800; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:content-type:in-reply-to:content-language :references:to:from:subject:user-agent:mime-version:date:message-id :sender:from:to:cc:subject:date:message-id:reply-to:content-type; bh=tL8YnAgKvGx8/zlYdsXAv2OKikO0pkeSaPFIvmA4sFw=; b=P6EMI1YbBmOm1z9rCiBvee0cBQkV6qSRyYdhxldLg2i6wk95uIRphg/r+HbBl0BjlE kZB/cqN4b0q1DX74+4wmdjmkh6E2Wb7hm0xDAReHR6ssoUgOJ95RgUOKPkiYtp2KsXMA wlAC+7gZ0DLvZGYpc5gWMc/p7e/QqcDbU0EOp1o72kvqEQ1FuKOctMduod5UeHobw1WV xEcmwp0k1r4sKraKVu47TFcIliD0SXBUAjHdN9QgIe2f7mbAOlJ7yF1b7dJEd0OVlfMS aW8heuMWqk/hzC36Z2Nf2PbMGJZ5r2i+8MWpuZSRI8M42popomMPos588oIJW8IkyCob gKYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785252000; x=1785856800; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:content-type :in-reply-to:content-language:references:to:from:subject:user-agent :mime-version:date:message-id:x-beenthere:x-gm-message-state:sender :from:to:cc:subject:date:message-id:reply-to:content-type; bh=tL8YnAgKvGx8/zlYdsXAv2OKikO0pkeSaPFIvmA4sFw=; b=H9XOJ581Eg3jfymK03pKxX+sfhOjLsYhx6QAGUqGDWEDw4gI+qIw//wbRAorNBEAFs D5p/ILvmsmuLwzPuxzgukV2hNMUNP/Le0ezpIqEM8+DuBppS2kFj0YW6BCpgnQF7w36w 8fGE627UOxufOeHmiigBYnU/TtAmtw3icwIOeJST+02qMszsov65UjG5COr1Fwn8Khhh jvmeTdK3qzlG9ij3URxUciwn6hBA68cqji3ehJwjqK1c/iSUIn5SxmmCN5qd3pucQAzA XOaKvp0qu/NSiJbGfRM/12e+tBq7xyabRSv5dPNwjDg91SODuUvYCf3f/Jr7kiWdCMCc nYww== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AHgh+RrVejo0pFEx2i6+Rhn+3BgRRuI7S3cnwp7/mYaSge2aiuhe1s5YTpmajyaJO2qWtFsZinD2@ilbers.de X-Gm-Message-State: AOJu0YwKJRjDO7BY959PjwK85x9bDpLlKMrraYKs79GuuPZrAHAZP0o5 PdBcv4PpbDHL8eWqdT3AkGClPIB/r7xPDYYUrrcPr/8sYkfPhslBwGcC X-Received: by 2002:a05:600c:3b14:b0:495:4b1d:915f with SMTP id 5b1f17b1804b1-496c65653bbmr30388165e9.23.1785251999943; Tue, 28 Jul 2026 08:19:59 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com; h="Aa7YSPT5w0I18oTa9AqXBMJN88JZt7Y0Lg8akLJuV+wr4bHLCQ==" Received: by 2002:a05:600c:4f09:b0:495:47b8:80ef with SMTP id 5b1f17b1804b1-49572a821d7ls55526955e9.0.-pod-prod-06-eu; Tue, 28 Jul 2026 08:19:57 -0700 (PDT) X-Received: by 2002:a05:600c:e489:10b0:495:4c62:9d43 with SMTP id 5b1f17b1804b1-496c657df11mr22358055e9.34.1785251996862; Tue, 28 Jul 2026 08:19:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1785251996; cv=none; d=google.com; s=arc-20260327; b=jbISFdoFh9NrK988HrI1ZhmiixYW/asGC4I3XEPQQjBB0Hg0pqwbxh/IoQYZotADIT bidy5+GGQ8tLYI6kLuRjI1C93T82mUuI6AAT1LEtou2LdORmZAN0aG+jGuEqYQf75SLG p0wKsdRjqeqZugiVlO9K+t0VHJD6EOSkvXb3KTweGRw/cKexKTLIigWqcaeOTNFcZ12G TyBYDJCj4kMsr80y3dbPnx3P2Za5S9mg1R70uZotY5IHOxrcT0lPhBaEoFS4EkhSgMSE YglvQ6S7PoP4dGuSS2bVo6R3sPtkweefjTFAJHXQ3XwQb/Djtz4p/tMw716pQz5qD6C/ Y/lA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:in-reply-to:content-language:references :to:from:subject:user-agent:mime-version:date:message-id; bh=g0XcoRoONJm5ackCMcVLKgsJ5tbGU+8Xo9ajbEEdSYQ=; fh=7tclEdh7YbwSQowgJ6LNq720O7H5HTEaqj22NJWRE2E=; b=Mbk5WlDeLF3ibULoXcS5Tg4HR066w6kWcv18ScgV/+pr4WGHuI5XaCemjJXbfEvriM SzPKG3FecrgOQiMdHguWbWsW+xcPCI+vBomiWI+QsKif6iwObdbxYr+EXXi98XCPn8iE ceIiFsGu7KqB3xLetqLeUHJ1RZsYdo9gBV3VTOD81q8SrGPGD0Lrd7CX90urcR8ICX0G P2nS8Xo22BMUPQwZpmahatbxkTAnHoPhwsTO6G36M8w6kh7GC3lynXBX/wsLazreyRfG c8M9Wbpi093sGCKGwig3grQ31eac4pMdADUPwedWfrDvITMpQ4q6mylumqWBZ3I1jWNR ANgw==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id ffacd0b85a97d-47f85c62b3asi341197f8f.3.2026.07.28.08.19.56 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 28 Jul 2026 08:19:56 -0700 (PDT) Received-SPF: pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from [192.168.178.139] ([88.130.203.42]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 66SFJt2c010426 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 28 Jul 2026 17:19:56 +0200 Message-ID: <0d8b791d-3115-48a5-b811-7f13f732d07f@ilbers.de> Date: Tue, 28 Jul 2026 17:19:55 +0200 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 1/2] testsuite: Support cleanup on rootless build files in test-container From: Zhihang Wei To: isar-users@googlegroups.com References: <20260716144145.1495181-1-wzh@ilbers.de> Content-Language: en-US In-Reply-To: <20260716144145.1495181-1-wzh@ilbers.de> Content-Type: text/plain; charset="UTF-8"; format=flowed X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: wzh@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-TUID: lV/xa8Mhb2sU Applied to next. Zhihang On 7/16/26 16:41, Zhihang Wei wrote: > When running tests with rootless builds, some files created with the user > namespace inside the container cannot be removed by the calling user after > the test-container exits without sudo. Add the `--clean-rootless-files` > option to the test-container entrypoint to clean up such files before > leaving the container. > > The cleanup is only performed for rootless builds and only removes files > that cannot be cleaned up without sudo outside the container. Other build > artifacts are left untouched so they remain available for CI artifact > collection and post-test inspection. > > Signed-off-by: Zhihang Wei > --- > .../dockerdata/test-container-entrypoint | 38 +++++++++++++++++-- > 1 file changed, 34 insertions(+), 4 deletions(-) > > diff --git a/testsuite/dockerdata/test-container-entrypoint b/testsuite/dockerdata/test-container-entrypoint > index e4714942..745d181b 100755 > --- a/testsuite/dockerdata/test-container-entrypoint > +++ b/testsuite/dockerdata/test-container-entrypoint > @@ -17,6 +17,8 @@ else > shift 1 > fi > > +clean_rootless_files=0 > + > export args="--max-parallel-tasks=1 --disable-sysinfo" > for arg in $*; do > case "$arg" in > @@ -29,15 +31,19 @@ for arg in $*; do > --shell) > export start_shell=1 > ;; > + --clean-rootless-files) > + clean_rootless_files=1 > + ;; > --help) > cat < Usage: run-tests.sh [params] ... > > Supported parameters: > - --clean Purge results of previous test runs before starting. > - --debug Use '--show=app,test' log settings for avocado. > - --shell Drop into shell rather than starting tests. > - --help Show this help message. > + --clean Purge results of previous test runs before starting. > + --debug Use '--show=app,test' log settings for avocado. > + --shell Drop into shell rather than starting tests. > + --clean-rootless-files Clean up files created by rootless builds with unshare after the tests finish. > + --help Show this help message. > > Any other parameters are passed to "avocado run". Its usage is: > > @@ -59,6 +65,15 @@ case "$args" in > ;; > esac > > +case "$args" in > + *"-p rootless=1"*) > + ;; > + *) > + clean_rootless_files=0 > + ;; > +esac > +export clean_rootless_files > + > mkdir /isar > > busybox syslogd > @@ -72,6 +87,21 @@ echo exit | /container-entrypoint > gosu builder sh -c ' > set -e > > +cleanup_rootless_files() > +{ > + rc=$? > + > + if [ "${clean_rootless_files}" = 1 ]; then > + find build \ > + \( ! -user "$(whoami)" -type d -prune \) \ > + -exec ./scripts/isar-clean-builddir --rootless {} \; > + fi > + > + exit ${rc} > +} > + > +trap cleanup_rootless_files EXIT > + > base_dir=/work/build/testsuite > > mkdir -p ${base_dir}/overlay/upper -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/0d8b791d-3115-48a5-b811-7f13f732d07f%40ilbers.de.