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 fixes, enhancements #21684

Merged
merged 9 commits into from
Jan 6, 2020

Conversation

nashif
Copy link
Member

@nashif nashif commented Jan 3, 2020

  • close pipe file handles
  • More debug messages
  • add Digilent to device discovery

Fixes #20974
Fixes #21637

nashif added 4 commits January 3, 2020 08:41
Some platforms use this USB device for serial, detect it when generating
hardware map.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Instead of N/A, use Unknown which is more appropriate, N/A does not
really apply here.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Fix issue where we timeout in handler and show the device.log file
instead.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Add some verbosity into the log file to help with debugging.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
@zephyrbot zephyrbot added the area: Sanitycheck Sanitycheck has been renamed to Twister label Jan 3, 2020
@zephyrbot
Copy link
Collaborator

zephyrbot commented Jan 3, 2020

All checks are passing now.

Tip: The bot edits this comment instead of posting a new one, so you can check the comment's history to see earlier messages.

@@ -575,6 +576,9 @@ class BinaryHandler(Handler):
t.join()
proc.wait()
self.returncode = proc.returncode
(stdout, stderr) = proc.communicate(timeout=30)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_, stderr = proc.communicate(timeout=30)

pylint would warn, but it's hidden due to stdout being set earlier.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh... pylint did catch it.

nashif added 3 commits January 4, 2020 09:03
Reduce duplicated code by introducing a dedicated function for running
custom scripts.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
More debug messages to help locate issues and debug bugs.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Make sure we close the pipe file handles after we are done, otherwise we
will end up with too many open file descriptors and crash...

Fixes zephyrproject-rtos#20974
Fixes zephyrproject-rtos#21637

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
@nashif nashif force-pushed the sanitycheck_dec2019_enh branch from fd9d4c6 to 2b8d5ba Compare January 4, 2020 14:03
Instead of failing, report overflow when the SRAM overflows.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
@nashif nashif force-pushed the sanitycheck_dec2019_enh branch from 2b8d5ba to a5e2a55 Compare January 4, 2020 18:25
Support custom hooks after flashing is completed.

Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Copy link
Collaborator

@maksimmasalski maksimmasalski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that feature is working. But need one change, pls see my review below.

P.S. That is good that now possible to use 3 additional scripts. Because we can turn on the board and put it into reset mode -pre_script, then after flashing put it into operating mode - post_flash_script, and then turn off the board -post_script.

@@ -703,6 +719,7 @@ class DeviceHandler(Handler):
command = [get_generator()[0], "-C", self.build_dir, "flash"]

while not self.device_is_available(self.instance.platform.name):
logger.debug("Waiting for device {} to become available".format(self.instance.platform.name))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That print is going all the time when device is being programming. Like:

DEBUG - Waiting for device mec15xxevb_assy6853 to become available
DEBUG - Waiting for device mec15xxevb_assy6853 to become available
DEBUG - Waiting for device mec15xxevb_assy6853 to become available
DEBUG - Waiting for device mec15xxevb_assy6853 to become available
DEBUG - Waiting for device mec15xxevb_assy6853 to become available
DEBUG - Waiting for device mec15xxevb_assy6853 to become available
DEBUG - Waiting for device mec15xxevb_assy6853 to become available
DEBUG - Waiting for device mec15xxevb_assy6853 to become available
DEBUG - Waiting for device mec15xxevb_assy6853 to become available

For me that print caused misunderstanding if a device has a problem. Only when I commented it out, I realized that device is programming in the background and everything is ok. I think necessary to remove that print or change text. "Device programming. Soon it will be available" for example

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is just a debug log message, it does not impact functionality. It means the device is locked and being used to run a test, so the next test can't execute yet. Useful for debugging possible lockups and races.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Device programming. Soon it will be available" for example

the message is not related to flashing at all, the device is just not available and anything might be going on, for example a test might be running.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, understand. But in my case that message is printing during the first flashing process. And then test start to execute. It means that message is printing while the flashing process is running, but after second flashing process that message is not visible.

Copy link
Collaborator

@chen-png chen-png left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good. ran the sanitycheck with all tests on four boards several times, it's ok now, not report the "too many open files" or "file descriptor out of range" issue.

@nashif nashif merged commit e945006 into zephyrproject-rtos:master Jan 6, 2020
@nashif nashif deleted the sanitycheck_dec2019_enh branch January 6, 2020 18:58
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sanitycheck failed issue in parallel running. file resources exceeded with sanitycheck
5 participants