Module Name: src
Committed By: pooka
Date: Mon Apr 12 23:15:24 UTC 2010
Modified Files:
src/tests/fs/ffs: t_snapshot.c
Log Message:
move check next to operation
To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/fs/ffs/t_snapshot.c
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/t_snapshot.c
diff -u src/tests/fs/ffs/t_snapshot.c:1.1 src/tests/fs/ffs/t_snapshot.c:1.2
--- src/tests/fs/ffs/t_snapshot.c:1.1 Mon Apr 12 22:58:53 2010
+++ src/tests/fs/ffs/t_snapshot.c Mon Apr 12 23:15:24 2010
@@ -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)