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

figure out how to test ismount function #11454

Closed
StefanKarpinski opened this issue May 27, 2015 · 9 comments
Closed

figure out how to test ismount function #11454

StefanKarpinski opened this issue May 27, 2015 · 9 comments
Labels
good first issue Indicates a good issue for first-time contributors to Julia Hacktoberfest Good for Hacktoberfest participants help wanted Indicates that a maintainer wants help on an issue or pull request test This change adds or pertains to unit tests

Comments

@StefanKarpinski
Copy link
Member

See #11279. It's unclear how to reasonably test this, especially cross-platform.

@StefanKarpinski StefanKarpinski added help wanted Indicates that a maintainer wants help on an issue or pull request good first issue Indicates a good issue for first-time contributors to Julia test This change adds or pertains to unit tests labels May 27, 2015
@garrison
Copy link
Member

Of possible interest: test_macpath.py, test_ntpath.py, and test_posixpath.py

@lobingera
Copy link

@StefanKarpinski: Do you mean, how to create a known mounted filesystem? I have not tested this, but it should be possible to put a gzipped iso filesystem into a few hundered bytes. And many linux systems have -ro, user options for /media/cd or similar.
At least the test could be build isaw that automatic regression testing is completing (for UNIX-oid systems).

@nbaum
Copy link
Contributor

nbaum commented May 31, 2015

Does it help that / will always be a mount point? (On filesystems which have a /, at least.)

Edit: No. I see that ismount has a special case for /, so that only checks one path through the function.

@simonster
Copy link
Member

On Linux I'm not sure we can do better than finding a mounted file system (if there is one) and testing against that, since it may not be possible to mount anything new without root access. On OS X we could create a disk image. No idea about Windows.

@malmaud
Copy link
Contributor

malmaud commented Jun 26, 2015

@nbaum / will indeed always be a mountpoint and ismount will return true on it.

@yuyichao
Copy link
Contributor

FWIW

  1. The root directory is a special case and you are not really testing all the cases.
  2. The logic is actually wrong in some cases since / might not be a mount point in a chroot environment.

Not sure how much does any of these matters....

@yuyichao
Copy link
Contributor

And it turns out that ismount also doesn't handle bind mount... The device can be the same for a bind mount...

Edit: and having the same divice across mount point is probably not specific to bind mount since you can mount a device multiple times.... (Haven't tested though)

@yuyichao
Copy link
Contributor

P.S. Git is probably using a similar logic..

@yuyichao
Copy link
Contributor

yuyichao commented Jul 6, 2015

since it may not be possible to mount anything new without root access

I think fuse doesn't need root access. (But it does require external tools...)

@StefanKarpinski StefanKarpinski added this to the 0.5.x milestone Aug 24, 2016
@kshyatt kshyatt added the Hacktoberfest Good for Hacktoberfest participants label Oct 5, 2016
@StefanKarpinski StefanKarpinski added help wanted Indicates that a maintainer wants help on an issue or pull request and removed help wanted Indicates that a maintainer wants help on an issue or pull request labels Oct 27, 2016
@JeffBezanson JeffBezanson removed this from the 0.5.x milestone May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Indicates a good issue for first-time contributors to Julia Hacktoberfest Good for Hacktoberfest participants help wanted Indicates that a maintainer wants help on an issue or pull request test This change adds or pertains to unit tests
Projects
None yet
Development

No branches or pull requests

9 participants