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

Testing suggestion #17

Open
lurch opened this issue Mar 21, 2017 · 8 comments
Open

Testing suggestion #17

lurch opened this issue Mar 21, 2017 · 8 comments

Comments

@lurch
Copy link
Contributor

lurch commented Mar 21, 2017

Maybe some of the issues we've run into with drivelist, are also things that should be actively tested with mountutils?

@jviotti
Copy link
Contributor

jviotti commented Mar 21, 2017

I agree. Lets compile a list of things to test here, and we can the move it to a markdown documentation in the repo, as a manual testing guide:

Drive mount points

  • Drives whose mount points contain spaces
  • Drives whose mount points contain quotes (single and double)
  • Drives whose mount points contain symbols such as #, and &
  • Unmount a drive with multiple mount points

Drive types

  • Unmount an SD Card using an internal reader
  • Unmount an SD Card using an external reader
  • Unmount a removable USB drive
  • Unmount a USB HDD

Edge cases

  • Unmount an empty internal reader device on Windows
  • Unmount a drive that doesn't exist
  • Unmount a drive without the necessary permissions
  • Unmount an already unmounted drive
  • Unmount a drive which has open handles on it
  • Unmount a drive by running mountutils from inside the same drive

@lurch
Copy link
Contributor Author

lurch commented Mar 22, 2017

@jviotti Do you remember what the issue you had was, where you were getting different behaviour when the SD-reader was plugged in via a USB3 hub, than when it was plugged in directly?

Any manual testing guide should also include the things you've already been testing this module against, e.g. unmounting non-existent drives / devices, unmounting already-unmounted devices, unmounting drives with multiple-mounted partitions, etc. etc.
There's (probably) going to be so many edge cases, that IMHO the more different things we can add to a list of manual tests, the better. When you're not running through a checklist, it's easy to remember to test one thing on one OS, but then forget to test that same thing on a different OS.

I wonder if we could do any (basic) automated Linux testing by maybe scripting Qemu?

@jviotti
Copy link
Contributor

jviotti commented Mar 22, 2017

@jviotti Do you remember what the issue you had was, where you were getting different behaviour when the SD-reader was plugged in via a USB3 hub, than when it was plugged in directly?

I'm afraid I don't :( Do you remember if this was mentioned in a GH issue, or in the Gitter channel?

Any manual testing guide should also include the things you've already been testing this module against, e.g. unmounting non-existent drives / devices, unmounting already-unmounted devices, unmounting drives with multiple-mounted partitions, etc. etc.
There's (probably) going to be so many edge cases, that IMHO the more different things we can add to a list of manual tests, the better. When you're not running through a checklist, it's easy to remember to test one thing on one OS, but then forget to test that same thing on a different OS.

I agree, let me update the list above with what I've been testing so far.

I wonder if we could do any (basic) automated Linux testing by maybe scripting Qemu?

Sounds interesting. What would we automatically mount in the VM though? Can we somehow fake a drive?

@lurch
Copy link
Contributor Author

lurch commented Mar 22, 2017

I'm afraid I don't :( Do you remember if this was mentioned in a GH issue, or in the Gitter channel?

Don't remember. I tried searching both of those and can't find anything relevant :(

I wonder if we could do any (basic) automated Linux testing by maybe scripting Qemu?

Sounds interesting. What would we automatically mount in the VM though? Can we somehow fake a drive?

Yup, in theory Qemu should allow you to fake anything ;-) A quick search finds https://wiki.ubuntu.com/QemuDiskHotplug

@lurch
Copy link
Contributor Author

lurch commented Mar 22, 2017

Should we also test unmounting drives which have open file-handles? I guess it should report "drive is busy" or something on all OSes?

@jviotti
Copy link
Contributor

jviotti commented Mar 22, 2017

Yup, in theory Qemu should allow you to fake anything ;-) A quick search finds https://wiki.ubuntu.com/QemuDiskHotplug

Sounds exciting. I'm happy to experiment with it.

Should we also test unmounting drives which have open file-handles? I guess it should report "drive is busy" or something on all OSes?

Good catch. In fact, all OSes will try to close the open handles before unmounting, and only fail if they can't do so.

@lurch
Copy link
Contributor Author

lurch commented Mar 22, 2017

I guess an easy way to test the un-closable handles behaviour would be to try running mountutils from the drive we're actually trying to unmount! ;-)

@jviotti
Copy link
Contributor

jviotti commented Mar 22, 2017

How evil! :) I'll add that to the list as well.

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

No branches or pull requests

2 participants