diff mbox

[2/3] common: no need to parse config file in new

Message ID 1452511924-21872-3-git-send-email-eguan@redhat.com (mailing list archive)
State New, archived
Headers show

Commit Message

Eryu Guan Jan. 11, 2016, 11:32 a.m. UTC
I saw "new" failed the TEST_DIR/SCRATCH_MNT validation when TEST_DIR or
SCRATCH_MNT points to directory, which is needed in overlayfs testing.

"new" only generates test template and doesn't need common/config to
parse and validate TEST_DEV/TEST_DIR etc., so just returns after setting
all needed commands.

Signed-off-by: Eryu Guan <eguan@redhat.com>
---
 common/config | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox

Patch

diff --git a/common/config b/common/config
index cb34fd7..9aa06a3 100644
--- a/common/config
+++ b/common/config
@@ -270,6 +270,11 @@  fi
 rm -f /tmp/crc_check.img
 export XFS_MKFS_HAS_NO_META_SUPPORT
 
+# new doesn't need config file parsed, we can stop here
+if [ "$iam" == "new" ]; then
+	return 0
+fi
+
 _mount_opts()
 {
 	case $FSTYP in