qa: update snaptests, add snaptest-multi-capsnaps.sh

This commit is contained in:
Sage Weil 2010-09-17 08:09:19 -07:00
parent d669ba26a5
commit 2e5731b6db
4 changed files with 47 additions and 3 deletions

View File

@ -13,3 +13,5 @@ rmdir a/.snap/foo
rmdir a
stat .snap/bar/a
rmdir .snap/bar
echo OK

View File

@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/sh -x
mkdir .snap/foo
@ -7,6 +7,7 @@ for f in `seq 1 100`
do
stat .snap/foo/$f 2>&1 | grep 'No such file'
done
echo "Pass!"
rmdir .snap/foo
rmdir .snap/foo
echo "OK"

View File

@ -0,0 +1,40 @@
#!/bin/sh -x
set -e
echo asdf > a
mkdir .snap/1
chmod 777 a
mkdir .snap/2
echo qwer > a
mkdir .snap/3
chmod 666 a
mkdir .snap/4
echo zxcv > a
mkdir .snap/5
ls -al .snap/?/a
grep asdf .snap/1/a
stat .snap/1/a | grep 'Size: 5'
grep asdf .snap/2/a
stat .snap/2/a | grep 'Size: 5'
stat .snap/2/a | grep -- '-rwxrwxrwx'
grep qwer .snap/3/a
stat .snap/3/a | grep 'Size: 5'
stat .snap/3/a | grep -- '-rwxrwxrwx'
grep qwer .snap/4/a
stat .snap/4/a | grep 'Size: 5'
stat .snap/4/a | grep -- '-rw-rw-rw-'
grep zxcv .snap/5/a
stat .snap/5/a | grep 'Size: 5'
stat .snap/5/a | grep -- '-rw-rw-rw-'
echo "OK"

View File

@ -25,3 +25,4 @@ rmdir a/.snap/a1
rmdir a/.snap/a2
rm -r a
echo "OK"