-
Notifications
You must be signed in to change notification settings - Fork 18
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
trunner: add missing expect during flash procedure #386
base: master
Are you sure you want to change the base?
Conversation
Unit Test Results4 472 tests - 3 486 4 181 ✅ - 3 235 15m 26s ⏱️ - 25m 13s Results for commit d9c7158. ± Comparison against base commit 1c676a4. This pull request removes 3486 tests.
♻️ This comment has been updated with latest results. |
b1a6bc8
to
17dcde8
Compare
hmm, I think it's invalid to assume every device will boot to If I understand correctly - the underlying issue is that we're rebooting twice between reboot and first test - so we should focus on removing the underlying issue instead :). |
I don't think this is an issue (ash only used in QEMU right now), every target after flashing is rebooted to ensure that process ended correctly (Right now we know only about correct pass of data from host device, and nothing about that system start or not after flash) + 70% of our physical devices are using changing mode after flash and need to be shut down using power cut, without this it will hang on reboot without effect. This change will pinpoint this behavior in the future and separate flashing process from tests cases. But it is my personal opinion, and I'm open to discussion about improvements :) |
Some more remarks:
|
You're absolutely right, after rethink this approach is destructive for trunner, I will consider soften up this second reboot with some buffer changes to nullify this behavior of double reboot situation. Thanks for visiting this draft pr and give me some advices :) |
2a7f1a7
to
9449ff3
Compare
9449ff3
to
d9c7158
Compare
@@ -244,6 +244,10 @@ def run_tests(self, tests: Sequence[TestOptions]) -> Sequence[TestResult]: | |||
# Ensure first test will start with reboot | |||
last_test_failed = True | |||
|
|||
# Unload data before starting tests | |||
if self.ctx.should_flash is not False and self.ctx.target.experimental is False: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why it's disabled for experimental targets.
Can't we just always drain the buffer (without any IF?) - the same way as below:
self.target.dut.read(timeout=0.1)
Please note that this is still a race - new data might be produced between reading the buffer and issuing reboot before the first test.
Description
This change resolves the issue where the flashing process executes a reboot after successful flashing, causing the next test case to receive output from the flash reboot and detect the PSH prompt too early
Motivation and Context
Types of changes
How Has This Been Tested?
Checklist:
Special treatment