Source-Changes-HG archive

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

[src/trunk]: src/tests/kernel Remove unnecessary and broken cleanup routine.



details:   https://anonhg.NetBSD.org/src/rev/dfb979d4caa6
branches:  trunk
changeset: 327241:dfb979d4caa6
user:      jmmv <jmmv%NetBSD.org@localhost>
date:      Sun Mar 02 19:56:48 2014 +0000

description:
Remove unnecessary and broken cleanup routine.

diffstat:

 tests/kernel/t_mqueue.c |  17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)

diffs (52 lines):

diff -r 95a35dca39a6 -r dfb979d4caa6 tests/kernel/t_mqueue.c
--- a/tests/kernel/t_mqueue.c   Sun Mar 02 16:18:41 2014 +0000
+++ b/tests/kernel/t_mqueue.c   Sun Mar 02 19:56:48 2014 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_mqueue.c,v 1.3 2012/11/06 19:35:38 pgoyette Exp $ */
+/*     $NetBSD: t_mqueue.c,v 1.4 2014/03/02 19:56:48 jmmv Exp $ */
 
 /*
  * Test for POSIX message queue priority handling.
@@ -16,8 +16,6 @@
 
 #include <mqueue.h>
 
-char *tmpdir;
-
 #define        MQ_PRIO_BASE    24
 
 static void
@@ -98,7 +96,7 @@
            "mq_receive 6 prio/data mismatch");
 }
 
-ATF_TC_WITH_CLEANUP(mqueue);
+ATF_TC(mqueue);
 ATF_TC_HEAD(mqueue, tc)
 {
 
@@ -109,6 +107,7 @@
 ATF_TC_BODY(mqueue, tc)
 {
        int status;
+       char *tmpdir;
        char template[32];
        char mq_name[64];
 
@@ -130,16 +129,6 @@
        ATF_REQUIRE_MSG(status == 0, "mq_close failed: %d", errno);
 }
 
-ATF_TC_CLEANUP(mqueue, tc)
-{
-       int status;
-
-       if (tmpdir != NULL) {
-               status = rmdir(tmpdir);
-               ATF_REQUIRE_MSG(status == 0, "rmdir failed: %d", errno);
-       }
-}
-
 ATF_TP_ADD_TCS(tp)
 {
        ATF_TP_ADD_TC(tp, mqueue); 



Home | Main Index | Thread Index | Old Index