public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH, RFC] xfstests: fail test if it causes a kernel taint
Date: Tue, 14 May 2013 11:15:01 +1000	[thread overview]
Message-ID: <20130514011501.GR32675@dastard> (raw)
In-Reply-To: <51916146.80308@redhat.com>

On Mon, May 13, 2013 at 04:55:18PM -0500, Eric Sandeen wrote:
> This should, in theory, fail a test if it introduces one of
> a handful of "serious" kernel taints.  I mask on a few taint
> values because using an out of tree module or a non-GPL module
> should never fail a test, for example.
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

I like the idea - it should catch lockdep failures and other such
problems.

> ---
> 
> diff --git a/check b/check
> index a79747e..a9cac4e 100755
> --- a/check
> +++ b/check
> @@ -446,6 +445,11 @@ do
>  	fi
>  	rm -f core $seqres.notrun
>  
> +	if [ "$HOSTOS" == "Linux" ]; then
> +		tainted=`sysctl -n kernel.tainted`
> +		let "tainted &= $TAINT_FAIL"
> +	fi
> +
>  	start=`_wallclock`
>  	$timestamp && echo -n "	["`date "+%T"`"]"
>  	[ ! -x $seq ] && chmod u+x $seq # ensure we can run it
> @@ -507,6 +511,19 @@ do
>  			 "entire diff)"
>  		    err=true
>  		fi
> +
> +		# See if this run tainted the kernel due to oops, etc
> +		if [ "$HOSTOS" == "Linux" ]
> +		then
> +			tainted2=`sysctl -n kernel.tainted`
> +			let "tainted2 &= $TAINT_FAIL"
> +			if [ "$tainted" != "$tainted2" ]
> +			then
> +				echo " Kernel taint changed from $tainted to $tainted2."
> +				echo " See dmesg for details."
> +				err=true
> +			fi

Should we dump the last 100 lines of dmesg into the output file
here? And then rely on the golden image match failing to fail the
test?

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2013-05-14  1:15 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-13 21:55 [PATCH, RFC] xfstests: fail test if it causes a kernel taint Eric Sandeen
2013-05-14  1:15 ` Dave Chinner [this message]
2013-05-14  2:00   ` Eric Sandeen
2013-05-14  3:15     ` Dave Chinner
2013-05-14  3:38       ` Eric Sandeen
2013-05-23 15:47 ` [PATCH, V2] " Eric Sandeen
2013-10-10  3:16   ` Eric Sandeen

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=20130514011501.GR32675@dastard \
    --to=david@fromorbit.com \
    --cc=sandeen@redhat.com \
    --cc=xfs@oss.sgi.com \
    /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