common/config: create $RESULT_BASE before dumping kmemleak leaks
[xfstests-dev.git] / common / config
index a87cb4a2bdd55c9eeb92788d06f7dd86dbb898b3..0f153412bcdc09ffd245a3251fb778ed5b537258 100644 (file)
@@ -657,6 +657,11 @@ get_next_config() {
        # set default RESULT_BASE
        if [ -z "$RESULT_BASE" ]; then
                export RESULT_BASE="$here/results/"
+               mkdir -p ${RESULT_BASE}
+               if [ ! -d ${RESULT_BASE} ]; then
+                       echo "failed to create results directory $RESULT_BASE"
+                       exit 1
+               fi
        fi
 
        if [ "$FSTYP" == "tmpfs" ]; then