Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/bouyer-quota2]: src/tests/fs/ffs Extract code to shut down the rump serv...



details:   https://anonhg.NetBSD.org/src/rev/ee236102549e
branches:  bouyer-quota2
changeset: 761103:ee236102549e
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Mon Jan 31 22:04:26 2011 +0000

description:
Extract code to shut down the rump server and check the filesystem image
to a function.

diffstat:

 tests/fs/ffs/quotas_common.sh |  11 ++++++++++-
 tests/fs/ffs/t_getquota.sh    |   8 ++------
 tests/fs/ffs/t_setquota.sh    |  20 ++++----------------
 3 files changed, 16 insertions(+), 23 deletions(-)

diffs (91 lines):

diff -r a1b3cf63b7da -r ee236102549e tests/fs/ffs/quotas_common.sh
--- a/tests/fs/ffs/quotas_common.sh     Mon Jan 31 21:14:05 2011 +0000
+++ b/tests/fs/ffs/quotas_common.sh     Mon Jan 31 22:04:26 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: quotas_common.sh,v 1.1.2.3 2011/01/30 13:23:26 bouyer Exp $ 
+# $NetBSD: quotas_common.sh,v 1.1.2.4 2011/01/31 22:04:26 bouyer Exp $ 
 
 create_with_quotas()
 {
@@ -17,6 +17,15 @@
                ${IMG} ${RUMP_SERVER}
 }
 
+rump_shutdown()
+{
+       atf_check -s exit:0 rump.halt
+# check that the quota inode creation didn't corrupt the filesystem
+       atf_check -s exit:0 -o "match:already clean" \
+               -o "match:Phase 6 - Check Quotas" \
+               fsck_ffs -nf -F ${IMG}
+}
+
 # from tests/ipf/h_common.sh via tests/sbin/resize_ffs
 test_case()
 {
diff -r a1b3cf63b7da -r ee236102549e tests/fs/ffs/t_getquota.sh
--- a/tests/fs/ffs/t_getquota.sh        Mon Jan 31 21:14:05 2011 +0000
+++ b/tests/fs/ffs/t_getquota.sh        Mon Jan 31 22:04:26 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_getquota.sh,v 1.1.2.4 2011/01/30 19:49:48 bouyer Exp $ 
+# $NetBSD: t_getquota.sh,v 1.1.2.5 2011/01/31 22:04:26 bouyer Exp $ 
 #
 #  Copyright (c) 2011 Manuel Bouyer
 #  All rights reserved.
@@ -82,9 +82,5 @@
 -o "not-match:--        0        -        -                1       -       -" \
                    $(atf_get_srcdir)/rump_repquota -${q} /mnt
        done
-       atf_check -s exit:0 rump.halt
-# check that the quota inode creation didn't corrupt the filesystem
-       atf_check -s exit:0 -o "match:already clean" \
-               -o "match:Phase 6 - Check Quotas" \
-               fsck_ffs -nf -F ${IMG}
+       rump_shutdown
 }
diff -r a1b3cf63b7da -r ee236102549e tests/fs/ffs/t_setquota.sh
--- a/tests/fs/ffs/t_setquota.sh        Mon Jan 31 21:14:05 2011 +0000
+++ b/tests/fs/ffs/t_setquota.sh        Mon Jan 31 22:04:26 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_setquota.sh,v 1.1.2.4 2011/01/30 23:04:52 bouyer Exp $ 
+# $NetBSD: t_setquota.sh,v 1.1.2.5 2011/01/31 22:04:26 bouyer Exp $ 
 #
 #  Copyright (c) 2011 Manuel Bouyer
 #  All rights reserved.
@@ -97,11 +97,7 @@
 -o "not-match:--        0        -        -" \
                    $(atf_get_srcdir)/rump_repquota -${q} /mnt
        done
-       atf_check -s exit:0 rump.halt
-# check that the quota inode creation didn't corrupt the filesystem
-       atf_check -s exit:0 -o "match:already clean" \
-               -o "match:Phase 6 - Check Quotas" \
-               fsck_ffs -nf -F ${IMG}
+       rump_shutdown
 }
 
 set_quota_new()
@@ -151,11 +147,7 @@
                    -o "match:Disk quotas for .*: none$" \
                    $(atf_get_srcdir)/rump_quota -${q} -v ${id}
        done
-       atf_check -s exit:0 rump.halt
-# check that the quota inode creation didn't corrupt the filesystem
-       atf_check -s exit:0 -o "match:already clean" \
-               -o "match:Phase 6 - Check Quotas" \
-               fsck_ffs -nf -F ${IMG}
+       rump_shutdown
 }
 
 set_quota_default()
@@ -205,9 +197,5 @@
                    -o "match:Default (user|group) disk quotas: none$" \
                    $(atf_get_srcdir)/rump_quota -${q} -v ${id}
        done
-       atf_check -s exit:0 rump.halt
-# check that the quota inode creation didn't corrupt the filesystem
-       atf_check -s exit:0 -o "match:already clean" \
-               -o "match:Phase 6 - Check Quotas" \
-               fsck_ffs -nf -F ${IMG}
+       rump_shutdown
 }



Home | Main Index | Thread Index | Old Index