From: Andy Shevchenko Date: Mon, 15 Mar 2021 15:59:39 +0200 Subject: [PATCH v2 1/4] test: Include /sbin to the PATH when creating ext4 disk image In-Reply-To: <20210211144012.55676-1-andriy.shevchenko@linux.intel.com> References: <20210211144012.55676-1-andriy.shevchenko@linux.intel.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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. It has been a long. Is it any news about this series? Can it be applied (at least patches that are fine against U-Boot current master)? > Cc: Patrick Delaunay > Signed-off-by: Andy Shevchenko > --- > 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