X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=regressions%2Ftest-launch-race.pl;h=297c1b6d9f05795df3725179370fde3326d4fb70;hb=47963bc9cc0b47af0541010a4fa14260405acaa5;hp=941eff6cc4abb6bda9836185af9d56b391662520;hpb=f2460699ab7f972b1981d072164a04820c52b0c6;p=libguestfs.git diff --git a/regressions/test-launch-race.pl b/regressions/test-launch-race.pl index 941eff6..297c1b6 100755 --- a/regressions/test-launch-race.pl +++ b/regressions/test-launch-race.pl @@ -13,7 +13,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # Test that 2 simultaneous launches in a clean cache directory will both succeed @@ -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;