Module Name: src Committed By: bouyer Date: Mon Feb 7 16:22:50 UTC 2011
Modified Files: src/tests/fs/ffs [bouyer-quota2]: h_quota2_server.c h_quota2_tests.c quotas_common.sh t_getquota.sh t_quotalimit.sh t_setquota.sh Log Message: Add an option to mount the filesystem -o log to rump quota servers. Add some quota tests on a WAPBL-enabled filesystem. To generate a diff of this commit: cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/tests/fs/ffs/h_quota2_server.c \ src/tests/fs/ffs/h_quota2_tests.c cvs rdiff -u -r1.1.2.5 -r1.1.2.6 src/tests/fs/ffs/quotas_common.sh cvs rdiff -u -r1.1.2.6 -r1.1.2.7 src/tests/fs/ffs/t_getquota.sh \ src/tests/fs/ffs/t_setquota.sh cvs rdiff -u -r1.1.2.3 -r1.1.2.4 src/tests/fs/ffs/t_quotalimit.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/tests/fs/ffs/h_quota2_server.c diff -u src/tests/fs/ffs/h_quota2_server.c:1.1.2.2 src/tests/fs/ffs/h_quota2_server.c:1.1.2.3 --- src/tests/fs/ffs/h_quota2_server.c:1.1.2.2 Sun Jan 30 13:15:14 2011 +++ src/tests/fs/ffs/h_quota2_server.c Mon Feb 7 16:22:50 2011 @@ -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(); } Index: src/tests/fs/ffs/h_quota2_tests.c diff -u src/tests/fs/ffs/h_quota2_tests.c:1.1.2.2 src/tests/fs/ffs/h_quota2_tests.c:1.1.2.3 --- src/tests/fs/ffs/h_quota2_tests.c:1.1.2.2 Thu Feb 3 17:36:31 2011 +++ src/tests/fs/ffs/h_quota2_tests.c Mon Feb 7 16:22:50 2011 @@ -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(); } Index: src/tests/fs/ffs/quotas_common.sh diff -u src/tests/fs/ffs/quotas_common.sh:1.1.2.5 src/tests/fs/ffs/quotas_common.sh:1.1.2.6 --- src/tests/fs/ffs/quotas_common.sh:1.1.2.5 Wed Feb 2 19:17:08 2011 +++ src/tests/fs/ffs/quotas_common.sh Mon Feb 7 16:22:50 2011 @@ -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() Index: src/tests/fs/ffs/t_getquota.sh diff -u src/tests/fs/ffs/t_getquota.sh:1.1.2.6 src/tests/fs/ffs/t_getquota.sh:1.1.2.7 --- src/tests/fs/ffs/t_getquota.sh:1.1.2.6 Wed Feb 2 19:17:08 2011 +++ src/tests/fs/ffs/t_getquota.sh Mon Feb 7 16:22:50 2011 @@ -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 Index: src/tests/fs/ffs/t_setquota.sh diff -u src/tests/fs/ffs/t_setquota.sh:1.1.2.6 src/tests/fs/ffs/t_setquota.sh:1.1.2.7 --- src/tests/fs/ffs/t_setquota.sh:1.1.2.6 Wed Feb 2 19:17:08 2011 +++ src/tests/fs/ffs/t_setquota.sh Mon Feb 7 16:22:50 2011 @@ -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 Index: src/tests/fs/ffs/t_quotalimit.sh diff -u src/tests/fs/ffs/t_quotalimit.sh:1.1.2.3 src/tests/fs/ffs/t_quotalimit.sh:1.1.2.4 --- src/tests/fs/ffs/t_quotalimit.sh:1.1.2.3 Thu Feb 3 17:36:31 2011 +++ src/tests/fs/ffs/t_quotalimit.sh Mon Feb 7 16:22:50 2011 @@ -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