Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/fs/vfs PR kern/49033: try to provide better diagnostic...
details: https://anonhg.NetBSD.org/src/rev/bb60bff3cb2d
branches: trunk
changeset: 330928:bb60bff3cb2d
user: martin <martin%NetBSD.org@localhost>
date: Fri Jul 25 12:16:22 2014 +0000
description:
PR kern/49033: try to provide better diagnostics if the udf_lookup_complex
test randomly fails.
diffstat:
tests/fs/vfs/t_vnops.c | 35 +++++++++++++++++++++++++++++++++--
1 files changed, 33 insertions(+), 2 deletions(-)
diffs (49 lines):
diff -r c01197aad15e -r bb60bff3cb2d tests/fs/vfs/t_vnops.c
--- a/tests/fs/vfs/t_vnops.c Fri Jul 25 11:51:21 2014 +0000
+++ b/tests/fs/vfs/t_vnops.c Fri Jul 25 12:16:22 2014 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_vnops.c,v 1.39 2014/06/03 11:56:07 njoly Exp $ */
+/* $NetBSD: t_vnops.c,v 1.40 2014/07/25 12:16:22 martin Exp $ */
/*-
* Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -97,7 +97,38 @@
if (rump_sys_stat(pb, &sb2) == -1)
atf_tc_fail_errno("stat 2");
- ATF_REQUIRE(memcmp(&sb1, &sb2, sizeof(sb1)) == 0);
+ if (memcmp(&sb1, &sb2, sizeof(sb1)) != 0) {
+ printf("what\tsb1\t\tsb2\n");
+
+#define FIELD(FN) \
+ printf(#FN "\t%lld\t%lld\n", \
+ (long long)sb1.FN, (long long)sb2.FN)
+#define TIME(FN) \
+ printf(#FN "\t%lld.%ld\t%lld.%ld\n", \
+ (long long)sb1.FN.tv_sec, sb1.FN.tv_nsec, \
+ (long long)sb2.FN.tv_sec, sb2.FN.tv_nsec)
+
+ FIELD(st_dev);
+ FIELD(st_mode);
+ FIELD(st_ino);
+ FIELD(st_nlink);
+ FIELD(st_uid);
+ FIELD(st_gid);
+ FIELD(st_rdev);
+ TIME(st_atim);
+ TIME(st_mtim);
+ TIME(st_ctim);
+ TIME(st_birthtim);
+ FIELD(st_size);
+ FIELD(st_blocks);
+ FIELD(st_flags);
+ FIELD(st_gen);
+
+#undef FIELD
+#undef TIME
+
+ atf_tc_fail("stat results differ, see ouput for more details");
+ }
}
static void
Home |
Main Index |
Thread Index |
Old Index