summaryrefslogtreecommitdiffstats
path: root/tools/test-virt-df.sh
Commit message (Collapse)AuthorAgeFilesLines
* Generate a dummy 'Fedora' fedora.img in images directory for use by tests.Richard W.M. Jones2010-11-181-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. (cherry picked from commit 4d900cdac8258daa2e99c6ceb2a4985154e94150)
* 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