~ubuntu-branches/ubuntu/trusty/plainbox-provider-checkbox/trusty

« back to all changes in this revision

Viewing changes to provider_bin/led_hdd_test

  • Committer: Package Import Robot
  • Author(s): Sylvain Pineau
  • Date: 2014-01-22 00:58:42 UTC
  • Revision ID: package-import@ubuntu.com-20140122005842-20pcic4y0ys439ry
Tags: upstream-0.3
ImportĀ upstreamĀ versionĀ 0.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
TIMEOUT=3
 
4
TEMPFILE=`mktemp`
 
5
 
 
6
trap "rm $TEMPFILE" EXIT
 
7
 
 
8
for i in $(seq $TIMEOUT); do
 
9
    #launch background writer
 
10
    dd if=/dev/urandom of=$TEMPFILE bs=1024 oflag=direct &
 
11
    WRITE_PID=$!
 
12
    echo "Writing..."
 
13
    sleep 1
 
14
    kill $WRITE_PID
 
15
    sync
 
16
    echo "Reading..."
 
17
    dd if=$TEMPFILE of=/dev/null bs=1024 iflag=direct
 
18
done
 
19
 
 
20
echo "OK, now exiting"