]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - tools/regression/msdosfs/msdosfstest.sh
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / tools / regression / msdosfs / msdosfstest.sh
1 #!/bin/sh
2 # $FreeBSD$
3 # A really simple script to create a swap-backed msdosfs filesystem, copy a few
4 # files to it, unmount/remount the filesystem, and make sure all is well.
5
6 # Not very advanced, but better than nothing. 
7 mkdir /tmp/msdosfstest/
8 mdconfig -a -t swap -s 128m -u 10
9 bsdlabel -w md10 auto
10 newfs_msdos -F 16 -b 8192 /dev/md10a
11 mount_msdosfs /dev/md10a /tmp/msdosfstest/
12 cp -R /usr/src/bin/ /tmp/msdosfstest/
13 umount /tmp/msdosfstest/
14 mount_msdosfs /dev/md10a /tmp/msdosfstest/
15 diff -u -r /usr/src/bin /tmp/msdosfstest/
16 if [ $? -eq 0 ]; then
17         echo "ok 1";
18 else
19         echo "not ok 1";
20 fi
21 umount /tmp/msdosfstest/
22 mdconfig -d -u 10
23 rmdir /tmp/msdosfstest/