Skip to content

[test][android] Fix one test and disable others for NDK 28 and API 24#88056

Merged
finagolfin merged 1 commit into
swiftlang:mainfrom
finagolfin:droid-tests
Mar 24, 2026
Merged

[test][android] Fix one test and disable others for NDK 28 and API 24#88056
finagolfin merged 1 commit into
swiftlang:mainfrom
finagolfin:droid-tests

Conversation

@finagolfin
Copy link
Copy Markdown
Member

Check if this fixes the failing IRGen test after swiftlang/swift-docker#528 and bring those disabled tests for NDK 28 here instead.

@finagolfin
Copy link
Copy Markdown
Member Author

@swift-ci test android

@finagolfin
Copy link
Copy Markdown
Member Author

@swift-ci test android

// REQUIRES: swift_feature_ImportCxxMembersLazily

// Requires specifying the Android API when compiling
// UNSUPPORTED: OS=linux-android, OS=linux-androideabi
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

We currently do not set the Android API level when running the compiler validation suite for Android, but NDK 28 onwards requires the API level in some situations, so disable this for now and fix it later.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you use XFAIL instead - we don't want to prevent the test from being run

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Can't, that's the mistake I made initially. 😄

This test only fails with NDK 28+, so it currently passes with NDK 27 on the trunk Android CI that runs on linux, as I'm waiting for the CI team to update that runner to NDK 28.

Once they do, I'll modify this to run in some form. 👍

// CHECK-28-NOT: call swiftcc i1 @"$ss26_stdlib_isOSVersionAtLeastyBi1_Bw_BwBwtF"(

// REQUIRES: OS=linux-android || OS=linux-androideabi
// REQUIRES: OS=linux-android
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This test was only passing for non-AArch64 because the AArch64 stdlib wasn't getting cleaned between the builds, so once I added that cleanup recently, this test started failing.

Specifying the right target arch above gets it working on x86_64, but then a check fails on armv7-linux-androideabi, so disabled that 32-bit target while we look into it.

// RUN: %target-swift-reflection-dump %t/TypesToReflect | %FileCheck %s

// Fails only with Android NDK 28 because of an lld issue
// UNSUPPORTED: OS=linux-android
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

These two tests only fail with the lld in NDK 28, but pass with NDK 29+ again, so I'll enable them again once we update the NDK on the CI.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please mark as XFAIL rather than UNSUPPORTED

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

As above, can't, as it passes with NDK 27. I'll update it once the CI team actually gets NDK 28 in.

@finagolfin
Copy link
Copy Markdown
Member Author

@swift-ci smoke test

@finagolfin finagolfin enabled auto-merge (squash) March 24, 2026 17:35
// REQUIRES: swift_feature_ImportCxxMembersLazily

// Requires specifying the Android API when compiling
// UNSUPPORTED: OS=linux-android, OS=linux-androideabi
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you use XFAIL instead - we don't want to prevent the test from being run

// RUN: %target-swift-reflection-dump %t/TypesToReflect | %FileCheck %s

// Fails only with Android NDK 28 because of an lld issue
// UNSUPPORTED: OS=linux-android
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please mark as XFAIL rather than UNSUPPORTED

// REQUIRES: PTRSIZE=64

// Fails only with Android NDK 28 because of an lld issue
// UNSUPPORTED: OS=linux-android
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Likewise

@finagolfin finagolfin dismissed compnerd’s stale review March 24, 2026 18:05

This is preparatory to getting NDK 28 in the linux runner, so they don't break when that's updated. I will make sure these run again once that happens.

@finagolfin finagolfin merged commit 7eb94c9 into swiftlang:main Mar 24, 2026
3 of 4 checks passed
@finagolfin finagolfin deleted the droid-tests branch March 28, 2026 08:03
ktoso pushed a commit to ktoso/swift that referenced this pull request Apr 10, 2026
…swiftlang#88056)

This fixes the failing IRGen test after
swiftlang/swift-docker#528 and bring those disabled tests for NDK 28
here instead.
finagolfin added a commit that referenced this pull request Apr 18, 2026
…88177)

A recent change in the Android CI build script,
swiftlang/swift-docker#528, exposed that this test was only passing for
other Android non-AArch64 architectures because AArch64 was built first
and that SDK build wasn't removed.

Since we made that change to remove previous SDK builds for 6.3 also,
this test started failing on [the 6.3 Android
CI](https://ci.swift.org/job/oss-swift-6.3-package-swift-sdk-for-android/), so bring the fix over to 6.3.
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.

2 participants