Merge lp:~bladernr/checkbox/1224820-fix-storage-test into lp:checkbox

Proposed by Jeff Lane 
Status: Merged
Approved by: Zygmunt Krynicki
Approved revision: 2369
Merged at revision: 2369
Proposed branch: lp:~bladernr/checkbox/1224820-fix-storage-test
Merge into: lp:checkbox
Diff against target: 34 lines (+13/-0)
2 files modified
checkbox-old/debian/changelog (+4/-0)
checkbox-old/scripts/storage_test (+9/-0)
To merge this branch: bzr merge lp:~bladernr/checkbox/1224820-fix-storage-test
Reviewer Review Type Date Requested Status
Checkbox Developers Pending
Review via email: mp+185436@code.launchpad.net

Description of the change

scripts/storage_test: fixes a bug that causes script to improperly die when run against a disk that's not mounted. Script now exits with a warning in this condition.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'checkbox-old/debian/changelog'
2--- checkbox-old/debian/changelog 2013-09-12 19:23:58 +0000
3+++ checkbox-old/debian/changelog 2013-09-13 08:53:38 +0000
4@@ -8,6 +8,10 @@
5 (LP: #1224533)
6 * Ensured that pactl commands are run on a properly unlocalized environment
7 (LP: #1201126)
8+
9+ [ Jeff Lane ]
10+ * scripts/storage_test: test now exits with a warning if the drive is not
11+ mounted prior to testing (LP: #1224820)
12
13 -- Brendan Donegan <brendan.donegan@canonical.com> Mon, 09 Sep 2013 09:30:32 +0100
14
15
16=== modified file 'checkbox-old/scripts/storage_test'
17--- checkbox-old/scripts/storage_test 2013-08-29 23:46:49 +0000
18+++ checkbox-old/scripts/storage_test 2013-09-13 08:53:38 +0000
19@@ -42,6 +42,15 @@
20 echo "$disk reports a size of $size."
21 # Have to account for the end of the size descriptor
22 size_range=${size:(-2)}
23+
24+ if mount | grep -q $disk
25+ then
26+ echo "$disk is mounted, proceeding."
27+ else
28+ echo "$disk is not mounted. It must be mounted before testing."
29+ exit 1
30+ fi
31+
32
33 if [ $size_range == "KB" ]
34 then

Subscribers

People subscribed via source and target branches