All of lore.kernel.org
 help / color / mirror / Atom feed
From: Heinrich Schuchardt <xypron.glpk@gmx.de>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] RFC: checkpatch: Add a check for tests needed for uclasses
Date: Wed, 21 Nov 2018 15:35:05 +0100	[thread overview]
Message-ID: <bc32ee2b-0c56-892c-d1db-66f62f2644de@gmx.de> (raw)
In-Reply-To: <20181118151654.116589-1-sjg@chromium.org>

On 11/18/18 4:16 PM, Simon Glass wrote:
> This is an experimental check for adding new uclasses without a test.
> 
> I am not sure of the best way to add U-Boot-specific tests, although in
> this case, it would not fire on Linux.
> 
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
> 
>  scripts/checkpatch.pl | 7 +++++++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
> index 373094e59ef..2f9edb429d5 100755
> --- a/scripts/checkpatch.pl
> +++ b/scripts/checkpatch.pl
> @@ -3033,6 +3033,13 @@ sub process {
>  			     "adding a line without newline at end of file\n" . $herecurr);
>  		}
>  
> +		# ask for a test if a new uclass ID is added
> +		if ($realfile =~ /uclass-id.h/ && $line =~ /^\+/) {
> +			WARN("NEW_UCLASS",
> +			     "Possible new uclass - make sure to add a test in test/dm/<name>.c\n" . $herecurr);
> +		}
> +
> +
>  # check we are in a valid source file C or perl if not then ignore this hunk
>  		next if ($realfile !~ /\.(h|c|pl|dtsi|dts)$/);
>  
> 

I would prefer if this script were a verbatim copy of the Linux
upstream. Joe Perches is continually working on it. So let's update to
4.20 instead.

Tests are needed for any new functionality. Nothing special about
u-classes here. The reviewer/custodian should take care that this is
observed.

Best regards

Heinrich

  reply	other threads:[~2018-11-21 14:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-18 15:16 [U-Boot] [PATCH] RFC: checkpatch: Add a check for tests needed for uclasses Simon Glass
2018-11-21 14:35 ` Heinrich Schuchardt [this message]
2018-11-22 20:50   ` Simon Glass
2018-11-23  8:28     ` Heinrich Schuchardt
2018-11-24 18:41       ` Simon Glass

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=bc32ee2b-0c56-892c-d1db-66f62f2644de@gmx.de \
    --to=xypron.glpk@gmx.de \
    --cc=u-boot@lists.denx.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.