Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests atf-0.9 introduces an use.fs test-case property to all...
details: https://anonhg.NetBSD.org/src/rev/d3ba66d1417e
branches: trunk
changeset: 755397:d3ba66d1417e
user: jmmv <jmmv%NetBSD.org@localhost>
date: Fri Jun 04 08:39:40 2010 +0000
description:
atf-0.9 introduces an use.fs test-case property to allow tests to write to
their work directory. The purpose is to be able to know which tests intend
to touch the file system and to allow a minor optimization in atf-run.
Define use.fs=true for all those tests requiring it. (This highlights that
some tests currently require modifying the file system but conceptually
they shouldn't be... which leaves room for further improvements/cleanups
later :-)
diffstat:
tests/crypto/libcrypto/t_libcrypto.in | 4 +++-
tests/fs/common/snapshot.c | 3 ++-
tests/fs/ffs/t_fifos.c | 3 ++-
tests/fs/ffs/t_renamerace.c | 3 ++-
tests/fs/puffs/t_psshfs.sh | 4 +++-
tests/fs/tmpfs/t_create.sh | 5 ++++-
tests/fs/tmpfs/t_devices.sh | 3 ++-
tests/fs/tmpfs/t_dots.sh | 4 +++-
tests/fs/tmpfs/t_exec.sh | 3 ++-
tests/fs/tmpfs/t_id_gen.sh | 3 ++-
tests/fs/tmpfs/t_link.sh | 5 ++++-
tests/fs/tmpfs/t_mkdir.sh | 7 ++++++-
tests/fs/tmpfs/t_mknod.sh | 8 +++++++-
tests/fs/tmpfs/t_mount.sh | 9 ++++++++-
tests/fs/tmpfs/t_pipes.sh | 3 ++-
tests/fs/tmpfs/t_read_write.sh | 4 +++-
tests/fs/tmpfs/t_readdir.sh | 6 +++++-
tests/fs/tmpfs/t_remove.sh | 6 +++++-
tests/fs/tmpfs/t_rename.sh | 11 ++++++++++-
tests/fs/tmpfs/t_rmdir.sh | 11 ++++++++++-
tests/fs/tmpfs/t_setattr.sh | 12 +++++++++++-
tests/fs/tmpfs/t_sizes.sh | 6 +++++-
tests/fs/tmpfs/t_sockets.sh | 3 ++-
tests/fs/tmpfs/t_statvfs.sh | 3 ++-
tests/fs/tmpfs/t_symlink.sh | 6 +++++-
tests/fs/tmpfs/t_times.sh | 6 +++++-
tests/fs/tmpfs/t_trail_slash.sh | 3 ++-
tests/fs/tmpfs/t_truncate.sh | 3 ++-
tests/fs/tmpfs/t_vnd.sh | 3 ++-
tests/fs/tmpfs/t_vnode_leak.sh | 3 ++-
tests/fs/union/t_basic.c | 3 ++-
tests/games/t_factor.sh | 4 +++-
tests/ipf/t_ipf.awk | 3 ++-
tests/kernel/kqueue/read/t_fifo.c | 5 +++--
tests/kernel/kqueue/read/t_file.c | 5 +++--
tests/kernel/kqueue/read/t_file2.c | 5 +++--
tests/kernel/kqueue/write/t_fifo.c | 5 +++--
tests/kernel/t_mkdir.c | 5 +++--
tests/kernel/t_umount.sh | 3 ++-
tests/modules/t_modload.sh | 6 +++++-
tests/sys/rc/t_rc_d_cli.sh | 10 +++++++++-
tests/util/awk/t_awk.sh | 6 +++++-
tests/util/config/t_config.awk | 3 ++-
tests/util/cut/t_cut.sh | 6 +++++-
tests/util/df/t_df.sh | 4 +++-
tests/util/grep/t_grep.sh | 7 ++++++-
tests/util/id/t_groups.sh | 4 +++-
tests/util/id/t_id.sh | 8 +++++++-
tests/util/id/t_whoami.sh | 4 +++-
tests/util/m4/t_m4.sh | 3 ++-
tests/util/make/t_make.awk | 3 ++-
tests/util/mtree/t_mtree.sh | 9 ++++++++-
tests/util/sdiff/t_sdiff.sh | 6 +++++-
tests/util/sh/t_wait.sh | 32 ++++++++++++++++++++++++--------
tests/util/t_cp.sh | 12 +++++++++++-
tests/util/t_gzip.sh | 6 +++++-
tests/util/t_pax.sh | 3 ++-
tests/util/t_tar.sh | 3 ++-
58 files changed, 256 insertions(+), 70 deletions(-)
diffs (truncated from 1968 to 300 lines):
diff -r cb51f1b1da84 -r d3ba66d1417e tests/crypto/libcrypto/t_libcrypto.in
--- a/tests/crypto/libcrypto/t_libcrypto.in Fri Jun 04 08:37:09 2010 +0000
+++ b/tests/crypto/libcrypto/t_libcrypto.in Fri Jun 04 08:39:40 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_libcrypto.in,v 1.2 2009/02/13 22:01:49 jmmv Exp $
+# $NetBSD: t_libcrypto.in,v 1.3 2010/06/04 08:39:40 jmmv Exp $
#
# Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -115,6 +115,7 @@
conf_head()
{
atf_set "descr" "Checks configuration modules"
+ atf_set "use.fs" "true"
}
conf_body()
{
@@ -139,6 +140,7 @@
threads_head()
{
atf_set "descr" "Checks threading"
+ atf_set "use.fs" "true"
}
threads_body()
{
diff -r cb51f1b1da84 -r d3ba66d1417e tests/fs/common/snapshot.c
--- a/tests/fs/common/snapshot.c Fri Jun 04 08:37:09 2010 +0000
+++ b/tests/fs/common/snapshot.c Fri Jun 04 08:39:40 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: snapshot.c,v 1.3 2010/05/31 23:44:54 pooka Exp $ */
+/* $NetBSD: snapshot.c,v 1.4 2010/06/04 08:39:40 jmmv Exp $ */
#include <sys/types.h>
#include <sys/ioctl.h>
@@ -18,6 +18,7 @@
{
atf_tc_set_md_var(tc, "descr", "basic snapshot features");
+ atf_tc_set_md_var(tc, "use.fs", "true");
}
static void
diff -r cb51f1b1da84 -r d3ba66d1417e tests/fs/ffs/t_fifos.c
--- a/tests/fs/ffs/t_fifos.c Fri Jun 04 08:37:09 2010 +0000
+++ b/tests/fs/ffs/t_fifos.c Fri Jun 04 08:39:40 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_fifos.c,v 1.3 2010/05/31 23:44:54 pooka Exp $ */
+/* $NetBSD: t_fifos.c,v 1.4 2010/06/04 08:39:40 jmmv Exp $ */
#include <sys/types.h>
#include <sys/mount.h>
@@ -24,6 +24,7 @@
{
atf_tc_set_md_var(tc, "descr", "test fifo support in ffs");
atf_tc_set_md_var(tc, "timeout", "5");
+ atf_tc_set_md_var(tc, "use.fs", "true");
}
#define teststr1 "raving & drooling"
diff -r cb51f1b1da84 -r d3ba66d1417e tests/fs/ffs/t_renamerace.c
--- a/tests/fs/ffs/t_renamerace.c Fri Jun 04 08:37:09 2010 +0000
+++ b/tests/fs/ffs/t_renamerace.c Fri Jun 04 08:39:40 2010 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_renamerace.c,v 1.10 2010/05/30 05:35:48 dholland Exp $ */
+/* $NetBSD: t_renamerace.c,v 1.11 2010/06/04 08:39:40 jmmv Exp $ */
/*
* Modified for rump and atf from a program supplied
@@ -32,6 +32,7 @@
"unlinked mid-operation, kern/40948");
/* XXX: test hangs in qemu for unknown reasons */
atf_tc_set_md_var(tc, "timeout", "20");
+ atf_tc_set_md_var(tc, "use.fs", "true");
}
volatile int quit;
diff -r cb51f1b1da84 -r d3ba66d1417e tests/fs/puffs/t_psshfs.sh
--- a/tests/fs/puffs/t_psshfs.sh Fri Jun 04 08:37:09 2010 +0000
+++ b/tests/fs/puffs/t_psshfs.sh Fri Jun 04 08:39:40 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_psshfs.sh,v 1.5 2009/01/19 07:15:46 jmmv Exp $
+# $NetBSD: t_psshfs.sh,v 1.6 2010/06/04 08:39:40 jmmv Exp $
#
# Copyright (c) 2007, 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -129,6 +129,7 @@
inode_nos_head() {
atf_set "descr" "Checks that different files get different inode" \
"numbers"
+ atf_set "use.fs" "true"
}
inode_nos_body() {
require_puffs
@@ -171,6 +172,7 @@
atf_test_case pwd
pwd_head() {
atf_set "descr" "Checks that pwd works correctly"
+ atf_set "use.fs" "true"
}
pwd_body() {
require_puffs
diff -r cb51f1b1da84 -r d3ba66d1417e tests/fs/tmpfs/t_create.sh
--- a/tests/fs/tmpfs/t_create.sh Fri Jun 04 08:37:09 2010 +0000
+++ b/tests/fs/tmpfs/t_create.sh Fri Jun 04 08:39:40 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_create.sh,v 1.3 2009/01/19 07:15:46 jmmv Exp $
+# $NetBSD: t_create.sh,v 1.4 2010/06/04 08:39:40 jmmv Exp $
#
# Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -33,6 +33,7 @@
create_head() {
atf_set "descr" "Verifies that files can be created"
atf_set "require.user" "root"
+ atf_set "use.fs" "true"
}
create_body() {
test_mount
@@ -50,6 +51,7 @@
"attributes"
atf_set "require.config" "unprivileged-user"
atf_set "require.user" "root"
+ atf_set "use.fs" "true"
}
attrs_body() {
# Allow the unprivileged user to access the work directory.
@@ -102,6 +104,7 @@
atf_set "descr" "Verifies that creating a file raises the correct" \
"kqueue events"
atf_set "require.user" "root"
+ atf_set "use.fs" "true"
}
kqueue_body() {
test_mount
diff -r cb51f1b1da84 -r d3ba66d1417e tests/fs/tmpfs/t_devices.sh
--- a/tests/fs/tmpfs/t_devices.sh Fri Jun 04 08:37:09 2010 +0000
+++ b/tests/fs/tmpfs/t_devices.sh Fri Jun 04 08:39:40 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_devices.sh,v 1.3 2009/01/19 07:15:46 jmmv Exp $
+# $NetBSD: t_devices.sh,v 1.4 2010/06/04 08:39:40 jmmv Exp $
#
# Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -29,6 +29,7 @@
basic_head() {
atf_set "descr" "Tests that special devices work"
atf_set "require.user" "root"
+ atf_set "use.fs" "true"
}
basic_body() {
test_mount
diff -r cb51f1b1da84 -r d3ba66d1417e tests/fs/tmpfs/t_dots.sh
--- a/tests/fs/tmpfs/t_dots.sh Fri Jun 04 08:37:09 2010 +0000
+++ b/tests/fs/tmpfs/t_dots.sh Fri Jun 04 08:39:40 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_dots.sh,v 1.3 2009/01/19 07:15:46 jmmv Exp $
+# $NetBSD: t_dots.sh,v 1.4 2010/06/04 08:39:40 jmmv Exp $
#
# Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -30,6 +30,7 @@
atf_set "descr" "Verifies that looking up '.' and '..' in" \
"top-level directories works"
atf_set "require.user" "root"
+ atf_set "use.fs" "true"
}
topdir_body() {
test_mount
@@ -46,6 +47,7 @@
atf_set "descr" "Verifies that looking up '.' and '..' in" \
"top-level directories works"
atf_set "require.user" "root"
+ atf_set "use.fs" "true"
}
nesteddir_body() {
test_mount
diff -r cb51f1b1da84 -r d3ba66d1417e tests/fs/tmpfs/t_exec.sh
--- a/tests/fs/tmpfs/t_exec.sh Fri Jun 04 08:37:09 2010 +0000
+++ b/tests/fs/tmpfs/t_exec.sh Fri Jun 04 08:39:40 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_exec.sh,v 1.3 2009/01/19 07:15:46 jmmv Exp $
+# $NetBSD: t_exec.sh,v 1.4 2010/06/04 08:39:40 jmmv Exp $
#
# Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -31,6 +31,7 @@
"within the file system (i.e., whether getpages" \
"works)"
atf_set "require.user" "root"
+ atf_set "use.fs" "true"
}
basic_body() {
test_mount
diff -r cb51f1b1da84 -r d3ba66d1417e tests/fs/tmpfs/t_id_gen.sh
--- a/tests/fs/tmpfs/t_id_gen.sh Fri Jun 04 08:37:09 2010 +0000
+++ b/tests/fs/tmpfs/t_id_gen.sh Fri Jun 04 08:39:40 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_id_gen.sh,v 1.3 2009/01/19 07:15:46 jmmv Exp $
+# $NetBSD: t_id_gen.sh,v 1.4 2010/06/04 08:39:40 jmmv Exp $
#
# Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -30,6 +30,7 @@
atf_set "descr" "Verifies that node identifiers and generation" \
"numbers are assigned correctly"
atf_set "require.user" "root"
+ atf_set "use.fs" "true"
}
main_body() {
test_mount
diff -r cb51f1b1da84 -r d3ba66d1417e tests/fs/tmpfs/t_link.sh
--- a/tests/fs/tmpfs/t_link.sh Fri Jun 04 08:37:09 2010 +0000
+++ b/tests/fs/tmpfs/t_link.sh Fri Jun 04 08:39:40 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_link.sh,v 1.3 2009/01/19 07:15:46 jmmv Exp $
+# $NetBSD: t_link.sh,v 1.4 2010/06/04 08:39:40 jmmv Exp $
#
# Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -34,6 +34,7 @@
atf_set "descr" "Verifies that the link operation works on files" \
"at the top directory"
atf_set "require.user" "root"
+ atf_set "use.fs" "true"
}
basic_body() {
test_mount
@@ -68,6 +69,7 @@
atf_set "descr" "Verifies that the link operation works if used" \
"in subdirectories"
atf_set "require.user" "root"
+ atf_set "use.fs" "true"
}
subdirs_body() {
test_mount
@@ -98,6 +100,7 @@
atf_set "descr" "Verifies that creating a link raises the correct" \
"kqueue events"
atf_set "require.user" "root"
+ atf_set "use.fs" "true"
}
kqueue_body() {
test_mount
diff -r cb51f1b1da84 -r d3ba66d1417e tests/fs/tmpfs/t_mkdir.sh
--- a/tests/fs/tmpfs/t_mkdir.sh Fri Jun 04 08:37:09 2010 +0000
+++ b/tests/fs/tmpfs/t_mkdir.sh Fri Jun 04 08:39:40 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_mkdir.sh,v 1.3 2009/01/19 07:15:46 jmmv Exp $
+# $NetBSD: t_mkdir.sh,v 1.4 2010/06/04 08:39:40 jmmv Exp $
#
# Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -35,6 +35,7 @@
atf_set "descr" "Creates a single directory and checks the" \
"mount point's hard link count"
atf_set "require.user" "root"
+ atf_set "use.fs" "true"
}
single_body() {
test_mount
@@ -54,6 +55,7 @@
atf_set "descr" "Creates multiple directories and checks the" \
"mount point's hard link count"
atf_set "require.user" "root"
+ atf_set "use.fs" "true"
}
many_body() {
test_mount
@@ -73,6 +75,7 @@
nested_head() {
atf_set "descr" "Checks if nested directories can be created"
atf_set "require.user" "root"
+ atf_set "use.fs" "true"
}
nested_body() {
test_mount
@@ -90,6 +93,7 @@
"attributes (owner and group)"
atf_set "require.config" "unprivileged-user"
atf_set "require.user" "root"
+ atf_set "use.fs" "true"
}
attrs_body() {
# Allow the unprivileged user to access the work directory.
@@ -129,6 +133,7 @@
atf_set "descr" "Creates a directory and checks the kqueue events" \
"raised"
atf_set "require.user" "root"
+ atf_set "use.fs" "true"
}
kqueue_body() {
test_mount
diff -r cb51f1b1da84 -r d3ba66d1417e tests/fs/tmpfs/t_mknod.sh
--- a/tests/fs/tmpfs/t_mknod.sh Fri Jun 04 08:37:09 2010 +0000
+++ b/tests/fs/tmpfs/t_mknod.sh Fri Jun 04 08:39:40 2010 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_mknod.sh,v 1.3 2009/01/19 07:15:46 jmmv Exp $
+# $NetBSD: t_mknod.sh,v 1.4 2010/06/04 08:39:40 jmmv Exp $
#
# Copyright (c) 2005, 2006, 2007, 2008 The NetBSD Foundation, Inc.
Home |
Main Index |
Thread Index |
Old Index