Source-Changes-HG archive

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

[src/trunk]: src/tests/fs/ffs move check next to operation



details:   https://anonhg.NetBSD.org/src/rev/2cea5353d995
branches:  trunk
changeset: 753870:2cea5353d995
user:      pooka <pooka%NetBSD.org@localhost>
date:      Mon Apr 12 23:15:24 2010 +0000

description:
move check next to operation

diffstat:

 tests/fs/ffs/t_snapshot.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 7fae4814ce40 -r 2cea5353d995 tests/fs/ffs/t_snapshot.c
--- a/tests/fs/ffs/t_snapshot.c Mon Apr 12 23:09:28 2010 +0000
+++ b/tests/fs/ffs/t_snapshot.c Mon Apr 12 23:15:24 2010 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: t_snapshot.c,v 1.1 2010/04/12 22:58:53 pooka Exp $     */
+/*     $NetBSD: t_snapshot.c,v 1.2 2010/04/12 23:15:24 pooka Exp $     */
 
 #include <sys/types.h>
 #include <sys/ioctl.h>
@@ -106,6 +106,7 @@
        memset(buf, 0, sizeof(buf));
        if (rump_sys_read(fd2, buf, sizeof(buf)) == -1)
                atf_tc_fail_errno("read snap");
+       ATF_CHECK(strcmp(buf, TESTSTR1) == 0);
 
        /* check that new files are invisible in the snapshot */
        makefile("/mnt/newfile");
@@ -116,11 +117,10 @@
 
        /* check that removed files are still visible in the snapshot */
        rump_sys_unlink("/mnt/myfile");
-
        if (rump_sys_open("/snap/myfile", O_RDONLY) == -1)
                atf_tc_fail_errno("unlinked file no longer in snapshot");
 
-       ATF_CHECK(strcmp(buf, TESTSTR1) == 0);
+       /* done for now */
 }
 
 ATF_TC_CLEANUP(snapshot, tc)



Home | Main Index | Thread Index | Old Index