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

chef stateful shell test randomly fails #19408

Closed
bzbarsky-apple opened this issue Jun 9, 2022 · 3 comments · Fixed by #19362
Closed

chef stateful shell test randomly fails #19408

bzbarsky-apple opened this issue Jun 9, 2022 · 3 comments · Fixed by #19362

Comments

@bzbarsky-apple
Copy link
Contributor

bzbarsky-apple commented Jun 9, 2022

Problem

I've now seen a number of failures like https://github.com/project-chip/connectedhomeip/runs/6817356066?check_suite_focus=true in CI. Retriggering the jobs typically makes them pass.

Log says:

FAILED: python/gen/examples/chef/chef.tests.test_stateful_shell.py.pw_pystamp 
python3 ../../third_party/pigweed/repo/pw_build/py/pw_build/python_runner.py --gn-root ../../ --current-path ../../examples/chef --default-toolchain=//build/toolchain/linux:linux_x64_clang --current-toolchain=//third_party/pigweed/repo/pw_build/python_toolchain:python --touch python/gen/examples/chef/chef.tests.test_stateful_shell.py.pw_pystamp --capture-output --lockfile pip.lock -- ../../examples/chef/test_stateful_shell.py
test123
.123
...1234
F
======================================================================
FAIL: test_set_env_outside_shell (__main__.TestStatefulShell)
Tests setting env variables outside shell call.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/__w/connectedhomeip/connectedhomeip/out/clang/../../examples/chef/test_stateful_shell.py", line 33, in test_set_env_outside_shell
    self.assertEqual(resp, "1234")
AssertionError: '' != '1234'
+ 1234
----------------------------------------------------------------------
Ran 5 tests in 0.321s
FAILED (failures=1)

Proposed Solution

Fix the test.

@cpagravel @andy31415

@cpagravel
Copy link
Contributor

Is that the only test of the 5 that are failing?

@cpagravel
Copy link
Contributor

It is not the only one that failed. Here is an example of a different test failing: https://github.com/project-chip/connectedhomeip/runs/6817031289?check_suite_focus=true

I suspect we are reading the file before it has been completely written to. I'll make a PR.

@cpagravel
Copy link
Contributor

I added the fix to the PR #19362 . Unfortunately, the only way to test it is to run it a bunch of times.

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 a pull request may close this issue.

2 participants