Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Mauro Carvalho Chehab <mauro.chehab@linux.intel.com>
To: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
Cc: igt-dev@lists.freedesktop.org
Subject: Re: [igt-dev] [i-g-t] scripts/test_list: Allow unrecognized field:values in testplan
Date: Fri, 1 Sep 2023 09:20:19 +0200	[thread overview]
Message-ID: <20230901092019.44f35b7e@maurocar-mobl2> (raw)
In-Reply-To: <20230901051808.1369104-1-bhanuprakash.modem@intel.com>

On Fri,  1 Sep 2023 10:48:08 +0530
Bhanuprakash Modem <bhanuprakash.modem@intel.com> wrote:

> As non-Intel vendors also contributing to KMS tests, allow
> them to re-use the existing testplan documentation along with
> their own definitions of field:values pair in test config json.
> 
> Instead of aborting, just throw a warning about this unrecognized
> field:values.
> 
> Example:
> tests/kms_color.c:994: Warning: unrecognized field in tests/kms_test_config.json  ==> Foo: bla

IMO, there's no need to to that. I mean, if someone wants to add
a new field, he can just patch tests/kms_test_config.json, adding the
new "Foo" field at kms_test_config.json:

diff --git a/tests/kms_test_config.json b/tests/kms_test_config.json
index 9219ae4ebd9d..1dfca84dd73c 100644
--- a/tests/kms_test_config.json
+++ b/tests/kms_test_config.json
@@ -35,6 +35,7 @@
                 "description": "Defines the test category. Usually used at subtest level."
             }
         },
+        "Foo" : { },
         "Description" : {
             "_properties_": {
                 "description": "Provides a description for the test/subtest."

NOTE: It would probably make sense to add a description to it, to make
clear what such "Foo" field means, in a similar way to the descriptions
added to the other fields.

As the fields are optional, this won't require any changes at the
existing tests, and will provide an extra benefit that the meaning of
the "Foo" field can be documented via _properties_/description field.

Regards,
Mauro

> 
> Cc: Mauro Carvalho Chehab <mchehab@kernel.org>
> Signed-off-by: Bhanuprakash Modem <bhanuprakash.modem@intel.com>
> ---
>  scripts/test_list.py | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/scripts/test_list.py b/scripts/test_list.py
> index 0bcc96869..517c4d067 100755
> --- a/scripts/test_list.py
> +++ b/scripts/test_list.py
> @@ -1219,8 +1219,8 @@ class TestList:
>                      continue
>  
>                  file_line.rstrip(r"\n")
> -                sys.exit(f"{fname}:{file_ln + 1}: Error: unrecognized line. Need to add field at %s?\n\t==> %s" %
> -                         (self.config_fname, file_line))
> +                print(f"{'/'.join(fname.split('/')[-2:])}:{file_ln + 1}: Warning: unrecognized field in %s ==> %s" %
> +                        ('/'.join(self.config_fname.split('/')[-2:]), file_line))
>  
>      def show_subtests(self, sort_field):
>  

  parent reply	other threads:[~2023-09-01  7:20 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-01  5:18 [igt-dev] [i-g-t] scripts/test_list: Allow unrecognized field:values in testplan Bhanuprakash Modem
2023-09-01  6:17 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
2023-09-01  6:51 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork
2023-09-01  6:51 ` [igt-dev] ✗ Fi.CI.BAT: failure " Patchwork
2023-09-01  7:20 ` Mauro Carvalho Chehab [this message]
2023-09-01  9:02   ` [igt-dev] [i-g-t] " Modem, Bhanuprakash
2023-09-01 10:08     ` Mauro Carvalho Chehab
2023-09-01 12:39       ` Modem, Bhanuprakash
2023-09-04  8:13         ` Mauro Carvalho Chehab
2023-09-01 10:22 ` [igt-dev] ✗ GitLab.Pipeline: warning for scripts/test_list: Allow unrecognized field:values in testplan (rev2) Patchwork
2023-09-01 10:49 ` [igt-dev] ✓ CI.xeBAT: success " Patchwork
2023-09-01 10:50 ` [igt-dev] ✓ Fi.CI.BAT: " Patchwork
2023-09-01 19:30 ` [igt-dev] ✗ Fi.CI.IGT: failure " Patchwork

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=20230901092019.44f35b7e@maurocar-mobl2 \
    --to=mauro.chehab@linux.intel.com \
    --cc=bhanuprakash.modem@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /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