Skip to content

[CPULLVM] - Prepare for LIBCXX tests enablement RISCV. - #469

Merged
Ana Pazos (apazos) merged 13 commits into
qualcomm:qualcomm-softwarefrom
pawan-nirpal-031:libcxx-tests-riscv-enablement
Jul 14, 2026
Merged

Ana Pazos (apazos) merged 13 commits into
qualcomm:qualcomm-softwarefrom
pawan-nirpal-031:libcxx-tests-riscv-enablement

Conversation

@pawan-nirpal-031

@pawan-nirpal-031 Pawan Nirpal (pawan-nirpal-031) commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Manage fixes for RISC-V LIBCXX tests enablement.

We add xfails for the following variants, but do not enable all of them due to CI timeout limit.

  • riscv32gc_ilp32d
  • riscv32imac_ilp32
  • riscv32imac_ilp32_nopic
  • riscv32imac_zba_zbb_ilp32
  • riscv32imac_zba_zbb_ilp32_nopic
  • riscv32imac_zcb_zcmp_ilp32_nopic
  • riscv32imac_zcb_zcmp_zba_zbb_ilp32_nopic
  • riscv32imafc_ilp32f
  • riscv32imafc_zba_zbb_ilp32f
  • riscv32imafc_zcb_zcmp_zba_zbb_ilp32f
  • riscv64gc_lp64_nopic
  • riscv64gc_lp64d_nopic
  • riscv64gc_zba_zbb_lp64_nopic
  • riscv64gc_zba_zbb_lp64d_nopic
  • riscv64imac_lp64_nopic

We only enable the following riscv variants.

  • riscv32gc_ilp32d
  • riscv32imac_ilp32
  • riscv32imac_zba_zbb_ilp32_nopic
  • riscv32imafc_zcb_zcmp_zba_zbb_ilp32f
  • riscv64gc_lp64_nopic
  • riscv64gc_zba_zbb_lp64d_nopic
  • riscv64imac_lp64_nopic

@pawan-nirpal-031

Copy link
Copy Markdown
Contributor Author

@pawan-nirpal-031

Pawan Nirpal (pawan-nirpal-031) commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

https://github.com/qualcomm/cpullvm-toolchain/actions/runs/28660075798

