Merge ~pieq/plainbox-provider-checkbox:1660386-mount-drive-before-storage-tests into plainbox-provider-checkbox:master
Status: | Merged |
---|---|
Approved by: | Jeff Lane |
Approved revision: | 0564789ff10112d2d8c995a0af0da62ff186b94f |
Merged at revision: | 6d190232a1ad63b0065d2de0483547d0675d2d45 |
Proposed branch: | ~pieq/plainbox-provider-checkbox:1660386-mount-drive-before-storage-tests |
Merge into: | plainbox-provider-checkbox:master |
Diff against target: |
56 lines (+39/-1) 1 file modified
bin/storage_test (+39/-1) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Jeff Lane | Approve | ||
Pierre Equoy | Needs Resubmitting | ||
Review via email: mp+317286@code.launchpad.net |
Description of the change
Automatically mount drives when running storage tests
When running disk/storage_
To test this, run checkbox-cli with a test plan containing the appropriate jobs (
disk/storage_
Sample output:
---------------[ Disk I/O stress test for HGST HTS541010A7E630 ]----------------
ID: 2013.com.
Category: 2013.com.
... 8< -------
/dev/sda is a block device
/dev/sda reports a size of 1000GB.
/dev/sda is not mounted. It must be mounted before testing.
Mounting /dev/sda into /tmp/drive/sda...
Running bonnie++ on /dev/sda...
Putting scratch disk at /tmp/drive/sda
Disk /dev/sda has 890992MB available
System has 15914MB RAM
We need 31828MB of disk space for testing
Free disk space is sufficient to continue testing.
Using uid:0, gid:0.
Writing a byte at a time...done
Writing intelligently.
Rewriting...done
Reading a byte at a time...done
Reading intelligently.
start 'em...done.
Create files in sequential order...done.
Stat files in sequential order...done.
Delete files in sequential order...done.
Create files in random order...done.
Stat files in random order...done.
Delete files in random order...done.
Version 1.97 ------Sequential Output------ --Sequential Input- --Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
u-Unidentifi 31824M 1309 96 108464 5 54533 5 4850 90 140292 7 251.4 4
Latency 51116us 1556ms 7425ms 24574us 51127us 690ms
Version 1.97 ------Sequential Create------ --------Random Create--------
u-Unidentified-Syst -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++ +++++ +++
Latency 343us 559us 591us 249us 71us 779us
1.97,1.
-------
Outcome: job passed
So just for comparison, this is what happens when you run this against a disk with no partition table: wildorange: ~$ sudo ./storage_test sdc
ubuntu@
/dev/sdc is a block device
Error: /dev/sdc: unrecognised disk label
Error: /dev/sdb: unrecognised disk label
Error: /dev/sdc: unrecognised disk label
Error: /dev/sdd: unrecognised disk label
/dev/sdc reports a size of 147GB.
/dev/sdc is not mounted. It must be mounted before testing.
Error: /dev/sdc: unrecognised disk label
/dev/sdc has no partition table. Test on this drive cannot proceed.
There's a lot of stderr there that makes reading the output confusing...