From 53d20581d8e5687cf3df842a70d233e76ac01dcb Mon Sep 17 00:00:00 2001 From: Project516 <138796702+Project516@users.noreply.github.com> Date: Mon, 23 Nov 2026 08:29:34 -0600 Subject: [PATCH] test: check that FileStores gets an aligned slice instead of its size, which depends on where malloc puts the buffer --- test/java/FileStores.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/java/FileStores.java b/test/java/FileStores.java index e714654..af5a514 100644 --- a/test/java/FileStores.java +++ b/test/java/FileStores.java @@ -15,6 +15,6 @@ public static void main(String[] args) throws Exception { System.out.println("usable within total " + (store.getUsableSpace() <= store.getTotalSpace())); System.out.println("missing file " + new File(tmp.toFile(), "no-such-file").getTotalSpace()); ByteBuffer buf = ByteBuffer.allocateDirect((int) block * 2).alignedSlice((int) block); - System.out.println("aligned capacity " + buf.capacity()); + System.out.println("aligned slice " + (buf.alignmentOffset(0, (int) block) == 0 && buf.capacity() >= block && buf.capacity() % block == 0)); } }