Pass for.
riscv32gc_ilp32d
riscv32imac_ilp32
riscv32imac_ilp32_nopic
riscv32imac_zba_zbb_ilp32
riscv32imac_zba_zbb_ilp32_nopic
ninja check-cxx-riscv32imac_zcb_zcmp_ilp32_nopic

),
XFail(
name="long-double-picolibc-aarch64",
name="ong-double-picolibc-aarch64-riscv",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is this a typo? (long -> ong)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Oops yes. Thanks for the observation.

@pawan-nirpal-031
Pawan Nirpal (pawan-nirpal-031) force-pushed the libcxx-tests-riscv-enablement branch 3 times, most recently from 21a360d to 9025c81 Compare July 3, 2026 12:18
@pgodeq

Copy link
Copy Markdown
Contributor

Would you be enabling LIBCXX tests for riscv variant: riscv32im_zba_zbb_zbc_zbs_zca_zcb_zcmp_ilp32_nothreads_nopic ?

If this is planned, then I would abandon my PR #465.

@pawan-nirpal-031

Copy link
Copy Markdown
Contributor Author

Would you be enabling LIBCXX tests for riscv variant: riscv32im_zba_zbb_zbc_zbs_zca_zcb_zcmp_ilp32_nothreads_nopic ?

If this is planned, then I would abandon my PR #465.

Yes Pankaj, I have those variants planned for a following PR. Due to CI timeout we are brining in riscv variants in batches.

@pawan-nirpal-031

Copy link
Copy Markdown
Contributor Author

CI build pass for https://github.com/qualcomm/cpullvm-toolchain/actions/runs/28667521664/job/85022776504?pr=469 the following.

ninja check-cxx-riscv32gc_ilp32d
ninja check-cxx-riscv32imac_ilp32
ninja check-cxx-riscv32imac_ilp32_nopic
ninja check-cxx-riscv32imac_zba_zbb_ilp32
ninja check-cxx-riscv32imac_zba_zbb_ilp32_nopic
ninja check-cxx-riscv32imac_zcb_zcmp_ilp32_nopic
ninja check-cxx-riscv32imac_zcb_zcmp_zba_zbb_ilp32_nopic
ninja check-cxx-riscv32imafc_ilp32f
ninja check-cxx-riscv32imafc_zba_zbb_ilp32f
ninja check-cxx-riscv32imafc_zcb_zcmp_zba_zbb_ilp32f

@jonathonpenix

Copy link
Copy Markdown
Contributor

Either:

  • Include runs that (in aggregate) cover all the variants you are handling in this PR -OR-
  • Please remove the changes for variants unrelated to what you're saying you're enabling/testing in this PR

And, repeating this from elsewhere:

For test_libcxx.sh, let's just start with a subset of the RISC-V variants:
riscv32imac_ilp32
riscv32imac_zba_zbb_ilp32_nopic
riscv32imafc_zcb_zcmp_zba_zbb_ilp32f
riscv32gc_ilp32d
riscv32im_xqci_ilp32_nothreads_nopic
riscv64imac_lp64_nopic
riscv64gc_lp64_nopic
riscv64gc_zba_zbb_lp64d_nopic

Either just leave test_libcxx.sh unchanged and fix it up at the end, or just add the subset of variants tested in this PR and mentioned above.

@jonathonpenix

Copy link
Copy Markdown
Contributor

And, repeating from elsewhere again--please only include variants that have ENABLE_LIBC_TESTS/ENABLE_CXX_LIBS/ENABLE_LIBCXX_TESTS set to ON

@pawan-nirpal-031
Pawan Nirpal (pawan-nirpal-031) force-pushed the libcxx-tests-riscv-enablement branch 4 times, most recently from 58cf1bf to 4554507 Compare July 7, 2026 15:56
@pawan-nirpal-031

Copy link
Copy Markdown
Contributor Author

And, repeating from elsewhere again--please only include variants that have ENABLE_LIBC_TESTS/ENABLE_CXX_LIBS/ENABLE_LIBCXX_TESTS set to ON

Either:

  • Include runs that (in aggregate) cover all the variants you are handling in this PR -OR-
  • Please remove the changes for variants unrelated to what you're saying you're enabling/testing in this PR

And, repeating this from elsewhere:

For test_libcxx.sh, let's just start with a subset of the RISC-V variants:
riscv32imac_ilp32
riscv32imac_zba_zbb_ilp32_nopic
riscv32imafc_zcb_zcmp_zba_zbb_ilp32f
riscv32gc_ilp32d
riscv32im_xqci_ilp32_nothreads_nopic
riscv64imac_lp64_nopic
riscv64gc_lp64_nopic
riscv64gc_zba_zbb_lp64d_nopic

Either just leave test_libcxx.sh unchanged and fix it up at the end, or just add the subset of variants tested in this PR and mentioned above.

Testing all variants added in the xfails.

@@ -240,7 +241,7 @@ def check_r52_warning():
"on ARMv7-A/ARMv8 with NEON. Compiler bug; exclude until fixed.",
),
XFail(
name="long-double-picolibc-aarch64",
name="long-double-picolibc-aarch64-riscv",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we should not merge xfails for different targets, just create separate xfail configs.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If the failure/testnames/descriptions are otherwise identical, I guess I have a weak preference for merging them just to not maintain this stuff twice.

But if they diverge on any of the failure cause/testnames/descriptions, I'm definitely in favor of splitting.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Ana Pazos (@apazos) I also have a slight preference for keeping them together to avoid duplication of cause/testnames/descriptions. If they diverge as mentioned by Jonathon Penix (@jonathonpenix) it should surely be split.

Comment thread qualcomm-software/scripts/test.sh
Comment thread qualcomm-software/scripts/test_libcxx.sh Outdated
"infrastructure limitations, not test bugs.",
),
XFail(
name="ios-xalloc-atomic-nothreads-riscv",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

isn't there an easier way to xfail all the tests at once without listing each?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Excluded tests should be able to use regexes in the testnames rather than just raw names.

I don't know if there is a relatively terse regex you can write that actually captures the correct set of things though.

I guess overall this doesn't seem like the right way to be handling this--if there is this much that is broken, I think we should be:

  • Checking if there is something we should be configuring in our libc++ builds for these variants to disable this sort of stuff that we currently aren't (see ex: here where we configure certain features--is there something we can disable to tell libc++ not to assume we have atomic support?).
  • Checking if there is something we should be adding to libc++ to handle this sort of thing
  • Not testing these variants in the meantime.

I don't think XFAIL-ing however many hundreds of tests is something we want to be doing short or long term.

@pawan-nirpal-031 Pawan Nirpal (pawan-nirpal-031) Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I was skeptical too about doing this, I did explore if there's anything due to config that may be causing this failure. I/Claude was not able to come up with anything that was standard and acceptable solution for this. The Same issue is seen in libcxxabi enablement https://github.com/qualcomm/cpullvm-toolchain/pull/341/changes#diff-146802d63a83077720f5c2eb7d5ec6460d2304104383ee1acd4810438d0be5b2R155

I will try some more to find any option like fix. If not at all possible for the time being, I'm in favour of not testing the variants these tests fail for.

Edit, we have a pretty simple fix for it. Added that, CI is clean now.

@pawan-nirpal-031

Copy link
Copy Markdown
Contributor Author

CI All pass https://github.com/qualcomm/cpullvm-toolchain/actions/runs/28925976231/job/85813553924?pr=469 for the following variants.

  • ninja check-cxx-riscv32imc_ilp32_nothreads_nopic
  • ninja check-cxx-riscv32imc_zba_zbb_zbc_zbs_ilp32_nothreads_nopic
  • ninja check-cxx-riscv32im_zba_zbb_zbc_zbs_zca_zcb_zcmp_ilp32_nothreads_nopic
  • ninja check-cxx-riscv32im_xqci_ilp32_nothreads_nopic
  • ninja check-cxx-riscv64gc_lp64_nopic
  • ninja check-cxx-riscv64gc_lp64d_nopic
  • ninja check-cxx-riscv64gc_zba_zbb_lp64_nopic
  • ninja check-cxx-riscv64gc_zba_zbb_lp64d_nopic
  • ninja check-cxx-riscv64imac_lp64_nopic
  • ninja check-cxx-riscv64imc_lp64_nothreads_nopic

@pawan-nirpal-031
Pawan Nirpal (pawan-nirpal-031) force-pushed the libcxx-tests-riscv-enablement branch 4 times, most recently from 79a11b2 to 6b17e2d Compare July 10, 2026 09:44
@pawan-nirpal-031

Pawan Nirpal (pawan-nirpal-031) commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

CI success for https://github.com/qualcomm/cpullvm-toolchain/actions/runs/29234971715/job/86767437393?pr=469

ninja check-cxx-riscv64gc_lp64_nopic
ninja check-cxx-riscv64gc_lp64d_nopic
ninja check-cxx-riscv64gc_zba_zbb_lp64_nopic
ninja check-cxx-riscv64gc_zba_zbb_lp64d_nopic
ninja check-cxx-riscv64imac_lp64_nopic

libc++ test failures with configs without atomics are disabled issue filed Make ios_base::xalloc non-atomic with LIBCXX_ENABLE_THREADS=OFF. by efriedma-quic · Pull Request #20… ;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Please update the description to reflect what the PR is doing/enabling.

Comment thread qualcomm-software/embedded-runtimes/test-support/xfails.py Outdated
Comment thread qualcomm-software/scripts/test.sh Outdated
Comment thread qualcomm-software/scripts/test.sh Outdated

@jonathonpenix Jonathon Penix (jonathonpenix) Jul 10, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Again #469 (comment)

Variants without 'a' can be omitted from the list in the link for now (so, the xqci one).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The following from the list is already removed, please check again.

riscv32im_xqci_ilp32_nothreads_nopic.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

All those variants without atomic libs support, have been removed, I believe there's none here from that list that doesn't have the atomics support.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I say "Variants without..." only to say that the list linked above does not need to be implemented verbatim given the decisions that have since been made around variants without 'a'.

If that is done, then great! Nothing needs to change on that front.

I say "Again #469 (comment)" as again I think we need to start with a subset of these variants in test_libcxx.sh to have a chance of running these tests once this is merged.

If you disagree, that's fine--but please say so/say why.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I say "Variants without..." only to say that the list linked above does not need to be implemented verbatim given the decisions that have since been made around variants without 'a'.
If that is done, then great! Nothing needs to change on that front.

It is. Thanks.

I say "Again #469 (comment)" as again I think we need to start with a subset of these variants in test_libcxx.sh to have a chance of running these tests once this is merged.
If you disagree, that's fine--but please say so/say why.

Done too. We schedule only the following riscv variants.

riscv32gc_ilp32d
riscv32imac_ilp32
riscv32imac_zba_zbb_ilp32_nopic
riscv32imafc_zcb_zcmp_zba_zbb_ilp32f
riscv64gc_lp64_nopic
riscv64gc_zba_zbb_lp64d_nopic
riscv64imac_lp64_nopic

Signed-off-by: Pawan Nirpal <pnirpal@qti.qualcomm.com>
@pawan-nirpal-031
Pawan Nirpal (pawan-nirpal-031) force-pushed the libcxx-tests-riscv-enablement branch 3 times, most recently from fe13a13 to fa1b0cb Compare July 13, 2026 08:18
Signed-off-by: Pawan Nirpal <pnirpal@qti.qualcomm.com>
Signed-off-by: Pawan Nirpal <pnirpal@qti.qualcomm.com>
@jonathonpenix

Copy link
Copy Markdown
Contributor

Please update the description to reflect what the PR is doing/enabling.

Ping

Signed-off-by: Pawan Nirpal <pnirpal@qti.qualcomm.com>
@pawan-nirpal-031

Pawan Nirpal (pawan-nirpal-031) commented Jul 14, 2026

Copy link
Copy Markdown
Contributor Author

Please update the description to reflect what the PR is doing/enabling.

Ping

Updated, please suggest if this works or needs any change. This was deferred as the preference to run which variants was still to be decided.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@apazos
Ana Pazos (apazos) merged commit 5193d63 into qualcomm:qualcomm-software Jul 14, 2026
16 of 18 checks passed
@jonathonpenix

Copy link
Copy Markdown
Contributor

/cherry-pick 5193d63

@cpullvmbot

Copy link
Copy Markdown
Collaborator

/pull-request #598

Ana Pazos (apazos) pushed a commit that referenced this pull request Aug 17, 2026
…enablement RISCV. (#469) (#598)

Backport 5193d63

Requested by: @jonathonpenix

Signed-off-by: Pawan Nirpal <pnirpal@qti.qualcomm.com>
Co-authored-by: Pawan Nirpal <pnirpal@qti.qualcomm.com>
Jonathon Penix (jonathonpenix) added a commit that referenced this pull request Aug 24, 2026
Previously, xqci variants were omitted as we saw huge numbers of libc++
test failures in variants without 'a' (see #469)
and at the time we didn't have any xqci variants with 'a'.

We do now (and these variants turn on C++ libs and `ENABLE_LIBCXX_TESTS`)
so add one such variant in the scheduled libc++ tests--it should be clean.

Signed-off-by: Jonathon Penix <jpenix@qti.qualcomm.com>
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 this pull request may close these issues.

6 participants