From: Quentin Schulz <quentin.schulz@cherry.de>
To: Andrew Goodbody <andrew.goodbody@linaro.org>,
u-boot@lists.u-boot-project.org,
Kory Maincent <kory.maincent@bootlin.com>,
Linus Walleij <linusw@kernel.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>
Cc: Alper Nebi Yasak <alpernebiyasak@gmail.com>,
Tom Rini <trini@konsulko.com>, Anshul Dalal <anshuld@ti.com>,
Alexey Charkov <alchark@flipper.net>,
Francesco Valla <francesco@valla.it>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Mattijs Korpershoek <mkorpershoek@kernel.org>,
Carlo Caione <ccaione@baylibre.com>, Yao Zi <me@ziyao.cc>,
Michal Simek <michal.simek@amd.com>
Subject: Re: [PATCH v2 03/12] test: Do not set DTC environment variable
Date: Tue, 10 Nov 2026 15:43:23 +0100 [thread overview]
Message-ID: <b6246d02-b4eb-44ca-ac8a-e4772860533d@cherry.de> (raw)
In-Reply-To: <906a1084-fa5d-43ea-b0f0-6a3edbd60cc1@linaro.org>
On 11/10/26 3:30 PM, Andrew Goodbody wrote:
> On 10/11/2026 13:30, Quentin Schulz wrote:
>> Hi Andrew,
>>
>> On 11/10/26 1:24 PM, Andrew Goodbody wrote:
>>> The presence of the DTC environment variable breaks a binman test that
>>> attempts to execute dtc from a temporary directory using the value of
>>> DTC but that is a relative directory path based on the source tree not
>>> this temporary directory and so it fails.
>>> It also breaks a buildman test that checks the environment and asserts
>>> that DTC is not present.
>>> Remove the setting of DTC as it is not needed.
>>>
>>
>> What happens if you have DTC exported in your current environment
>> before the tests are run? It'd be nice to mention which tests exactly
>> fail for future reference.
>
> It will fail if DTC is already set in the environment. I will add the
> failing test names to the commit message.
>
>> I'm thinking this is not enough and we should also fix the binman and
>> buildman tests to run with an environment where the DTC variable is
>> removed/absent/set to the correct path so we don't depend on a
>> "correct" external environment.
>
> I was hoping that assuming a 'clean' environment would be acceptable but
> I can look at what needs to be done to make the test work no matter what
> the DTC variable is set to on entry.
>
Mock the environment with with unittest.mock.patch.dict('os.environ',
environ) for example, see tools/binman/ftest.py for examples. If you
want to only remove some variables, you can duplicate the environment,
delete the key from the dict and use that as mock value.
Cheers,
Quentin
next prev parent reply other threads:[~2026-11-10 14:43 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-10 12:23 [PATCH v2 00/12] Fix 'make check' errors Andrew Goodbody
2026-11-10 12:23 ` [PATCH v2 01/12] binman: btool: lz4: Update version regex Andrew Goodbody
2026-11-10 12:23 ` [PATCH v2 02/12] binman: btool: lzma_alone: Update version function Andrew Goodbody
2026-11-10 12:24 ` [PATCH v2 03/12] test: Do not set DTC environment variable Andrew Goodbody
2026-11-10 13:30 ` Quentin Schulz
2026-11-10 14:30 ` Andrew Goodbody
2026-11-10 14:43 ` Quentin Schulz [this message]
2026-11-11 16:58 ` Andrew Goodbody
2026-11-10 12:24 ` [PATCH v2 04/12] buildman: Cope with empty CROSS_COMPILE in tests Andrew Goodbody
2026-11-10 13:48 ` Quentin Schulz
2026-11-10 12:24 ` [PATCH v2 05/12] dtoc: test: Fix coverage by adding test Andrew Goodbody
2026-11-10 14:25 ` Quentin Schulz
2026-11-10 16:09 ` Andrew Goodbody
2026-11-10 12:24 ` [PATCH v2 06/12] test: Disable running event_dump test for make check Andrew Goodbody
2026-11-10 14:25 ` Quentin Schulz
2026-11-10 14:51 ` Andrew Goodbody
2026-11-10 14:53 ` Quentin Schulz
2026-11-10 12:24 ` [PATCH v2 07/12] binman: bintool: Do not add empty argument Andrew Goodbody
2026-11-10 14:41 ` Quentin Schulz
2026-11-10 18:12 ` Andrew Goodbody
2026-11-10 12:24 ` [PATCH v2 08/12] test: Build mkeficapsule in tree used by tests Andrew Goodbody
2026-11-10 14:49 ` Quentin Schulz
2026-11-10 16:35 ` Andrew Goodbody
2026-11-12 14:38 ` Quentin Schulz
2026-11-10 12:24 ` [PATCH v2 09/12] test: Pass location of built tools to binman code coverage test Andrew Goodbody
2026-11-10 15:06 ` Quentin Schulz
2026-11-11 14:34 ` Andrew Goodbody
2026-11-11 16:29 ` Quentin Schulz
2026-11-10 12:24 ` [PATCH v2 10/12] tools: Fix typo in name of command mkeficapsule Andrew Goodbody
2026-11-10 15:10 ` Quentin Schulz
2026-11-10 12:24 ` [PATCH v2 11/12] buildman: Cope with CPP="gcc -E" Andrew Goodbody
2026-11-10 15:29 ` Quentin Schulz
2026-11-11 12:52 ` Andrew Goodbody
2026-11-10 12:24 ` [PATCH v2 12/12] test: Fix test_basic file system tests Andrew Goodbody
2026-11-10 15:39 ` Quentin Schulz
2026-11-10 17:31 ` Andrew Goodbody
2026-11-10 14:55 ` [PATCH v2 00/12] Fix 'make check' errors Tom Rini
2026-11-10 15:55 ` Andrew Goodbody
2026-11-10 16:57 ` Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b6246d02-b4eb-44ca-ac8a-e4772860533d@cherry.de \
--to=quentin.schulz@cherry.de \
--cc=alchark@flipper.net \
--cc=alpernebiyasak@gmail.com \
--cc=andrew.goodbody@linaro.org \
--cc=anshuld@ti.com \
--cc=ccaione@baylibre.com \
--cc=francesco@valla.it \
--cc=ilias.apalodimas@linaro.org \
--cc=kory.maincent@bootlin.com \
--cc=linusw@kernel.org \
--cc=me@ziyao.cc \
--cc=michal.simek@amd.com \
--cc=mkorpershoek@kernel.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.u-boot-project.org \
--cc=xypron.glpk@gmx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.