[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v6 07/11] iotests: add findtests.py

From: Vladimir Sementsov-Ogievskiy
Subject: Re: [PATCH v6 07/11] iotests: add findtests.py
Date: Thu, 14 Jan 2021 10:38:18 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.1

12.01.2021 19:42, Kevin Wolf wrote:
+    def find_tests(self, groups: Optional[List[str]] = None,
+                   exclude_groups: Optional[List[str]] = None,
+                   tests: Optional[List[str]] = None,
group and tests seem to be read-only, so this can be simplified to
'groups: Sequence[str] = ()' etc. without the explicit handling of None

None comes when cmdline argument is not set, will sequence as you propose I get

Traceback (most recent call last):
  File "/work/src/qemu/up-refactor-iotests/build/tests/qemu-iotests/./check", line 
37, in <module>
    tests, remaining_argv = find_tests(env.remaining_argv,
  File "/work/src/qemu/up-refactor-iotests/tests/qemu-iotests/findtests.py", 
line 208, in find_tests
    return tf.find_tests_argv(argv)
  File "/work/src/qemu/up-refactor-iotests/tests/qemu-iotests/findtests.py", 
line 193, in find_tests_argv
    return self.find_tests(**vars(args)), remaining
  File "/work/src/qemu/up-refactor-iotests/tests/qemu-iotests/findtests.py", 
line 165, in find_tests
    if 'disabled' not in groups and 'disabled' not in exclude_groups:
TypeError: argument of type 'NoneType' is not iterable

So, seems simpler to keep all as is than modifying find_tests_argv to not pass 
None arguments.

Best regards,

reply via email to

[Prev in Thread] Current Thread [Next in Thread]