summaryrefslogtreecommitdiffstats
path: root/src/ceph/qa/workunits/direct_io/misc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'src/ceph/qa/workunits/direct_io/misc.sh')
-rwxr-xr-xsrc/ceph/qa/workunits/direct_io/misc.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ceph/qa/workunits/direct_io/misc.sh b/src/ceph/qa/workunits/direct_io/misc.sh
new file mode 100755
index 0000000..6de080d
--- /dev/null
+++ b/src/ceph/qa/workunits/direct_io/misc.sh
@@ -0,0 +1,16 @@
+#!/bin/sh -ex
+
+# a few test cases from henry
+echo "test read from hole"
+dd if=/dev/zero of=dd3 bs=1 seek=1048576 count=0
+dd if=dd3 of=/tmp/ddout1 skip=8 bs=512 count=2 iflag=direct
+dd if=/dev/zero of=/tmp/dd3 bs=512 count=2
+cmp /tmp/dd3 /tmp/ddout1
+
+echo "other thing"
+dd if=/dev/urandom of=/tmp/dd10 bs=500 count=1
+dd if=/tmp/dd10 of=dd10 bs=512 seek=8388 count=1
+dd if=dd10 of=/tmp/dd10out bs=512 skip=8388 count=1 iflag=direct
+cmp /tmp/dd10 /tmp/dd10out
+
+echo OK