Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sanitycheck: "TypeError: 'NoneType' object is not iterable" #29376

Closed
andrewboie opened this issue Oct 20, 2020 · 3 comments · Fixed by #29381
Closed

sanitycheck: "TypeError: 'NoneType' object is not iterable" #29376

andrewboie opened this issue Oct 20, 2020 · 3 comments · Fixed by #29381
Assignees
Labels
area: Sanitycheck Sanitycheck has been renamed to Twister bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug

Comments

@andrewboie
Copy link
Contributor

$ scr -p qemu_x86_64 -p qemu_x86 -T tests/kernel/
Deleting output directory /dev/shm/sanity-out
INFO    - JOBS: 48
INFO    - Building initial testcase list...
INFO    - 214 test configurations selected, 32 configurations discarded due to filters.
INFO    - Adding tasks to the queue...
INFO    - Total complete:   35/ 182  19%  skipped:   14, failed:    0
ERROR   - qemu_x86_64               tests/kernel/mutex/sys_mutex/system.mutex          FAILED: Exited with 2
ERROR   - see: /dev/shm/sanity-out/qemu_x86_64/tests/kernel/mutex/sys_mutex/system.mutex/handler.log
INFO    - Total complete:   41/ 182  22%  skipped:   14, failed:    1
ERROR   - qemu_x86                  tests/kernel/mutex/sys_mutex/system.mutex          FAILED: Exited with 2
ERROR   - see: /dev/shm/sanity-out/qemu_x86/tests/kernel/mutex/sys_mutex/system.mutex/handler.log
INFO    - Total complete:   94/ 182  51%  skipped:   15, failed:    2
ERROR   - qemu_x86_64               tests/kernel/mem_pool/mem_pool_concept/kernel.memory_pool.concept.legacy FAILED: Failed
ERROR   - see: /dev/shm/sanity-out/qemu_x86_64/tests/kernel/mem_pool/mem_pool_concept/kernel.memory_pool.concept.legacy/handler.log
INFO    - Total complete:   95/ 182  52%  skipped:   17, failed:    3ERROR   - 'qemu_x86/tests/kernel/interrupt/arch.interrupt' generated an exception:
ERROR   - Traceback (most recent call last):
ERROR   -   File "/home/apboie/projects/zephyr/zephyr/scripts/sanity_chk/sanitylib.py", line 3072, in execute
ERROR   -     data = future.result()
ERROR   -   File "/usr/lib/python3.8/concurrent/futures/_base.py", line 432, in result
ERROR   -     return self.__get_result()
ERROR   -   File "/usr/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
ERROR   -     raise self._exception
ERROR   -   File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
ERROR   -     result = self.fn(*self.args, **self.kwargs)
ERROR   -   File "/home/apboie/projects/zephyr/zephyr/scripts/sanity_chk/sanitylib.py", line 2145, in process
ERROR   -     self.cleanup_artifacts()
ERROR   -   File "/home/apboie/projects/zephyr/zephyr/scripts/sanity_chk/sanitylib.py", line 2157, in cleanup_artifacts
ERROR   -     allow += additional_keep
ERROR   - TypeError: 'NoneType' object is not iterable
INFO    - Total complete:   97/ 182  53%  skipped:   19, failed:    3'qemu_x86/tests/kernel/interrupt/arch.interrupt' generated an exception: 'NoneType' object is not iterable
apboie@apboie-mobl4:~/projects/zephyr/zephyr (1) page-tables-overhaul /home/apboie/projects/zephyr/zephyr
$ scr -p qemu_x86_64 -p qemu_x86 -T tests/kernel/
Deleting output directory /dev/shm/sanity-out
INFO    - JOBS: 48
INFO    - Building initial testcase list...
INFO    - 214 test configurations selected, 32 configurations discarded due to filters.
INFO    - Adding tasks to the queue...
INFO    - Total complete:   20/ 182  10%  skipped:   14, failed:    0
ERROR   - qemu_x86_64               tests/kernel/lifo/lifo_usage/kernel.lifo.usage     FAILED: Failed
ERROR   - see: /dev/shm/sanity-out/qemu_x86_64/tests/kernel/lifo/lifo_usage/kernel.lifo.usage/handler.log
INFO    - Total complete:   41/ 182  22%  skipped:   14, failed:    1
ERROR   - qemu_x86_64               tests/kernel/mutex/sys_mutex/system.mutex          FAILED: Exited with 2
ERROR   - see: /dev/shm/sanity-out/qemu_x86_64/tests/kernel/mutex/sys_mutex/system.mutex/handler.log
INFO    - Total complete:   43/ 182  23%  skipped:   14, failed:    2
ERROR   - qemu_x86                  tests/kernel/mutex/sys_mutex/system.mutex          FAILED: Exited with 2
ERROR   - see: /dev/shm/sanity-out/qemu_x86/tests/kernel/mutex/sys_mutex/system.mutex/handler.log
INFO    - Total complete:   93/ 182  51%  skipped:   19, failed:    3ERROR   - 'qemu_x86_64/tests/kernel/early_sleep/kernel.common.sleep' generated an exception:
ERROR   - Traceback (most recent call last):
ERROR   -   File "/home/apboie/projects/zephyr/zephyr/scripts/sanity_chk/sanitylib.py", line 3072, in execute
ERROR   -     data = future.result()
ERROR   -   File "/usr/lib/python3.8/concurrent/futures/_base.py", line 432, in result
ERROR   -     return self.__get_result()
ERROR   -   File "/usr/lib/python3.8/concurrent/futures/_base.py", line 388, in __get_result
ERROR   -     raise self._exception
ERROR   -   File "/usr/lib/python3.8/concurrent/futures/thread.py", line 57, in run
ERROR   -     result = self.fn(*self.args, **self.kwargs)
ERROR   -   File "/home/apboie/projects/zephyr/zephyr/scripts/sanity_chk/sanitylib.py", line 2145, in process
ERROR   -     self.cleanup_artifacts()
ERROR   -   File "/home/apboie/projects/zephyr/zephyr/scripts/sanity_chk/sanitylib.py", line 2157, in cleanup_artifacts
ERROR   -     allow += additional_keep
ERROR   - TypeError: 'NoneType' object is not iterable
INFO    - Total complete:  101/ 182  55%  skipped:   19, failed:    3
@andrewboie andrewboie added bug The issue is a bug, or the PR is fixing a bug area: Sanitycheck Sanitycheck has been renamed to Twister labels Oct 20, 2020
@galak galak self-assigned this Oct 20, 2020
@galak
Copy link
Collaborator

