From aaded865788bc0d51c65637e669c4aaf4c356eaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Bl=C3=A4sing?= Date: Fri, 23 Feb 2024 20:15:51 +0100 Subject: [PATCH] X --- .../platform/test/com/sun/jna/platform/mac/IOKitTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/platform/test/com/sun/jna/platform/mac/IOKitTest.java b/contrib/platform/test/com/sun/jna/platform/mac/IOKitTest.java index 8810d452e..e2c2ead78 100644 --- a/contrib/platform/test/com/sun/jna/platform/mac/IOKitTest.java +++ b/contrib/platform/test/com/sun/jna/platform/mac/IOKitTest.java @@ -103,7 +103,8 @@ public void testMatching() { String serialNumberViaUtil = platformExpert.getStringProperty("IOPlatformSerialNumber"); assertEquals(serialNumber, serialNumberViaUtil); - assertEquals(12, serialNumber.length()); + assertTrue("Known serial number lengths are 10 and 12, was: " + serialNumber.length(), + serialNumber.length() == 12 || serialNumber.length() == 10); // Get all the keys dict = platformExpert.createCFProperties(); assertNotEquals(0, dict.getValueIfPresent(serialKey, null)); @@ -214,7 +215,7 @@ public void testIOConnect() { int masterPort = IOKitUtil.getMasterPort(); IOService smcService = IOKitUtil.getMatchingService("AppleSMC"); - assertNotNull(smcService); + assumeTrue(smcService != null); // Service is not available on github M1 runners PointerByReference connPtr = new PointerByReference(); int taskSelf = SYS.mach_task_self();