Skip to content

xDS interop: buildscripts: fix run_test return status (v1.48.x backport)#30876

Merged
sergiitk merged 1 commit intogrpc:v1.48.xfrom
sergiitk:backport-1.48-xds-interop-buildscript-fix-return
Sep 8, 2022
Merged

xDS interop: buildscripts: fix run_test return status (v1.48.x backport)#30876
sergiitk merged 1 commit intogrpc:v1.48.xfrom
sergiitk:backport-1.48-xds-interop-buildscript-fix-return

Conversation

@sergiitk
Copy link
Copy Markdown
Member

@sergiitk sergiitk commented Sep 7, 2022

Backport of #30768 to v1.48.x.

To capture the return status of the test in run_test the last command must be the call to the test itself.
This removes set +x, which makes the run_test always return success, and not propagate the test status.

I can't find it, but this exact error bit us before. Looks like it leaked to other scripts.
The good thing is if the test was executed, it's failure would still be picked up from the result xml.

However, if the test framework didn't start in the first place, the result will be false positive.
Example: https://source.cloud.google.com/results/invocations/98d3e679-ec8a-40bd-9f36-88179747b0d6/targets

/home/kbuilder/.pyenv/versions/k8s_xds_test_runner/bin/python3: Error while finding module specification for 'tests.authz_test' (ModuleNotFoundError: No module named 'tests')
+ set +x
Failed test suites: 0

[ID: 3548168] Command finished after 625 secs, exit value: 0

To be backported after #30735.

To capture the return status of the test in run_test the last command must be the call to the test itself.
This removes `set +x`, which makes the run_test always return success, and not propagate the test status.

I can't find it, but this exact error bit us before. Looks like it leaked to other scripts.
The good thing is if the test was executed, it's failure would still be picked up from the result xml.

However, if the test framework didn't start in the first place, the result will be false positive.
Example: https://source.cloud.google.com/results/invocations/98d3e679-ec8a-40bd-9f36-88179747b0d6/targets

```
/home/kbuilder/.pyenv/versions/k8s_xds_test_runner/bin/python3: Error while finding module specification for 'tests.authz_test' (ModuleNotFoundError: No module named 'tests')
+ set +x
Failed test suites: 0

[ID: 3548168] Command finished after 625 secs, exit value: 0
```
@sergiitk sergiitk added release notes: no Indicates if PR should not be in release notes area/psm interop labels Sep 7, 2022
@sergiitk sergiitk enabled auto-merge (squash) September 7, 2022 17:16
@sergiitk sergiitk merged commit 478a466 into grpc:v1.48.x Sep 8, 2022
@sergiitk sergiitk deleted the backport-1.48-xds-interop-buildscript-fix-return branch September 9, 2022 21:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants