Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

8274750: java/io/File/ failed: '/dev': 191488 != 190976 #129

wants to merge 1 commit into from
Changes from all commits
File filter

Filter by extension

Filter by extension

Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
@@ -51,6 +51,7 @@
import static java.lang.System.err;
import static java.lang.System.out;

public class GetXSpace {

private static SecurityManager [] sma = { null, new Allow(), new DenyFSA(),
@@ -213,8 +214,9 @@ private static void compare(Space s) {
out.format(fmt, "df",, 0,;
out.format(fmt, "getX", ts, fs, us);

// if the file system can dynamically change size, this check will fail
if (ts != {
// If the file system can dynamically change size, this check will fail.
// This can happen on macOS for the /dev files system.
if (ts != && (!Platform.isOSX() || !"/dev"))) {
long blockSize = 1;
long numBlocks = 0;
try {
@@ -231,7 +233,6 @@ private static void compare(Space s) {
throw new RuntimeException(e);

// On macOS, the number of 1024 byte blocks might be incorrectly
// calculated by 'df' using integer division by 2 of the number of
// 512 byte blocks, resulting in a size smaller than the actual