fstests.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Johannes Thumshirn <jthumshirn@suse.de>
Cc: Eryu Guan <guaneryu@gmail.com>, fstests@vger.kernel.org
Subject: Re: [PATCH] common/rc: create $RESULT_BASE before dumping kmemleak leaks
Date: Thu, 20 Dec 2018 08:30:43 -0800	[thread overview]
Message-ID: <20181220163043.GE3306@magnolia> (raw)
In-Reply-To: <20181220125222.12041-1-jthumshirn@suse.de>

On Thu, Dec 20, 2018 at 01:52:22PM +0100, Johannes Thumshirn wrote:
> 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.
> 
> The workaround to this is creating ${RESULT_BASE} before touching
> ${RESULT_BASE}/check_kmemleak to always have the marker.
> 
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>

Looks reasonable to me,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  common/rc | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/common/rc b/common/rc
> index e5da648466eb..5565b63e07ed 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -3528,6 +3528,7 @@ _init_kmemleak()
>  	# then dump all the leaks recorded so far.
>  	if echo "scan=off" > "$kern_knob" 2>/dev/null; then
>  		_capture_kmemleak /dev/null
> +		mkdir -p ${RESULT_BASE}
>  		touch ${RESULT_BASE}/check_kmemleak
>  	fi
>  }
> -- 
> 2.16.4
> 

  reply	other threads:[~2018-12-20 16:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-12-20 12:52 [PATCH] common/rc: create $RESULT_BASE before dumping kmemleak leaks Johannes Thumshirn
2018-12-20 16:30 ` Darrick J. Wong [this message]
2018-12-21  5:13 ` Eryu Guan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181220163043.GE3306@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=fstests@vger.kernel.org \
    --cc=guaneryu@gmail.com \
    --cc=jthumshirn@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).