-
-
Notifications
You must be signed in to change notification settings - Fork 613
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
GHA main: Add Alpine Linux job, to CI-test musl libc #20741
base: master
Are you sure you want to change the base?
Conversation
Thanks for your pull request and interest in making D better, @kinke! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please see CONTRIBUTING.md for more information. If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment. Bugzilla referencesYour PR doesn't reference any Bugzilla issue. If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog. Testing this PR locallyIf you don't have a local development environment setup, you can use Digger to test this PR: dub run digger -- build "master + dmd#20741" |
0560b3a
to
e6c031a
Compare
@JohanEngelen: Looks like there's no exception stack trace support for musl here upstream. I guess we'd need to upstream some druntime changes in ldc-developers/ldc#4639 and ldc-developers/ldc#4691? |
yes indeed! |
ae8d4ce
to
da60696
Compare
@JohanEngelen: Okay, I've merged your two PRs to a single commit suitable for upstream here, as 2nd commit; the 3rd commit shows that it works, allowing to re-enable most hacked-out tests. Please extract it to its own PR and make sure it gets merged, as prerequisite of this PR. [It's your work after all, and you probably remember most details that could come up during a review.] |
|
merged that PR |
Incl. some test fixes.
@@ -149,20 +159,20 @@ jobs: | |||
- name: Test dmd | |||
run: ci/run.sh test_dmd | |||
- name: Test druntime | |||
if: '!matrix.coverage' | |||
if: '!matrix.coverage && (success() || failure())' |
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 was this needed and how does this help? (seems to add && true
which is a no-op?)
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.
It runs all of the test steps (if all steps before were successful IIRC), doesn't abort after the 1st failing test step. I.e., you see all failures and don 't have to fix the compiler testsuite before seeing results for druntime and Phobos etc.
ifeq ($(OS),linux) | ||
# Alpine Linux comes with an apk tool | ||
ifeq (1,$(shell which apk &>/dev/null && echo 1)) | ||
IS_MUSL:=1 |
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.
Nitpick: maybe this should be IS_ALPINE
and later make the mapping IS_ALPINE --> IS_MUSL
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.
What matters is musl, the detection here is incomplete, only supporting Alpine. Could add a FIXME comment if really required.
# /usr/include/asm-generic/fcntl.h(195): Error: struct `importc_includes.flock` conflicts with struct `importc_includes.flock` at /usr/include/fcntl.h(24) | ||
ifeq ($(OS),linux) | ||
ifeq (1,$(shell which apk &>/dev/null && echo 1)) | ||
TESTS := |
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.
so that here you can use ifneq ($(IS_ALPINE),1)
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.
Different file and druntime test dir, plus I don't know if this is Alpine-specific, possibly even v3.21 specific. (This test wasn't in v2.110, so no results with LDC for this test yet.)
# FIXME: segfaults with musl libc | ||
ifneq ($(IS_MUSL),1) | ||
TESTS += unknown_gc | ||
endif |
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.
This was unexpected, works with LDC (and its druntime v2.110 though). The test looks as harmless as it gets.
@@ -44,7 +44,7 @@ void main(string[] args) | |||
auto nf1 = new NoFinalize; | |||
auto nf2 = new NoFinalizeBig; | |||
|
|||
shared size_t finalizeCounter; | |||
static shared size_t finalizeCounter; |
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.
Must be a global (not on the stack), as due to the dlclose no-op, the finalizers might run after main() ends, causing a segfault.
No description provided.