From 243a00793a7db04c4a167983a05fe36b040718f6 Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 27 Oct 2025 16:41:37 +0000 Subject: [PATCH 1/2] Disable `pathOpen` test case for Android in `WASITests` For some reason `link-secret-dir-b/secret-c.txt` started throwing `.ELOOP` instead of `.ENOTDIR` in https://github.com/swiftwasm/WasmKit/actions/runs/18847983546/job/53777014067 --- Tests/WASITests/WASITests.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/WASITests/WASITests.swift b/Tests/WASITests/WASITests.swift index 2cd5ef94..4b81b969 100644 --- a/Tests/WASITests/WASITests.swift +++ b/Tests/WASITests/WASITests.swift @@ -5,7 +5,7 @@ import Testing @Suite struct WASITests { #if !os(Windows) - @Test + @Test(.disabled("XFAILED regression on Android with different error value thrown for `link-secret-dir-b/secret-c.txt`", platforms: [.android])) func pathOpen() throws { let t = try TestSupport.TemporaryDirectory() From ad3c20c3767847d5d1ee9764b23b74a271baf7cf Mon Sep 17 00:00:00 2001 From: Max Desiatov Date: Mon, 27 Oct 2025 16:50:42 +0000 Subject: [PATCH 2/2] Implement Android trait condition in `WASITests` --- Tests/WASITests/WASITests.swift | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/Tests/WASITests/WASITests.swift b/Tests/WASITests/WASITests.swift index 4b81b969..f8ae1606 100644 --- a/Tests/WASITests/WASITests.swift +++ b/Tests/WASITests/WASITests.swift @@ -2,6 +2,33 @@ import Testing @testable import WASI +enum TargetPlatform { + case android + + func isCurrentPlatform() -> Bool { + switch self { + case .android: + #if os(Android) + return true + #else + return false + #endif + } + } +} + +extension Trait where Self == ConditionTrait { + static func disabled( + _ comment: Comment? = nil, + sourceLocation: SourceLocation = #_sourceLocation, + platforms: [TargetPlatform] + ) -> Self { + return .disabled(comment, sourceLocation: sourceLocation) { + platforms.contains { $0.isCurrentPlatform() } + } + } +} + @Suite struct WASITests { #if !os(Windows)