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 Add an option to mount the filesystem -...
details: https://anonhg.NetBSD.org/src/rev/81737c8fa6c8
branches: bouyer-quota2
changeset: 761111:81737c8fa6c8
user: bouyer <bouyer%NetBSD.org@localhost>
date: Mon Feb 07 16:22:50 2011 +0000
description:
Add an option to mount the filesystem -o log to rump quota servers.
Add some quota tests on a WAPBL-enabled filesystem.
diffstat:
tests/fs/ffs/h_quota2_server.c | 10 +++++++---
tests/fs/ffs/h_quota2_tests.c | 9 ++++++---
tests/fs/ffs/quotas_common.sh | 7 ++++---
tests/fs/ffs/t_getquota.sh | 8 ++++----
tests/fs/ffs/t_quotalimit.sh | 36 ++++++++++++++++++++++--------------
tests/fs/ffs/t_setquota.sh | 22 ++++++++++++----------
6 files changed, 55 insertions(+), 37 deletions(-)
diffs (279 lines):
diff -r eac492d89b57 -r 81737c8fa6c8 tests/fs/ffs/h_quota2_server.c
--- a/tests/fs/ffs/h_quota2_server.c Sun Feb 06 22:18:38 2011 +0000
+++ b/tests/fs/ffs/h_quota2_server.c Mon Feb 07 16:22:50 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: h_quota2_server.c,v 1.1.2.2 2011/01/30 13:15:14 bouyer Exp $ */
+/* $NetBSD: h_quota2_server.c,v 1.1.2.3 2011/02/07 16:22:50 bouyer Exp $ */
/*
* rump server for advanced quota tests
@@ -26,7 +26,8 @@
static void
usage(void)
{
- fprintf(stderr, "usage: %s [-b] diskimage bindurl\n", getprogname());
+ fprintf(stderr, "usage: %s [-b] [-l] diskimage bindurl\n",
+ getprogname());
exit(1);
}
@@ -58,11 +59,14 @@
int log = 0;
int ch;
- while ((ch = getopt(argc, argv, "b")) != -1) {
+ while ((ch = getopt(argc, argv, "bl")) != -1) {
switch(ch) {
case 'b':
background = 1;
break;
+ case 'l':
+ log = 1;
+ break;
default:
usage();
}
diff -r eac492d89b57 -r 81737c8fa6c8 tests/fs/ffs/h_quota2_tests.c
--- a/tests/fs/ffs/h_quota2_tests.c Sun Feb 06 22:18:38 2011 +0000
+++ b/tests/fs/ffs/h_quota2_tests.c Mon Feb 07 16:22:50 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: h_quota2_tests.c,v 1.1.2.2 2011/02/03 17:36:31 bouyer Exp $ */
+/* $NetBSD: h_quota2_tests.c,v 1.1.2.3 2011/02/07 16:22:50 bouyer Exp $ */
/*
* rump server for advanced quota tests
@@ -204,7 +204,7 @@
static void
usage(void)
{
- fprintf(stderr, "usage: %s [-b] test# diskimage bindurl\n",
+ fprintf(stderr, "usage: %s [-b] [-l] test# diskimage bindurl\n",
getprogname());
exit(1);
}
@@ -239,11 +239,14 @@
int log = 0;
int ch;
- while ((ch = getopt(argc, argv, "b")) != -1) {
+ while ((ch = getopt(argc, argv, "bl")) != -1) {
switch(ch) {
case 'b':
background = 1;
break;
+ case 'l':
+ log = 1;
+ break;
default:
usage();
}
diff -r eac492d89b57 -r 81737c8fa6c8 tests/fs/ffs/quotas_common.sh
--- a/tests/fs/ffs/quotas_common.sh Sun Feb 06 22:18:38 2011 +0000
+++ b/tests/fs/ffs/quotas_common.sh Mon Feb 07 16:22:50 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: quotas_common.sh,v 1.1.2.5 2011/02/02 19:17:08 bouyer Exp $
+# $NetBSD: quotas_common.sh,v 1.1.2.6 2011/02/07 16:22:50 bouyer Exp $
create_with_quotas()
{
@@ -17,9 +17,10 @@
create_with_quotas_server()
{
+ local sarg=$1; shift
create_with_quotas $*
- atf_check -o ignore -e ignore $(atf_get_srcdir)/h_quota2_server -b \
- ${IMG} ${RUMP_SERVER}
+ atf_check -o ignore -e ignore $(atf_get_srcdir)/h_quota2_server \
+ ${sarg} ${IMG} ${RUMP_SERVER}
}
rump_shutdown()
diff -r eac492d89b57 -r 81737c8fa6c8 tests/fs/ffs/t_getquota.sh
--- a/tests/fs/ffs/t_getquota.sh Sun Feb 06 22:18:38 2011 +0000
+++ b/tests/fs/ffs/t_getquota.sh Mon Feb 07 16:22:50 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_getquota.sh,v 1.1.2.6 2011/02/02 19:17:08 bouyer Exp $
+# $NetBSD: t_getquota.sh,v 1.1.2.7 2011/02/07 16:22:50 bouyer Exp $
#
# Copyright (c) 2011 Manuel Bouyer
# All rights reserved.
@@ -29,17 +29,17 @@
for v in 1 2; do
for q in "user" "group"; do
test_case get_${e}_${v}_${q} get_quota \
- "get quota with ${q} enabled" ${e} ${v} ${q}
+ "get quota with ${q} enabled" -b ${e} ${v} ${q}
done
test_case get_${e}_${v}_"both" get_quota \
- "get quota with both enabled" ${e} ${v} "both"
+ "get quota with both enabled" -b ${e} ${v} "both"
done
done
get_quota()
{
create_with_quotas_server $*
- local q=$3
+ local q=$4
local expect
local fail
diff -r eac492d89b57 -r 81737c8fa6c8 tests/fs/ffs/t_quotalimit.sh
--- a/tests/fs/ffs/t_quotalimit.sh Sun Feb 06 22:18:38 2011 +0000
+++ b/tests/fs/ffs/t_quotalimit.sh Mon Feb 07 16:22:50 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_quotalimit.sh,v 1.1.2.3 2011/02/03 17:36:31 bouyer Exp $
+# $NetBSD: t_quotalimit.sh,v 1.1.2.4 2011/02/07 16:22:50 bouyer Exp $
#
# Copyright (c) 2011 Manuel Bouyer
# All rights reserved.
@@ -29,17 +29,25 @@
for v in 1; do
for q in "user" "group"; do
test_case_root limit_${e}_${v}_${q} limit_quota \
- "hit hard limit quota with ${q} enabled" ${e} ${v} ${q}
+ "hit hard limit quota with ${q} enabled" -b ${e} ${v} ${q}
+ test_case_root limit_${e}_${v}_${q}_log limit_quota \
+ "hit hard limit quota with ${q} enabled, WAPBL" -bl ${e} ${v} ${q}
test_case_root slimit_${e}_${v}_${q} limit_softquota \
- "hit soft limit quota with ${q} enabled after grace time" ${e} ${v} ${q}
+ "hit soft limit quota with ${q} enabled after grace time" \
+ -b ${e} ${v} ${q}
test_case_root inolimit_${e}_${v}_${q} limit_iquota \
- "hit hard limit ino quota with ${q} enabled" ${e} ${v} ${q}
+ "hit hard limit ino quota with ${q} enabled" -b ${e} ${v} ${q}
+ test_case_root inolimit_${e}_${v}_${q}_log limit_iquota \
+ "hit hard limit ino quota with ${q} enabled, WAPBL" -bl ${e} ${v} ${q}
test_case_root sinolimit_${e}_${v}_${q} limit_softiquota \
- "hit soft limit ino quota with ${q} enabled after grace time" ${e} ${v} ${q}
+ "hit soft limit ino quota with ${q} enabled after grace time" \
+ -b ${e} ${v} ${q}
test_case_root herit_defq_${e}_${v}_${q} inherit_defaultquota \
- "new id herit from default for ${q} quota" ${e} ${v} ${q}
- test_case_root herit_idefq_${e}_${v}_${q} inherit_defaultiquota \
- "new id herit from default for ${q} ino quota" ${e} ${v} ${q}
+ "new id herit from default for ${q} quota" -b ${e} ${v} ${q}
+ test_case_root herit_defq_${e}_${v}_${q}_log inherit_defaultquota \
+ "new id herit from default for ${q} quota, WAPBL" -bl ${e} ${v} ${q}
+ test_case_root herit_idefq_${e}_${v}_${q}_log inherit_defaultiquota \
+ "new id herit from default for ${q} ino quota, WAPBL" -bl ${e} ${v} ${q}
done
done
done
@@ -47,7 +55,7 @@
limit_quota()
{
create_with_quotas_server $*
- local q=$3
+ local q=$4
local expect
local id=1
@@ -94,7 +102,7 @@
limit_softquota()
{
create_with_quotas_server $*
- local q=$3
+ local q=$4
local expect
local id=1
@@ -141,7 +149,7 @@
limit_iquota()
{
create_with_quotas_server $*
- local q=$3
+ local q=$4
local expect
local id=1
@@ -188,7 +196,7 @@
limit_softiquota()
{
create_with_quotas_server $*
- local q=$3
+ local q=$4
local expect
local id=1
@@ -235,7 +243,7 @@
inherit_defaultquota()
{
create_with_quotas_server $*
- local q=$3
+ local q=$4
local expect
local id=1
@@ -287,7 +295,7 @@
inherit_defaultiquota()
{
create_with_quotas_server $*
- local q=$3
+ local q=$4
local expect
local id=1
diff -r eac492d89b57 -r 81737c8fa6c8 tests/fs/ffs/t_setquota.sh
--- a/tests/fs/ffs/t_setquota.sh Sun Feb 06 22:18:38 2011 +0000
+++ b/tests/fs/ffs/t_setquota.sh Mon Feb 07 16:22:50 2011 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_setquota.sh,v 1.1.2.6 2011/02/02 19:17:08 bouyer Exp $
+# $NetBSD: t_setquota.sh,v 1.1.2.7 2011/02/07 16:22:50 bouyer Exp $
#
# Copyright (c) 2011 Manuel Bouyer
# All rights reserved.
@@ -29,25 +29,27 @@
for v in 1 2; do
for q in "user" "group"; do
test_case_root set_${e}_${v}_${q} set_quota \
- "set quota with ${q} enabled" ${e} ${v} ${q}
+ "set quota with ${q} enabled" -b ${e} ${v} ${q}
test_case_root set_new_${e}_${v}_${q} set_quota_new \
- "set quota for new id with ${q} enabled" ${e} ${v} ${q}
+ "set quota for new id with ${q} enabled" -b ${e} ${v} ${q}
test_case_root set_default_${e}_${v}_${q} set_quota_default \
- "set default quota with ${q} enabled" ${e} ${v} ${q}
+ "set default quota with ${q} enabled" -b ${e} ${v} ${q}
done
test_case_root set_${e}_${v}_"both" set_quota \
- "set quota with both enabled" ${e} ${v} "both"
+ "set quota with both enabled" -b ${e} ${v} "both"
test_case_root set_new_${e}_${v}_"both" set_quota_new \
- "set quota for new id with both enabled" ${e} ${v} "both"
+ "set quota for new id with both enabled" -b ${e} ${v} "both"
+ test_case_root set_new_${e}_${v}_"both_log" set_quota_new \
+ "set quota for new id with both enabled, WAPBL" -bl ${e} ${v} "both"
test_case_root set_default_${e}_${v}_"both" set_quota_default \
- "set default quota with both enabled" ${e} ${v} "both"
+ "set default quota with both enabled" -b ${e} ${v} "both"
done
done
set_quota()
{
create_with_quotas_server $*
- local q=$3
+ local q=$4
local expect
local fail
@@ -103,7 +105,7 @@
set_quota_new()
{
create_with_quotas_server $*
- local q=$3
+ local q=$4
local expect
local fail
@@ -153,7 +155,7 @@
set_quota_default()
{
create_with_quotas_server $*
- local q=$3
+ local q=$4
local expect
local fail
Home |
Main Index |
Thread Index |
Old Index