Pino Toscano
2020-Apr-03 10:13 UTC
[Libguestfs] [supermin PATCH] tests: different dirs for formats in test-build-bash.sh
Use different directories for the output formats, otherwise any supermin --build call after the first will fail to rename the temporary directory to the designated output directory (as it exists already). Also make sure that we can remove all the files in the chroot output. --- tests/test-build-bash.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/test-build-bash.sh b/tests/test-build-bash.sh index 44a8c89..0b75d8b 100755 --- a/tests/test-build-bash.sh +++ b/tests/test-build-bash.sh @@ -27,6 +27,7 @@ tmpdir=`mktemp -d` d1=$tmpdir/d1 d2=$tmpdir/d2 +d3=$tmpdir/d3 test "$USE_NETWORK" = 1 || USE_INSTALLED=--use-installed @@ -37,6 +38,8 @@ arch="$(uname -m)" # Check all supermin-helper formats work. ../src/supermin -v --build -f chroot --host-cpu $arch $d1 -o $d2 -../src/supermin -v --build -f ext2 --host-cpu $arch $d1 -o $d2 +../src/supermin -v --build -f ext2 --host-cpu $arch $d1 -o $d3 +# Need to chmod $d2 since rm -r can't remove unwritable directories. +chmod -R +w $d2 ||: rm -rf $tmpdir ||: -- 2.25.1
Richard W.M. Jones
2020-Apr-03 11:45 UTC
Re: [Libguestfs] [supermin PATCH] tests: different dirs for formats in test-build-bash.sh
On Fri, Apr 03, 2020 at 12:13:46PM +0200, Pino Toscano wrote:> Use different directories for the output formats, otherwise any supermin > --build call after the first will fail to rename the temporary directory > to the designated output directory (as it exists already). > > Also make sure that we can remove all the files in the chroot output. > --- > tests/test-build-bash.sh | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/tests/test-build-bash.sh b/tests/test-build-bash.sh > index 44a8c89..0b75d8b 100755 > --- a/tests/test-build-bash.sh > +++ b/tests/test-build-bash.sh > @@ -27,6 +27,7 @@ tmpdir=`mktemp -d` > > d1=$tmpdir/d1 > d2=$tmpdir/d2 > +d3=$tmpdir/d3 > > test "$USE_NETWORK" = 1 || USE_INSTALLED=--use-installed > > @@ -37,6 +38,8 @@ arch="$(uname -m)" > > # Check all supermin-helper formats work. > ../src/supermin -v --build -f chroot --host-cpu $arch $d1 -o $d2 > -../src/supermin -v --build -f ext2 --host-cpu $arch $d1 -o $d2 > +../src/supermin -v --build -f ext2 --host-cpu $arch $d1 -o $d3 > > +# Need to chmod $d2 since rm -r can't remove unwritable directories. > +chmod -R +w $d2 ||: > rm -rf $tmpdir ||:ACK Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming and virtualization blog: http://rwmj.wordpress.com virt-df lists disk usage of guests without needing to install any software inside the virtual machine. Supports Linux and Windows. http://people.redhat.com/~rjones/virt-df/
Possibly Parallel Threads
- [supermin 1/2] chroot: Fix corner case introduced with dpkg-divert support
- Re: How make check with test-harder.sh screw my box !!!!!
- [PATCH 0/3] supermin: add --include-packagelist
- [supermin PATCH 0/4] Check for output results for --if-newer (RHBZ#1813809)
- Re: [PATCH] Adding ibm-powerkvm distro detection (the right one)