Fix some bugs when testing opensds ansible
[stor4nfv.git] / src / ceph / qa / workunits / direct_io / misc.sh
1 #!/bin/sh -ex
2
3 # a few test cases from henry
4 echo "test read from hole"
5 dd if=/dev/zero of=dd3 bs=1 seek=1048576 count=0
6 dd if=dd3 of=/tmp/ddout1 skip=8 bs=512 count=2 iflag=direct
7 dd if=/dev/zero of=/tmp/dd3 bs=512 count=2
8 cmp /tmp/dd3 /tmp/ddout1
9
10 echo "other thing"
11 dd if=/dev/urandom of=/tmp/dd10 bs=500 count=1
12 dd if=/tmp/dd10 of=dd10 bs=512 seek=8388 count=1
13 dd if=dd10 of=/tmp/dd10out bs=512 skip=8388 count=1 iflag=direct
14 cmp /tmp/dd10 /tmp/dd10out
15
16 echo OK