diff --git a/test/lib/jdk/test/lib/NetworkConfiguration.java b/test/lib/jdk/test/lib/NetworkConfiguration.java index 8ea10ede6a4..3532bb1a3ee 100644 --- a/test/lib/jdk/test/lib/NetworkConfiguration.java +++ b/test/lib/jdk/test/lib/NetworkConfiguration.java @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017, 2023, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2017, 2024, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it @@ -127,8 +127,8 @@ public class NetworkConfiguration { public static boolean isTestable(NetworkInterface nif) { if (Platform.isOSX()) { - if (nif.getName().contains("awdl")) { - return false; // exclude awdl + if (nif.getName().contains("awdl") || nif.getName().contains("docker")) { + return false; // exclude awdl or docker } // filter out interfaces that only have link-local IPv6 addresses // on macOS interfaces like 'en6' fall in this category and @@ -145,6 +145,13 @@ public class NetworkConfiguration { return false; } } + + if (Platform.isLinux()) { + String dName = nif.getDisplayName(); + if (dName != null && dName.contains("docker")) { + return false; + } + } return true; }