Merge ~sylvain-pineau/plainbox-provider-checkbox:fix-disk-read-perf-test-nvme into plainbox-provider-checkbox:master

Proposed by Sylvain Pineau
Status: Merged
Approved by: Sylvain Pineau
Approved revision: d62a476e5b4e6b94ba247e8fb8f4fea22dabf82b
Merged at revision: 26cc8a96b718ffde13d57965279f6869a3adf710
Proposed branch: ~sylvain-pineau/plainbox-provider-checkbox:fix-disk-read-perf-test-nvme
Merge into: plainbox-provider-checkbox:master
Diff against target: 34 lines (+8/-1)
1 file modified
bin/disk_read_performance_test (+8/-1)
Reviewer Review Type Date Requested Status
Sylvain Pineau (community) Approve
Review via email: mp+373797@code.launchpad.net

Description of the change

Spotted while working on https://bugs.launchpad.net/plainbox-provider-checkbox/+bug/1819436, the disk_read_performance_test was not supporting nvme drives.

To post a comment you must log in.
Revision history for this message
Sylvain Pineau (sylvain-pineau) wrote :

self-approved

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/bin/disk_read_performance_test b/bin/disk_read_performance_test
index 00810a5..1cdea0d 100755
--- a/bin/disk_read_performance_test
+++ b/bin/disk_read_performance_test
@@ -13,6 +13,12 @@ for disk in $@; do
1313
14 disk_type=`udevadm info --name /dev/$disk --query property | grep "ID_BUS" | awk '{gsub(/ID_BUS=/," ")}{printf $1}'`14 disk_type=`udevadm info --name /dev/$disk --query property | grep "ID_BUS" | awk '{gsub(/ID_BUS=/," ")}{printf $1}'`
15 dev_path=`udevadm info --name /dev/$disk --query property | grep "DEVPATH" | awk '{gsub(/DEVPATH=/," ")}{printf $1}'`15 dev_path=`udevadm info --name /dev/$disk --query property | grep "DEVPATH" | awk '{gsub(/DEVPATH=/," ")}{printf $1}'`
16 if [[ $dev_path =~ nvme ]]; then
17 disk_type="nvme"
18 fi
19 if [ -z "$disk_type" ]; then
20 exit 1
21 fi
16 echo "INFO: $disk type is $disk_type"22 echo "INFO: $disk type is $disk_type"
1723
18 case $disk_type in24 case $disk_type in
@@ -30,6 +36,7 @@ for disk in $@; do
30 fi36 fi
31 ;;37 ;;
32 "ide" ) MIN_BUF_READ=40;;38 "ide" ) MIN_BUF_READ=40;;
39 "nvme" ) MIN_BUF_READ=1000;;
33 * ) MIN_BUF_READ=$DEFAULT_BUF_READ;;40 * ) MIN_BUF_READ=$DEFAULT_BUF_READ;;
34 esac41 esac
35 echo "INFO: $disk_type: Using $MIN_BUF_READ MB/sec as the minimum throughput speed"42 echo "INFO: $disk_type: Using $MIN_BUF_READ MB/sec as the minimum throughput speed"
@@ -45,7 +52,7 @@ for disk in $@; do
4552
46 if [ -z "$speed" ]; then53 if [ -z "$speed" ]; then
47 echo "WARNING: Device $disk is too small! Aborting test."54 echo "WARNING: Device $disk is too small! Aborting test."
48 exit 055 exit 1
49 fi56 fi
5057
51 speed=${speed/.*}58 speed=${speed/.*}

Subscribers

People subscribed via source and target branches