diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2010-11-24 08:38:35 +0000 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2010-11-24 09:41:51 +0000 |
commit | c6478d6a01c210ef19735429d7602e3458733e25 (patch) | |
tree | 70bbb66f799c1756da531bdf63fca4cc7a431590 /regressions | |
parent | 5d7ee3f0c5b65cc7c417d762a648ce6c5bfdb532 (diff) | |
download | libguestfs-c6478d6a01c210ef19735429d7602e3458733e25.tar.gz libguestfs-c6478d6a01c210ef19735429d7602e3458733e25.tar.xz libguestfs-c6478d6a01c210ef19735429d7602e3458733e25.zip |
regressions: Fix test-launch-race to work in non-supermin case.
Diffstat (limited to 'regressions')
-rwxr-xr-x | regressions/test-launch-race.pl | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/regressions/test-launch-race.pl b/regressions/test-launch-race.pl index 941eff6c..892353e1 100755 --- a/regressions/test-launch-race.pl +++ b/regressions/test-launch-race.pl @@ -50,11 +50,15 @@ $g = undef; waitpid ($pid, 0) or die ("waitpid: $!"); die ("child failed") unless ($? == 0); -# Check that only 1 temporary cache directory was created +# Check that only 1 temporary cache directory was created. +# +# No cache directory is OK too (as long as the appliance launched w/o +# failure) because it indicates we're not using supermin. my $dh; opendir ($dh, $tmpdir) or die ("Failed to open $tmpdir: $!"); my @cachedirs = grep { /^guestfs\./ } readdir ($dh); closedir ($dh) or die ("Failed to close $tmpdir: $!"); my $ncachedirs = scalar(@cachedirs); -die ("Expected 1 cachedir, found $ncachedirs") unless ($ncachedirs == 1); +die "Expected 0 or 1 cachedir, found $ncachedirs" + unless $ncachedirs == 0 || $ncachedirs == 1; |