Pino Toscano
2014-Mar-17 14:05 UTC
[Libguestfs] [PATCH] tests: properly cleanup the temporary directories
Chmod the temporary directory again so we can clean it all, avoid leaving stray temporary directories. This is a kind of revert of few parts of commit 22b0662ebf64e93dc275acc1cc37ebd12cce6b49, but adapted to the unique $tmpdir used now. --- tests/test-binaries-exist.sh | 4 +++- tests/test-harder.sh | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/tests/test-binaries-exist.sh b/tests/test-binaries-exist.sh index 3a2d50d..c40ce93 100755 --- a/tests/test-binaries-exist.sh +++ b/tests/test-binaries-exist.sh @@ -58,4 +58,6 @@ fi # These binaries should be runnable (since they are the same as the host). `find $d2 -name sync | head` -rm -rf $tmpdir ||: +# Need to chmod $d2 since rm -r can't remove unwritable directories. +chmod -R +w $d2 ||: +rm -rf $tmpdir diff --git a/tests/test-harder.sh b/tests/test-harder.sh index b010c35..e8bb32f 100755 --- a/tests/test-harder.sh +++ b/tests/test-harder.sh @@ -127,4 +127,6 @@ case $distro in ;; esac -rm -rf $tmpdir ||: +# Need to chmod $d2 since rm -r can't remove unwritable directories. +chmod -R +w $d2 ||: +rm -rf $tmpdir -- 1.8.3.1
Richard W.M. Jones
2014-Mar-17 14:16 UTC
Re: [Libguestfs] [PATCH] tests: properly cleanup the temporary directories
On Mon, Mar 17, 2014 at 03:05:44PM +0100, Pino Toscano wrote:> Chmod the temporary directory again so we can clean it all, avoid > leaving stray temporary directories. > > This is a kind of revert of few parts of commit > 22b0662ebf64e93dc275acc1cc37ebd12cce6b49, but adapted to the unique > $tmpdir used now.Yup, ACK. Rich. -- Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones Read my programming blog: http://rwmj.wordpress.com Fedora now supports 80 OCaml packages (the OPEN alternative to F#)