Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: Kamil Konieczny <kamil.konieczny@linux.intel.com>,
	igt-dev@lists.freedesktop.org
Cc: Petri Latvala <petri.latvala@intel.com>
Subject: Re: [igt-dev] [PATCH i-g-t] scripts/verify-blacklist: Handle multiple given blacklists
Date: Wed, 19 Apr 2023 08:20:59 +0200	[thread overview]
Message-ID: <eb994c0a-8409-67eb-9d9b-04fa1ce20123@linux.intel.com> (raw)
In-Reply-To: <20230418190603.56196-1-kamil.konieczny@linux.intel.com>

On 4/18/23 21:06, Kamil Konieczny wrote:
> From: Petri Latvala <petri.latvala@intel.com>
>
> Also change the message for useless entry to not say blacklist; this
> script is incidentally useful for checking testlist files too.


LGTM.

Reviewed-by: Mauro Carvalho Chehab <mchehab@kernel.org>


>
> Cc: Petri Latvala <adrinael@adrinael.net>
> Cc: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
> Signed-off-by: Petri Latvala <petri.latvala@intel.com>
> Signed-off-by: Kamil Konieczny <kamil.konieczny@linux.intel.com>
> ---
>   scripts/verify-blacklist.sh | 40 +++++++++++++++++++++----------------
>   1 file changed, 23 insertions(+), 17 deletions(-)
>
> diff --git a/scripts/verify-blacklist.sh b/scripts/verify-blacklist.sh
> index 93dca495b..05383f13f 100755
> --- a/scripts/verify-blacklist.sh
> +++ b/scripts/verify-blacklist.sh
> @@ -3,21 +3,23 @@
>   # Verify that all entries in a blacklist file are still valid
>   
>   usage() {
> -    echo "Usage: $0 <path-to-igt-runner> <test-binary-directory> <blacklist-file>"
> +    echo "Usage: $0 <path-to-igt-runner> <test-binary-directory> <blacklist-files ...>"
>       echo
>       echo " path-to-igt-runner: For example build/runner/igt_runner"
>       echo " test-binary-directory: For example build/tests"
> -    echo " blacklist-file: For example tests/intel-ci/blacklist.txt"
> +    echo " blacklist-files: For example tests/intel-ci/blacklist.txt"
>       exit 2
>   }
>   
> -if [ $# -ne 3 ]; then
> +if [ $# -lt 3 ]; then
>       usage
>   fi
>   
>   RUNNER="$1"
> -BINDIR="$2"
> -BLFILE="$3"
> +shift
> +BINDIR="$1"
> +shift
> +BLFILES="$*"
>   
>   if [ ! -x "$RUNNER" ]; then
>       echo "$RUNNER not found"
> @@ -31,24 +33,28 @@ if [ ! -f "$BINDIR/test-list.txt" ]; then
>       usage
>   fi
>   
> -if [ ! -f "$BLFILE" ]; then
> -    echo "$BLFILE not found"
> -    echo
> -    usage
> -fi
> +for BLFILE in $BLFILES; do
> +    if [ ! -f "$BLFILE" ]; then
> +	echo "$BLFILE not found"
> +	echo
> +	usage
> +    fi
> +done
>   
>   STATUS=0
>   
>   TESTLIST="$("$RUNNER" --list-all "$BINDIR")"
>   
> -cat "$BLFILE" | while read line; do
> -    blentry=$(echo "$line" | sed 's/#.*//' | tr -d '[:space:]')
> -    if [ "$blentry" = "" ]; then continue; fi
> +for BLFILE in $BLFILES; do
> +    cat "$BLFILE" | while read line; do
> +	blentry=$(echo "$line" | sed 's/#.*//' | tr -d '[:space:]')
> +	if [ "$blentry" = "" ]; then continue; fi
>   
> -    if ! (echo "$TESTLIST" | grep -Pq "$blentry") >/dev/null 2>/dev/null; then
> -	echo Useless blacklist entry: "$blentry"
> -	STATUS=1
> -    fi
> +	if ! (echo "$TESTLIST" | grep -Pq "$blentry") >/dev/null 2>/dev/null; then
> +	    echo "$BLFILE: Useless entry: $blentry"
> +	    STATUS=1
> +	fi
> +    done
>   done
>   
>   exit $STATUS

      parent reply	other threads:[~2023-04-19  6:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-18 19:06 [igt-dev] [PATCH i-g-t] scripts/verify-blacklist: Handle multiple given blacklists Kamil Konieczny
2023-04-18 21:22 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2023-04-19  2:27 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2023-04-19  6:20 ` Mauro Carvalho Chehab [this message]

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=eb994c0a-8409-67eb-9d9b-04fa1ce20123@linux.intel.com \
    --to=mauro.chehab@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=kamil.konieczny@linux.intel.com \
    --cc=petri.latvala@intel.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