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

Notice if the test-runner dies #12998

Merged
merged 1 commit into from
Feb 2, 2022

Conversation

nabijaczleweli
Copy link
Contributor

@nabijaczleweli nabijaczleweli commented Jan 22, 2022

Description

The Other Bit™ of #12990. Rich seems to've lost interest, I think there's still a point to landing this for now. Nevertheless, just like #12995, this is authored by him (which seems to've been lost on merge?).

Decided to cannibalise $REPORT_FILE for the duration between finishing the test and starting the reporter instead of making another temp file.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Performance enhancement (non-breaking change which improves efficiency)
  • Code cleanup (non-breaking change which makes code smaller or more readable)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Library ABI change (libzfs, libzfs_core, libnvpair, libuutil and libzfsbootenv)
  • Documentation (a change to man pages or other documentation)

Checklist:

  • My code follows the OpenZFS code style requirements.
  • I have updated the documentation accordingly.
  • I have read the contributing document.
  • I have added tests to cover my changes. – none apply
  • I have run the ZFS Test Suite with this change applied. – CI will hopefully
  • All commit messages are properly formatted and contain Signed-off-by.

@@ -748,4 +751,4 @@ if [ -n "$SINGLETEST" ]; then
rm -f "$RUNFILES" >/dev/null 2>&1
fi

exit "${RESULT}"
[ "$RUNRESULT" -ne 0 ] && exit "$RUNRESULT" || exit "$RESULT"
Copy link
Contributor

Choose a reason for hiding this comment

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

Regular if statement would be much more readable.

Copy link
Contributor

@rincebrain rincebrain left a comment

Choose a reason for hiding this comment

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

I was just going to wait a few days and hope people didn't bikeshed the next time, but this works.

@behlendorf behlendorf added the Status: Code Review Needed Ready for review and testing label Jan 24, 2022
Copy link
Contributor

@behlendorf behlendorf left a comment

Choose a reason for hiding this comment

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

This change appears to result in all the TEST bots reporting failure. The original intent was to only report failures if after retrying any failed tests we still have unexpected failures.

@nabijaczleweli
Copy link
Contributor Author

nabijaczleweli commented Jan 27, 2022

I rolled it back to only the first one (this is a direct translation of #12990 now), and it looks like they both globally fail all TEST buildds?

@rincebrain
Copy link
Contributor

rincebrain commented Jan 27, 2022

My original didn't, it seems. But the ones that use stashing $? do.

Curious, since the GH CI runners are happy with their lives, at least in some of mine. Shell being used difference?

...I never thought I'd suggest this, but given that the script hard fails if ksh isn't present to begin with, is there a reason for it to be /bin/sh and not /bin/ksh, or a /bin/sh thin wrapper to do the ksh symlinking on FBSD then /bin/ksh?

@nabijaczleweli
Copy link
Contributor Author

I ran the tests in set -x mode, and the GHA test runners fail like the buildbot ones (previously this was just a spurious success), and forward non-zero results as expected, so I'm not quite sure what the intended result is, if not that (that being said, I know bugger-all about the tests, so it's not saying much)?

@rincebrain
Copy link
Contributor

I suspect, looking at it harder, that the current behavior is "error if we get a nonzero return from the test runner", when the case I actually wanted to notice was "just" "the test runner got killed/died unexpectedly, but it didn't log any test failures before doing so, so RESULT works out to be 0."

I don't actually know offhand what the exit code we'd see there is, versus what we're getting from the runner normally - I wasn't expecting the runner to be returning nonzero on successful run to completion, TBH, but you can see right there in summary() that it returns 1 if anything was KILLED or FAILed and 3 if it RERAN (and 2 if there were 0 tests). So presumably we want exit codes that are outside those.

@nabijaczleweli
Copy link
Contributor Author

Updated to -gt 3 (so signaled, 128+x, and anything above RERAN) and the buildds fail as expected now I think?

@rincebrain
Copy link
Contributor

I already approved it, but I would agree that the failures seem correct. 👍

Currently, we seem to only care if the results collector errors.

It seems like we probably care if the test-runner died.

Authored-by: Rich Ercolani <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
@nabijaczleweli
Copy link
Contributor Author

nabijaczleweli commented Feb 2, 2022

Rebased, squished

@behlendorf behlendorf added Status: Accepted Ready to integrate (reviewed, tested) and removed Status: Code Review Needed Ready for review and testing labels Feb 2, 2022
@behlendorf behlendorf merged commit 142a501 into openzfs:master Feb 2, 2022
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
Currently, we seem to only care if the results collector errors.
We also should care if the test-runner died.

Authored-by: Rich Ercolani <[email protected]>
Co-authored-by: Rich Ercolani <[email protected]>
Reviewed-by:  Damian Szuberski <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#12998
nicman23 pushed a commit to nicman23/zfs that referenced this pull request Aug 22, 2022
Currently, we seem to only care if the results collector errors.
We also should care if the test-runner died.

Authored-by: Rich Ercolani <[email protected]>
Co-authored-by: Rich Ercolani <[email protected]>
Reviewed-by:  Damian Szuberski <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Ahelenia Ziemiańska <[email protected]>
Closes openzfs#12998
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Accepted Ready to integrate (reviewed, tested)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants