public inbox for fstests@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] common/config: Always create RESULT_BASE
@ 2019-01-03 10:01 Nikolay Borisov
  2019-01-03 12:29 ` Nikolay Borisov
  0 siblings, 1 reply; 9+ messages in thread
From: Nikolay Borisov @ 2019-01-03 10:01 UTC (permalink / raw)
  To: fstests; +Cc: guaneryu, Nikolay Borisov

Commit 7fc034868d5d ("common/config: create $RESULT_BASE before dumping kmemleak leaks")
inadvertently broke $RESULT_BASE dir creation since it changed the logic
to only create the directory only if this variable is not explicitly set
by the user. Fix this by ensuring RESULT_BASE is always created.

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
 common/config | 11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/common/config b/common/config
index fb664cf0a967..e2da9cfacbb5 100644
--- a/common/config
+++ b/common/config
@@ -663,11 +663,12 @@ 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
+
+	mkdir -p ${RESULT_BASE}
+	if [ ! -d ${RESULT_BASE} ]; then
+		echo "failed to create results directory $RESULT_BASE"
+		exit 1
 	fi
 
 	if [ "$FSTYP" == "tmpfs" ]; then
-- 
2.7.4

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2019-01-06 18:09 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-01-03 10:01 [PATCH] common/config: Always create RESULT_BASE Nikolay Borisov
2019-01-03 12:29 ` Nikolay Borisov
2019-01-03 15:22   ` Eryu Guan
2019-01-03 21:56   ` Dave Chinner
2019-01-04  9:43     ` Eryu Guan
2019-01-04  9:54       ` Nikolay Borisov
2019-01-04 13:19         ` Eryu Guan
2019-01-06 17:47     ` Darrick J. Wong
2019-01-06 18:08       ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox