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

Fix statvfs filesystem - it is unstable in docker environments #1188

Merged

Conversation

matthiasblaesing
Copy link
Member

Instead of iterating mountpoints only query the information of the root directory and use NIO to query the java comparison data.

@matthiasblaesing
Copy link
Member Author

@dbwiddis could you have a look at this? On the google mailinglist was reported, that the unittest for LibC#statvfs fails in a docker environment.

The issue is, that in a docker environment the mounts of the host system are reported, but the device files are not in place. So instead of checking random directories the change just checks the root file system. For that filesystem information must be present. Combined with java NIO we can verify the values. What do you think?

@dbwiddis
Copy link
Contributor

No argument switching to NIO but shouldn't we be checking the subdirectories of /dev? If you only look at the root directory I don't think you're actually testing any filesystems.

@dbwiddis
Copy link
Contributor

Actually, I think this is good. Looking at the docs we just need "any file within the mounted filesystem" so in this case we are assuming / is always mounted and just testing that one device.

@matthiasblaesing
Copy link
Member Author

@dbwiddis thanks for checking. Yes the quoted description was my reasoning and I would be a bit irritated if you could run java programms without having a filesystem mounted (yes I can imaging a unikernel, but then you are far away from unittest land).

@matthiasblaesing matthiasblaesing merged commit 1fb0738 into java-native-access:master May 11, 2020
@matthiasblaesing matthiasblaesing deleted the unittest-docker branch May 11, 2020 20:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants