Contents of /tags/mkinitrd-6_2_1/busybox/testsuite/mount.tests
Parent Directory | Revision Log
Revision 999 -
(show annotations)
(download)
Sun May 30 12:16:23 2010 UTC (14 years, 4 months ago) by niro
File size: 998 byte(s)
Sun May 30 12:16:23 2010 UTC (14 years, 4 months ago) by niro
File size: 998 byte(s)
tagged 'mkinitrd-6_2_1'
1 | #!/bin/sh |
2 | # Copyright 2007 by Denys Vlasenko <vda.linux@googlemail.com> |
3 | # Licensed under GPL v2, see file LICENSE for details. |
4 | |
5 | . ./testing.sh |
6 | |
7 | test "`id -u`" = 0 || { |
8 | echo "SKIPPED: must be root to test this" |
9 | exit 0 |
10 | } |
11 | |
12 | testdir=$PWD/testdir |
13 | |
14 | 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" |
21 | # file input will be file called "input" |
22 | # test can create a file "actual" instead of writing to stdout |
23 | |
24 | testing "mount -o remount,mand" \ |
25 | "mount -o loop mount.image1m $testdir "\ |
26 | "&& grep -Fc $testdir </proc/mounts "\ |
27 | "&& mount -o remount,mand $testdir "\ |
28 | "&& grep -F $testdir </proc/mounts | grep -c '[, ]mand[, ]'" \ |
29 | "1\n""1\n" \ |
30 | "" "" |
31 | |
32 | umount -d "$testdir" |
33 | rmdir "$testdir" |
34 | rm mount.image1m |
35 | |
36 | exit $FAILCOUNT |