galak commented Oct 20, 2020

@andrewboie trying to reproduce this and not having success.

Are there other flags to sanitycheck hidden in scr?

I've hacked a working tree to create a false failure to see if its related to that, but that seems to work ok for me.

@andrewboie
Copy link
Contributor Author

alias scr='nice sanitycheck -j36 -M -c --outdir /dev/shm/sanity-out'

@galak
Copy link
Collaborator

galak commented Oct 20, 2020

alias scr='nice sanitycheck -j36 -M -c --outdir /dev/shm/sanity-out'

Cool the -M is where the bug is -- if you need a workaround for now, remove the -M.

galak added a commit to galak/zephyr that referenced this issue Oct 20, 2020
If we get a build failure with the -M option we get the following:

TypeError: 'NoneType' object is not iterable

This was due to having the default value of additional_keep in
cleanup_artifacts being None instead of an empty array.

Fixes zephyrproject-rtos#29376

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
@galak galak added the has-pr label Oct 20, 2020
@nashif nashif added the priority: medium Medium impact/importance bug label Oct 20, 2020
@nashif nashif removed their assignment Oct 20, 2020
galak added a commit that referenced this issue Oct 21, 2020
If we get a build failure with the -M option we get the following:

TypeError: 'NoneType' object is not iterable

This was due to having the default value of additional_keep in
cleanup_artifacts being None instead of an empty array.

Fixes #29376

Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Sanitycheck Sanitycheck has been renamed to Twister bug The issue is a bug, or the PR is fixing a bug priority: medium Medium impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants