utsaslab / crashmonkey

CrashMonkey: tools for testing file-system reliability (OSDI 18)
Apache License 2.0
193 stars 31 forks source link

My code for Issue #9--Sets environment variables for mount directory/filesystem size and passes those variables to tests. #61

Closed SonikaG closed 6 years ago

SonikaG commented 7 years ago

Please let me know if any of the assumptions I've made in the code are incorrect. I am currently using popen and pclose, which pipes the output of the "df" command into a file and then reads it, to get the file system size. Let me know if there's a better way to handle that. Additionally, currently, the mount directory is just hardcoded to /mnt/snapshot. If I need to change this so that the user can pass it in instead, let me know. Also, to check that I am actually able to access the variables once they are set, I replaced the constant TEST_MNT with mntdir and ran a test (rename_root_to_sub). The test ran the same way as before. Hopefully this takes care of issue #9 . Let me know if I missed anything.

Thank you :)

vijay03 commented 7 years ago

@SonikaG, could you change the PR name to be more descriptive about what it does?

vijay03 commented 6 years ago

@SonikaG could we get the changes in and get this merged soon please?

SonikaG commented 6 years ago

Yup! I having a little bit of trouble with using fdisk but I should have the changes in shortly.

SonikaG commented 6 years ago

Sorry for the delay, I've got the changes. Two things to note:

  1. calls to fdisk sometimes returns a "doesn't contain a valid partition table" error. This will always print to the screen.
  2. The way that I get the size of the testdev is a hacky--I'm doing some weird tokenizing and assume that fdisk will always format its results in the same way. Let me know if there's a better way of doing this.

Thank you so much :)

SonikaG commented 6 years ago

All fixed up, let me know if I missed anything!