]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
config: Fix SCRATCH_DEV_POOL handling
authorLukas Czerner <lczerner@redhat.com>
Tue, 8 Apr 2014 23:55:50 +0000 (09:55 +1000)
committerDave Chinner <david@fromorbit.com>
Tue, 8 Apr 2014 23:55:50 +0000 (09:55 +1000)
commitf00a4440be9446f7c4d3ff19eafc8fa5c83f7dab
treed83937b3244cb3af2bdeab94e1d4f9b32d48ce84
parentcf1ed54a1b52cd6dd506f1790ea0bf7311e6afa3
config: Fix SCRATCH_DEV_POOL handling

With changes introduced in 667308dd97bf41382d4ab299fa5b56c235cfeb27
it is no longer possible to use SCRATCH_DEV_POOL variable because of
error:

 common/config: Error: $SCRATCH_DEV should be unset when
 $SCRATCH_DEV_POOL is set

This was because get_next_config() would get called twice and hence it
would complain on the second run that SCRATCH_DEV is already set. Fix
it by making sure that we call get_next_config() only once if there
are no sections in the config file.

Also make sure that we export SCRATCH_DEV in the case we're deducing it
from SCRATCH_DEV_POOL.

Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Reported-by: Filipe David Manana <fdmanana@gmail.com>
Tested-by: Filipe David Manana <fdmanana@gmail.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
common/config