summaryrefslogtreecommitdiffstats
path: root/tools/test-virt-df.sh
Commit message (Collapse)AuthorAgeFilesLines
* df: Rewrite virt-df in C.Richard W.M. Jones2010-11-251-72/+0
| | | | | | | | | | | | I have diffed the output from the original virt-df with this new version, and they agree very closely. Some differences: - Old virt-df have a divide-by-zero error in cases where the number of used inodes was 0. New virt-df fixes this. - New virt-df uses gnulib human_readable library which displays numbers to 3 significant figures for -h output (old version used an ad hoc function).
* Generate a dummy 'Fedora' fedora.img in images directory for use by tests.Richard W.M. Jones2010-11-111-6/+6
| | | | | | | | We were generating this dummy 'Fedora' image already in the tools directory. It contains just enough Fedora-like files to fool our inspection code and thus to test the tools. This is general enough that we can use it everywhere.
* virt-df: Match output with native (coreutils) 'df' command (RHBZ#578123).Richard Jones2010-03-301-5/+31
| | | | | | | | | | | | | | | | | | | | This commit fixes the 'Use%' field in the output so it matches what coreutils' 'df' command would print. Firstly we change the calculation to use the space available to root, not the space available to non-root. This means it matches what 'df' when run as root in the guest would show. Secondly we display this rounded up to the next whole percent (ie. using ceil), which is also what 'df' does. Thirdly we change the regression test so it tests this. Note that even with these changes you are not guaranteed to get precisely the same figures from inside and outside the guest, as it depends on how quiescent the guest is and how recently the superblock was synced. Thanks: Rita Wu
* tools: Add basic tests for the virt-* tools.Richard Jones2010-03-301-0/+46