[v2] common/config: create $RESULT_BASE before dumping kmemleak leaks
diff mbox series

Message ID 20181221091612.8504-1-jthumshirn@suse.de
State New
Headers show
Series
  • [v2] common/config: create $RESULT_BASE before dumping kmemleak leaks
Related show

Commit Message

Johannes Thumshirn Dec. 21, 2018, 9:16 a.m. UTC
In _init_kmemleak() we're touching a check_kmemleak file in ${RESULT_BASE}
if ${DEBUGFS_MNT/kmemleak} exists as a marker that we have to check for
kmemleak output after running a test.

In 'check' we're calling _init_kmemleak() at around 60% of the file, but
${RESULT_BASE} is created later at around 62% of the file, causing the
'touch' in _init_kmemleak() to fail.

Create the ${RESULT_BASE} just after assigning the default value in
get_next_config()

Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

---
Changes to v1:
* Move mkdir to get_next_config() in common/config

I assumed Darrick's R-b is still valid after this change
---
 common/config | 1 +
 1 file changed, 1 insertion(+)

Patch
diff mbox series

diff --git a/common/config b/common/config
index a87cb4a2bdd5..a776558deb7e 100644
--- a/common/config
+++ b/common/config
@@ -657,6 +657,7 @@  get_next_config() {
 	# set default RESULT_BASE
 	if [ -z "$RESULT_BASE" ]; then
 		export RESULT_BASE="$here/results/"
+		mkdir -p ${RESULT_BASE}
 	fi
 
 	if [ "$FSTYP" == "tmpfs" ]; then