common/config: create $RESULT_BASE before dumping kmemleak leaks
[xfstests-dev.git] / common / config
index a87cb4a..0f15341 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