Skip to content

Commit

Permalink
8274750: Change location of check that file system is not /dev on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
bplb committed Oct 28, 2021
1 parent 80729c5 commit c48f313
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions test/jdk/java/io/File/GetXSpace.java
Expand Up @@ -203,13 +203,6 @@ private static void tryCatch(Space s) {
}

private static void compare(Space s) {
// On macOS the total size of /dev can vary over time
// so this test is skipped for /dev
if (Platform.isOSX() && s.name().equals("/dev")) {
out.println("/dev:\n Skipping size comparison for /dev on macOS");
return;
}

File f = new File(s.name());
long ts = f.getTotalSpace();
long fs = f.getFreeSpace();
Expand All @@ -220,8 +213,9 @@ private static void compare(Space s) {
out.format(fmt, "df", s.total(), 0, s.free());
out.format(fmt, "getX", ts, fs, us);

// if the file system can dynamically change size, this check will fail
if (ts != s.total()) {
// If the file system can dynamically change size, this check will fail.
// This can happen on macOS for the /dev files system.
if (ts != s.total() && (!Platform.isOSX() || !s.name().equals("/dev"))) {
long blockSize = 1;
long numBlocks = 0;
try {
Expand Down

0 comments on commit c48f313

Please sign in to comment.