From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Glass Date: Thu, 9 Jul 2020 12:02:23 -0600 Subject: [v2] test: Have test_fs work with non-functional guestmount tools In-Reply-To: <20200709134225.10412-1-trini@konsulko.com> References: <20200709134225.10412-1-trini@konsulko.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, 9 Jul 2020 at 07:42, Tom Rini wrote: > > Since 2011 Ubuntu has intentionally broken support for guestmount[1] by > default and requires sysadmin intervention to re-enable support. This > in turn exposed that in our tests if guestmount is available but fails > we do not fall back to trying to use sudo. Restructure our code to try > sudo if guestmount fails rather than only when it is not in our path. > Further, only note that we are using fuse on success of the call. > > [1]: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/759725 > > Cc: Heinrich Schuchardt > Cc: Simon Glass > Cc: Stephen Warren > Signed-off-by: Tom Rini > --- > Changes in v2: > - Rework to not have another try/except nesting as Stephen suggested. > Tested this out and we still skip the tests and now note that sudo > doesn't work. Since the README for tests says sudo or guestmount, I > think this is OK. > > This, I suspect, will also fix the cases where in CI we attempt to run > the FS tests but do not as guestmount fails. I'm not going to remove > guestmount from the Docker containers as it's a useful reference for > "what is required for a minimal environment for U-Boot builds" and > perhaps we will switch to Debian instead at some point. > --- > test/py/tests/test_fs/conftest.py | 20 +++++++++----------- > 1 file changed, 9 insertions(+), 11 deletions(-) Reviewed-by: Simon Glass