Skip to content

Conversation

@kartben
Copy link
Contributor

@kartben kartben commented Nov 18, 2025

This is to fix a test that works fine on a local computer but not in CI. This is currently preventing CI on 4.1 branch from being green.

I have confirmed in an earlier push that a dummy change to the samples/sensor/sensor_shell/pytest/test_sensor_shell.py file triggers the test ... and it fails. The second push with the cherrypicked commit makes CI happy.

Cherry picking 7c0e4ae from main branch
to ensure test correctly runs in CI.

Wait for prompt before sending command to ensure shell is ready.

Signed-off-by: Tim Pambor <[email protected]>
@kartben kartben force-pushed the backport_sensor_shell_fix branch from 9d45eb8 to 212526b Compare November 18, 2025 17:38
@kartben kartben changed the title [wip] 4.1 manual backport [backport-4.1] manual backport of commit 7c0e4aecace9287bcd0508e991672a732fc95ddc Nov 18, 2025
@sonarqubecloud
Copy link

@JarmouniA
Copy link
Contributor

Maybe you are already aware of this, but in case you aren't, the commit in question was reverted in #94426, a new version of the fix was merged in #94478.

@JarmouniA
Copy link
Contributor

Maybe you are already aware of this, but in case you aren't, the commit in question was reverted in #94426, a new version of the fix was merged in #94478.

Ah sorry, discard that, only df1e6f5 was reverted.

@kartben
Copy link
Contributor Author

kartben commented Nov 18, 2025

Maybe you are already aware of this, but in case you aren't, the commit in question was reverted in #94426, a new version of the fix was merged in #94478.

Ah sorry, discard that, only df1e6f5 was reverted.

Yup :) but still no luck anyway so need to investigate further:/
Thanks!

@JarmouniA
Copy link
Contributor

Cc @tpambor Just in case you could help.

@tpambor
Copy link
Contributor

tpambor commented Nov 18, 2025

The problem was in the uart_native_pty driver which didn't correctly receive incoming data. This was fixed then in #94478. 7c0e4ae wasn't reverted as it is not causing any harm, but it helped with stability/synchronization so that with it the test did actually pass with the first buggy version of the uart driver. With the fixed driver the test passed also without 7c0e4ae. Errors were different like

DEBUG    twister_harness.helpers.shell:shell.py:49 Got prompt
DEBUG    twister_harness.device.device_adapter:device_adapter.py:150 #: uart:~$ ean show can
DEBUG    twister_harness.device.device_adapter:device_adapter.py:150 #: ean: command not found

and the test here does not fail for native_sim, so that I think that this is probably a different issue here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants