Mercurial > yaffs-ecoscentric-gpl
annotate linux-tests/mount_cycling.sh @ 410:0e17f61fb076
yaffs: Changes to test scripts
Add mount_cycling script.
Change /proc/yaffs_debug references to /proc/yaffs_stats.
Signed-off-by: Charles Manning <cdhmanning@gmail.com>
| author | Charles Manning <cdhmanning@gmail.com> |
|---|---|
| date | Thu, 22 Apr 2010 13:27:28 +1200 |
| parents | |
| children |
| rev | line source |
|---|---|
|
410
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
1 #!/bin/sh |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
2 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
3 MNTPT=/mnt |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
4 N=5000 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
5 the_file=`pwd`\/data |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
6 rm $the_file |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
7 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
8 let i=0 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
9 for j in $(seq 1 5000) |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
10 do |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
11 echo "##" |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
12 echo "##" |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
13 echo "## Mount $j of $N" |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
14 echo "##" |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
15 echo "##" |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
16 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
17 df |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
18 echo ###" |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
19 mount -t yaffs2 /dev/mtdblock0 $MNTPT |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
20 df |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
21 echo ###" |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
22 cd $MNTPT |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
23 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
24 str=$(cat /proc/yaffs_stats) |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
25 echo "$i, $str" |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
26 echo "$i, $str" >> $the_file |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
27 let i=$i+1 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
28 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
29 sleep 1 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
30 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
31 str=$(cat /proc/yaffs_stats) |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
32 echo "$i, $str" |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
33 echo "$i, $str" >> $the_file |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
34 let i=$i+1 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
35 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
36 sleep 1 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
37 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
38 ~charles/fs-tests/fsx/fsx -N 10000 aa & |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
39 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
40 rm zze |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
41 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
42 str=$(cat /proc/yaffs_stats) |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
43 echo "$i, $str" |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
44 echo "$i, $str" >> $the_file |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
45 let i=$i+1 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
46 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
47 dd if=/dev/urandom of=zza count=4000 & |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
48 dd if=/dev/urandom of=zzb count=4000 & |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
49 dd if=/dev/urandom of=zzc count=100000 & |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
50 dd if=/dev/urandom of=zzd count=4000 & |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
51 dd if=/dev/urandom of=zze count=4000 & |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
52 dd if=/dev/urandom of=zzf count=40000 & |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
53 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
54 for k in $(seq 1 10) |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
55 do |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
56 sleep 1 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
57 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
58 str=$(cat /proc/yaffs_stats) |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
59 echo "$i, $str" |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
60 echo "$i, $str" >> $the_file |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
61 let i=$i+1 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
62 done |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
63 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
64 echo "waiting..." |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
65 wait |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
66 echo "wait completed" |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
67 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
68 rm zza |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
69 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
70 str=$(cat /proc/yaffs_stats) |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
71 echo "$i, $str" |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
72 echo "$i, $str" >> $the_file |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
73 let i=$i+1 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
74 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
75 rm zzb |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
76 str=$(cat /proc/yaffs_stats) |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
77 echo "$i, $str" |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
78 echo "$i, $str" >> $the_file |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
79 let i=$i+1 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
80 rm zzc |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
81 str=$(cat /proc/yaffs_stats) |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
82 echo "$i, $str" |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
83 echo "$i, $str" >> $the_file |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
84 let i=$i+1 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
85 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
86 cd - |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
87 umount $MNTPT |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
88 |
|
0e17f61fb076
yaffs: Changes to test scripts
Charles Manning <cdhmanning@gmail.com>
parents:
diff
changeset
|
89 done |
