-
Notifications
You must be signed in to change notification settings - Fork 306
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
HPCC-33333 In GH Unittest Action change the test case execution sequence and add core file check. #19469
base: candidate-9.6.x
Are you sure you want to change the base?
HPCC-33333 In GH Unittest Action change the test case execution sequence and add core file check. #19469
Conversation
Jira Issue: https://hpccsystems.atlassian.net//browse/HPCC-33333 Jirabot Action Result: |
@Michael-Gardner please review this change. |
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.
Attila this looks great.
3e954d7
to
e1f4ac5
Compare
@ghalliday please merge |
e1f4ac5
to
2fb23f3
Compare
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.
@AttilaVamos - please see comments.
@@ -41,6 +43,7 @@ jobs: | |||
sudo apt-get update | |||
sudo apt-get install -y ${{ inputs.dependencies }} | |||
sudo apt-get install -y gdb | |||
echo 'core_%e.%p' | sudo tee /proc/sys/kernel/core_pattern |
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.
looks sensible. Do we already do this somewhere for regular hpcc components, and hence it's not an issue when they core?
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.
OBT is using this kind of core creation setting in years now.
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.
ok, unrelated to this PR, but does the github smoketest action also need it to ensure cores/stacks created and upload to artifacts where too?
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.
See PR-19478/HPCC-33362
echo "--------------------------------------" | ||
sudo /opt/HPCCSystems/bin/unittests -e "$test" | ||
echo " " | ||
done< <(/opt/HPCCSystems/bin/unittests -l | sort ) |
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.
Seems sensible - this is mainly being done, so each unittest is run in sequence with some extra logging in between?
Am I correct in thinking it will stop (action step fail) when if 1st unittest fails, i.e. not continue to run others? (I think that's fine btw, just checking)
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.
Yes, the step fail at the first failed test.
|
||
- name: unittests-logs-artifact | ||
if: ${{ failure() || cancelled() }} | ||
if: ${{ failure() || cancelled() || env.UPLOAD_ARTIFACT == 'true'}} |
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.
why is || UPLOAD_ARTIFACT == 'true' needed?
The previous step always returns -1 if there were cores, and hence failure() should be true.
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.
True, removed.
|
||
- name: Check for Core files | ||
run: | | ||
CORE_FILES=( $(sudo find /opt/HPCCSystems/bin/ /var/lib/HPCCSystems/ -iname 'core*' -type f -print) ) |
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.
are you sure these are the right directories to look in?
if unittest cores, it will dump in the current working director which will be the runner cwd afaics - i.e. there won't be any core files in /opt/HPCCSystems/bin/ or /var/lib/HPCCSystems/.
Also, is 'sudo' necessary?
If there can only be <=1 core and only from unittest in cwd then this could be simplified to:
shopt -s nullglob
CORE_FILES=(core*)
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.
Changed
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.
@AttilaVamos - looks good. Please squash.
1 question re. core pattern/files/stacks in smoketest beyond scope of this PR.
ac44944
to
bbe2af2
Compare
@@ -52,9 +53,43 @@ jobs: | |||
timeout-minutes: 10 # generous, expected time is approx 1 min. | |||
shell: "bash" | |||
run: | | |||
set +e # Ignore intermediate error(s) in this step |
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.
Is this going to mean that it will no longer stop after 1st unittest failure, and could run through all (generating a core file for each potentially) ?
That may be okay, but what is the intent of the set +e here?
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.
If "Bash"specified, then "bash -e {0}" executed internally. You can claim it need to fail fast, then I will remove the 'set +e'.
bbe2af2
to
a76638c
Compare
…ce and add core file check. Phase 1: - Change the executon sequence and log the test case name - Add core check and core tracing generation code Signed-off-by: Attila Vamos <[email protected]>
678055b
to
61662b9
Compare
Signed-off-by: Attila Vamos <[email protected]>
61662b9
to
f1e7e60
Compare
Phase 1:
Type of change:
Checklist:
Smoketest:
Testing: