summaryrefslogtreecommitdiffstats
path: root/dung-3.4.25-m2/common/unbind-bind-write.sh
diff options
context:
space:
mode:
Diffstat (limited to 'dung-3.4.25-m2/common/unbind-bind-write.sh')
-rwxr-xr-xdung-3.4.25-m2/common/unbind-bind-write.sh27
1 files changed, 27 insertions, 0 deletions
diff --git a/dung-3.4.25-m2/common/unbind-bind-write.sh b/dung-3.4.25-m2/common/unbind-bind-write.sh
new file mode 100755
index 0000000..a858aa3
--- /dev/null
+++ b/dung-3.4.25-m2/common/unbind-bind-write.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+# unbind-bind-write.sh
+#
+# Simple test of unbinding and re-binding a device followed
+# by writing to an associated block device
+#
+# Copyright (C) 2013 Horms Soltutions Ltd.
+#
+# Contact: Simon Horman <horms@verge.net.au>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+
+set -e
+#set -x
+
+if [ $# -ne 3 ]; then
+ echo "usage: $(basename $0) DRIVER DEVICE_NAME BLOCK_DEVICE" >& 2
+ exit 1
+fi
+
+$(dirname $0)/../common/unbind-bind.sh "$@"
+
+echo "Perform write test"
+exec $(dirname $0)/../common/write-dd.sh "$3" 1M 10
+