public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 1/4] test: Include /sbin to the PATH when creating ext4 disk image
Date: Thu, 11 Feb 2021 16:46:46 +0200	[thread overview]
Message-ID: <YCVDVo6WJ5B4eoxx@smile.fi.intel.com> (raw)
In-Reply-To: <20210211144012.55676-1-andriy.shevchenko@linux.intel.com>

On Thu, Feb 11, 2021 at 04:40:09PM +0200, Andy Shevchenko wrote:
> On some distributions the mkfs.ext4 is under /sbin and /sbin is not set
> for mere users. Include /sbin to the PATH when creating ext4 disk image,
> so that users won't get a scary traceback from Python.

Note, patches 1 and 4 may be applied to U-Boot sources directly (while patches
2 and 3 are based on top of dm/test-working). Moreover, patch 4 fixes a quite
annoying fix, without which I have got reprimanded by an admin of our build
system.

Please, consider to apply patch 4 ASAP.

> Cc: Patrick Delaunay <patrick.delaunay@foss.st.com>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
> ---
> v2: used '/sbin' as is (Simon)
>  test/py/tests/test_env.py | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/test/py/tests/test_env.py b/test/py/tests/test_env.py
> index 940279651da0..9bed2f48d77e 100644
> --- a/test/py/tests/test_env.py
> +++ b/test/py/tests/test_env.py
> @@ -414,6 +414,8 @@ def mk_env_ext4(state_test_env):
>      if os.path.exists(persistent):
>          c.log.action('Disk image file ' + persistent + ' already exists')
>      else:
> +        # Some distributions do not add /sbin to the default PATH, where mkfs.ext4 lives
> +        os.environ["PATH"] += os.pathsep + '/sbin'
>          try:
>              u_boot_utils.run_and_log(c, 'dd if=/dev/zero of=%s bs=1M count=16' % persistent)
>              u_boot_utils.run_and_log(c, 'mkfs.ext4 %s' % persistent)
> -- 
> 2.30.0
> 

-- 
With Best Regards,
Andy Shevchenko

  parent reply	other threads:[~2021-02-11 14:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-11 14:40 [PATCH v2 1/4] test: Include /sbin to the PATH when creating ext4 disk image Andy Shevchenko
2021-02-11 14:40 ` [PATCH v2 2/4] test: Allow simple glob pattern in the test name Andy Shevchenko
2021-02-18  4:45   ` Simon Glass
2021-04-29 16:03     ` Simon Glass
2021-02-11 14:40 ` [PATCH v2 3/4] test: Use positive conditional in test_matches() Andy Shevchenko
2021-02-18  4:45   ` Simon Glass
2021-04-29 16:03     ` Simon Glass
2021-02-11 14:40 ` [PATCH v2 4/4] test: Don't unmount not (yet) mounted system Andy Shevchenko
2021-02-18  4:45   ` Simon Glass
2021-02-18 10:55     ` Andy Shevchenko
2021-02-19  4:52       ` Simon Glass
2021-03-30 19:41         ` Andy Shevchenko
2021-03-30 19:53           ` Tom Rini
2021-03-30 21:50             ` Andy Shevchenko
2021-03-31 13:47   ` Tom Rini
2021-05-13 11:32   ` Heinrich Schuchardt
2021-05-17  6:36     ` Andy Shevchenko
2021-02-11 14:46 ` Andy Shevchenko [this message]
2021-02-18  4:45 ` [PATCH v2 1/4] test: Include /sbin to the PATH when creating ext4 disk image Simon Glass
2021-03-15 13:59 ` Andy Shevchenko
2021-03-18 16:56 ` 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=YCVDVo6WJ5B4eoxx@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=u-boot@lists.denx.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox