Source-Changes-HG archive

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

[src/trunk]: src/tests/fs/common Remove unnecessary (and broken) cleanup rout...



details:   https://anonhg.NetBSD.org/src/rev/6cbc2fe05e1b
branches:  trunk
changeset: 763508:6cbc2fe05e1b
user:      jmmv <jmmv%NetBSD.org@localhost>
date:      Tue Mar 22 16:50:16 2011 +0000

description:
Remove unnecessary (and broken) cleanup routines.

The cleanup routines were being used to kill the rump process and to delete
the temporary image file.  These are things automatically done by atf-run,
but it looks like this code was added here to workaround a previous bug in
the atf-run code.

Note that, in the existing form, the cleanup routines segfault (haven't
spent the time to track down why).  atf-run does not care about this
(although it should), buy Kyua does.

As a side effect, this has a teeny-tiny performance speedup in the execution
of the tests including this file.

OKed by njoly@.

diffstat:

 tests/fs/common/h_fsmacros.h |  22 +++-------------------
 1 files changed, 3 insertions(+), 19 deletions(-)

diffs (53 lines):

diff -r df922e8baa10 -r 6cbc2fe05e1b tests/fs/common/h_fsmacros.h
--- a/tests/fs/common/h_fsmacros.h      Tue Mar 22 16:16:30 2011 +0000
+++ b/tests/fs/common/h_fsmacros.h      Tue Mar 22 16:50:16 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: h_fsmacros.h,v 1.33 2011/03/05 20:56:28 pooka Exp $    */
+/*     $NetBSD: h_fsmacros.h,v 1.34 2011/03/22 16:50:16 jmmv Exp $     */
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -101,7 +101,7 @@
 } while (/*CONSTCOND*/0);
 
 #define ATF_TC_FSADD(fs,type,func,desc)                                        \
-       ATF_TC_WITH_CLEANUP(fs##_##func);                               \
+       ATF_TC(fs##_##func);                                            \
        ATF_TC_HEAD(fs##_##func,tc)                                     \
        {                                                               \
                atf_tc_set_md_var(tc, "descr", type " test for " desc); \
@@ -120,18 +120,10 @@
                        rump_pub_vfs_mount_print(FSTEST_MNTNAME, 1);    \
                        atf_tc_fail_errno("unmount failed");            \
                }                                                       \
-       }                                                               \
-                                                                       \
-       ATF_TC_CLEANUP(fs##_##func,tc)                                  \
-       {                                                               \
-               if (!atf_check_fstype(tc, #fs))                         \
-                       return;                                         \
-               if (fs##_fstest_delfs(tc, fs##func##tmp) != 0)          \
-                       atf_tc_fail_errno("delfs failed");              \
        }
 
 #define ATF_TC_FSADD_RO(_fs_,_type_,_func_,_desc_,_gen_)               \
-       ATF_TC_WITH_CLEANUP(_fs_##_##_func_);                           \
+       ATF_TC(_fs_##_##_func_);                                        \
        ATF_TC_HEAD(_fs_##_##_func_,tc)                                 \
        {                                                               \
                atf_tc_set_md_var(tc, "descr",_type_" test for "_desc_);\
@@ -156,14 +148,6 @@
                        rump_pub_vfs_mount_print(FSTEST_MNTNAME, 1);    \
                        atf_tc_fail_errno("unmount failed");            \
                }                                                       \
-       }                                                               \
-                                                                       \
-       ATF_TC_CLEANUP(_fs_##_##_func_,tc)                              \
-       {                                                               \
-               if (!atf_check_fstype(tc, #_fs_))                       \
-                       return;                                         \
-               if (_fs_##_fstest_delfs(tc, _fs_##_func_##tmp) != 0)    \
-                       atf_tc_fail_errno("delfs failed");              \
        }
 
 #define ATF_TP_FSADD(fs,func)                                          \



Home | Main Index | Thread Index | Old Index