diff --git a/test/hotspot/jtreg/serviceability/sa/ClhsdbPstack.java b/test/hotspot/jtreg/serviceability/sa/ClhsdbPstack.java index 51738be3554..6921a7ec0ca 100644 --- a/test/hotspot/jtreg/serviceability/sa/ClhsdbPstack.java +++ b/test/hotspot/jtreg/serviceability/sa/ClhsdbPstack.java @@ -54,6 +54,10 @@ import jtreg.SkippedException; public class ClhsdbPstack { public static void main(String[] args) throws Exception { + if (Platform.isMusl()) { + throw new SkippedException("This test does not work on musl libc."); + } + boolean withCore = Boolean.parseBoolean(args[0]); System.out.println("Starting ClhsdbPstack test: withCore==" + withCore); diff --git a/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackMixed.java b/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackMixed.java index e3808aa6706..a5750edf360 100644 --- a/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackMixed.java +++ b/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackMixed.java @@ -33,6 +33,8 @@ import jdk.test.lib.Utils; import jdk.test.lib.apps.LingeredApp; import jdk.test.lib.process.OutputAnalyzer; +import jtreg.SkippedException; + /** * @test * @key randomness @@ -174,6 +176,10 @@ public class TestJhsdbJstackMixed { } public static void main(String... args) throws Exception { + if (Platform.isMusl()) { + throw new SkippedException("This test does not work on musl libc."); + } + SATestUtils.skipIfCannotAttach(); // throws SkippedException if attach not expected to work. LingeredApp app = null; diff --git a/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackMixedWithXComp.java b/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackMixedWithXComp.java index a3880bc9f0e..70a9e67e406 100644 --- a/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackMixedWithXComp.java +++ b/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackMixedWithXComp.java @@ -1,6 +1,6 @@ /* * Copyright (c) 2025, 2026, Oracle and/or its affiliates. All rights reserved. - * Copyright (c) 2025, NTT DATA + * Copyright (c) 2025, 2026, NTT DATA * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -27,11 +27,14 @@ import java.util.Arrays; import java.util.List; import jdk.test.lib.JDKToolLauncher; +import jdk.test.lib.Platform; import jdk.test.lib.SA.SATestUtils; import jdk.test.lib.Utils; import jdk.test.lib.apps.LingeredApp; import jdk.test.lib.process.OutputAnalyzer; +import jtreg.SkippedException; + /** * @test id=xcomp * @bug 8370176 @@ -111,6 +114,10 @@ public class TestJhsdbJstackMixedWithXComp { } public static void main(String... args) throws Exception { + if (Platform.isMusl()) { + throw new SkippedException("This test does not work on musl libc."); + } + SATestUtils.skipIfCannotAttach(); // throws SkippedException if attach not expected to work. LingeredApp app = null; diff --git a/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackPrintVMLocks.java b/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackPrintVMLocks.java index f6580d71e05..e0774917f80 100644 --- a/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackPrintVMLocks.java +++ b/test/hotspot/jtreg/serviceability/sa/TestJhsdbJstackPrintVMLocks.java @@ -22,6 +22,7 @@ */ import jdk.test.lib.JDKToolLauncher; +import jdk.test.lib.Platform; import jdk.test.lib.SA.SATestUtils; import jdk.test.lib.apps.LingeredApp; import jdk.test.lib.process.OutputAnalyzer; @@ -43,6 +44,10 @@ public class TestJhsdbJstackPrintVMLocks { final static int MAX_ATTEMPTS = 5; public static void main(String[] args) throws Exception { + if (Platform.isMusl()) { + throw new SkippedException("This test does not work on musl libc."); + } + SATestUtils.skipIfCannotAttach(); // throws SkippedException if attach not expected to work. LingeredApp theApp = null;