1 |
#!/bin/sh |
#!/bin/sh |
|
|
|
2 |
# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com> |
# Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com> |
3 |
# Licensed under GPL v2, see file LICENSE for details. |
# Licensed under GPL v2, see file LICENSE for details. |
4 |
|
|
5 |
. testing.sh |
. ./testing.sh |
6 |
|
|
7 |
test "`id -u`" = 0 || { |
test "`id -u`" = 0 || { |
8 |
echo "SKIPPED: must be root to test this" |
echo "SKIPPED: must be root to test this" |
9 |
exit 0 |
exit 0 |
10 |
} |
} |
11 |
|
|
|
dd if=/dev/zero of=mount.image1m count=1 bs=1M 2>/dev/null || exit 1 |
|
|
mkfs.minix -v mount.image1m >/dev/null 2>&1 || exit 1 |
|
12 |
testdir=$PWD/testdir |
testdir=$PWD/testdir |
13 |
mkdir $testdir 2>/dev/null |
|
14 |
umount -d $testdir 2>/dev/null |
dd if=/dev/zero of=mount.image1m count=1 bs=1M 2>/dev/null || { echo "dd error"; exit 1; } |
15 |
|
mkfs.minix -v mount.image1m >/dev/null 2>&1 || { echo "mkfs.minix error"; exit 1; } |
16 |
|
modprobe minix 2>/dev/null |
17 |
|
mkdir "$testdir" 2>/dev/null |
18 |
|
umount -d "$testdir" 2>/dev/null |
19 |
|
|
20 |
# testing "test name" "command" "expected result" "file input" "stdin" |
# testing "test name" "command" "expected result" "file input" "stdin" |
21 |
# file input will be file called "input" |
# file input will be file called "input" |
29 |
"1\n""1\n" \ |
"1\n""1\n" \ |
30 |
"" "" |
"" "" |
31 |
|
|
32 |
umount -d $testdir |
umount -d "$testdir" |
33 |
rmdir $testdir |
rmdir "$testdir" |
34 |
rm mount.image1m |
rm mount.image1m |
35 |
|
|
36 |
exit $FAILCOUNT |
exit $FAILCOUNT |