Module Name:    src
Committed By:   tls
Date:           Sun Aug 10 06:57:08 UTC 2014

Modified Files:
        src/tests/fs [tls-earlyentropy]: Makefile
        src/tests/fs/kernfs [tls-earlyentropy]: Makefile
        src/tests/fs/msdosfs [tls-earlyentropy]: t_snapshot.c
        src/tests/fs/nfs [tls-earlyentropy]: Makefile
        src/tests/fs/nfs/nfsservice [tls-earlyentropy]: rumpnfsd.c
        src/tests/fs/nullfs [tls-earlyentropy]: Makefile
        src/tests/fs/ptyfs [tls-earlyentropy]: Makefile
        src/tests/fs/puffs [tls-earlyentropy]: Makefile
        src/tests/fs/umapfs [tls-earlyentropy]: Makefile
        src/tests/fs/union [tls-earlyentropy]: Makefile
        src/tests/fs/vfs [tls-earlyentropy]: t_renamerace.c t_vnops.c
Added Files:
        src/tests/fs/cd9660 [tls-earlyentropy]: Makefile pr_48787.image.bz2.uue
            t_high_ino_big_file.sh

Log Message:
Rebase.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.22.16.1 src/tests/fs/Makefile
cvs rdiff -u -r0 -r1.1.4.2 src/tests/fs/cd9660/Makefile \
    src/tests/fs/cd9660/pr_48787.image.bz2.uue
cvs rdiff -u -r0 -r1.4.2.2 src/tests/fs/cd9660/t_high_ino_big_file.sh
cvs rdiff -u -r1.3 -r1.3.22.1 src/tests/fs/kernfs/Makefile
cvs rdiff -u -r1.2 -r1.2.6.1 src/tests/fs/msdosfs/t_snapshot.c
cvs rdiff -u -r1.8 -r1.8.8.1 src/tests/fs/nfs/Makefile
cvs rdiff -u -r1.7 -r1.7.20.1 src/tests/fs/nfs/nfsservice/rumpnfsd.c
cvs rdiff -u -r1.3 -r1.3.22.1 src/tests/fs/nullfs/Makefile
cvs rdiff -u -r1.4 -r1.4.18.1 src/tests/fs/ptyfs/Makefile
cvs rdiff -u -r1.13 -r1.13.22.1 src/tests/fs/puffs/Makefile
cvs rdiff -u -r1.3 -r1.3.22.1 src/tests/fs/umapfs/Makefile
cvs rdiff -u -r1.3 -r1.3.22.1 src/tests/fs/union/Makefile
cvs rdiff -u -r1.30 -r1.30.2.1 src/tests/fs/vfs/t_renamerace.c
cvs rdiff -u -r1.38 -r1.38.2.1 src/tests/fs/vfs/t_vnops.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/Makefile
diff -u src/tests/fs/Makefile:1.22 src/tests/fs/Makefile:1.22.16.1
--- src/tests/fs/Makefile:1.22	Wed Dec 21 00:17:06 2011
+++ src/tests/fs/Makefile	Sun Aug 10 06:57:07 2014
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.22 2011/12/21 00:17:06 christos Exp $
+# $NetBSD: Makefile,v 1.22.16.1 2014/08/10 06:57:07 tls Exp $
 
 .include <bsd.own.mk>
 
@@ -8,7 +8,7 @@ SUBDIR+= 	common .WAIT
 
 TESTS_SUBDIRS+=	ffs fifofs hfs kernfs lfs msdosfs nfs nullfs psshfs ptyfs puffs
 TESTS_SUBDIRS+=	tmpfs umapfs union
-TESTS_SUBDIRS+=	vfs
+TESTS_SUBDIRS+=	vfs cd9660
 
 .if ${MKZFS} != "no"
 TESTS_SUBDIRS+=	zfs

Index: src/tests/fs/kernfs/Makefile
diff -u src/tests/fs/kernfs/Makefile:1.3 src/tests/fs/kernfs/Makefile:1.3.22.1
--- src/tests/fs/kernfs/Makefile:1.3	Tue Jun  8 10:43:40 2010
+++ src/tests/fs/kernfs/Makefile	Sun Aug 10 06:57:07 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2010/06/08 10:43:40 pooka Exp $
+#	$NetBSD: Makefile,v 1.3.22.1 2014/08/10 06:57:07 tls Exp $
 #
 
 TESTSDIR=	${TESTSBASE}/fs/kernfs
@@ -9,6 +9,6 @@ TESTS_C=	t_basic
 .include <bsd.own.mk>
 
 LDADD+=	-lrumpfs_kernfs						# fs driver
-LDADD+=	-lrumpvfs -lrump -lrumpuser -lpthread			# base
+LDADD+=	-lrumpvfs -lrump -lrumpuser -lrump -lpthread		# base
 
 .include <bsd.test.mk>

Index: src/tests/fs/msdosfs/t_snapshot.c
diff -u src/tests/fs/msdosfs/t_snapshot.c:1.2 src/tests/fs/msdosfs/t_snapshot.c:1.2.6.1
--- src/tests/fs/msdosfs/t_snapshot.c:1.2	Wed Feb  6 09:05:01 2013
+++ src/tests/fs/msdosfs/t_snapshot.c	Sun Aug 10 06:57:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_snapshot.c,v 1.2 2013/02/06 09:05:01 hannken Exp $	*/
+/*	$NetBSD: t_snapshot.c,v 1.2.6.1 2014/08/10 06:57:07 tls Exp $	*/
 
 #include <sys/types.h>
 #include <sys/mount.h>
@@ -40,9 +40,7 @@ mount_diskfs(const char *fspec, const ch
 static void
 begin(void)
 {
-	struct tmpfs_args targs;
-
-	targs.ta_version = TMPFS_ARGS_VERSION;
+	struct tmpfs_args targs = { .ta_version = TMPFS_ARGS_VERSION, };
 
 	if (rump_sys_mkdir("/stor", 0777) == -1)
 		atf_tc_fail_errno("mkdir /stor");

Index: src/tests/fs/nfs/Makefile
diff -u src/tests/fs/nfs/Makefile:1.8 src/tests/fs/nfs/Makefile:1.8.8.1
--- src/tests/fs/nfs/Makefile:1.8	Fri Feb 24 13:53:46 2012
+++ src/tests/fs/nfs/Makefile	Sun Aug 10 06:57:07 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8 2012/02/24 13:53:46 joerg Exp $
+#	$NetBSD: Makefile,v 1.8.8.1 2014/08/10 06:57:07 tls Exp $
 #
 
 .include <bsd.own.mk>
@@ -22,7 +22,7 @@ LDADD+=-lrumpfs_ffs -lrumpvfs           
 LDADD+=-lrumpdev_disk -lrumpdev                                 # disk device
 LDADD+=-lrumpnet_shmif 						# shmif
 LDADD+=-lrumpnet_netinet -lrumpnet_net -lrumpnet
-LDADD+=-lrump -lrumpuser -lpthread                    		# base
+LDADD+=-lrump -lrumpuser -lrump -lpthread             		# base
 
 LDADD+=-lutil
 

Index: src/tests/fs/nfs/nfsservice/rumpnfsd.c
diff -u src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.7 src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.7.20.1
--- src/tests/fs/nfs/nfsservice/rumpnfsd.c:1.7	Mon Feb 28 21:21:14 2011
+++ src/tests/fs/nfs/nfsservice/rumpnfsd.c	Sun Aug 10 06:57:07 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: rumpnfsd.c,v 1.7 2011/02/28 21:21:14 pooka Exp $	*/
+/*	$NetBSD: rumpnfsd.c,v 1.7.20.1 2014/08/10 06:57:07 tls Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -95,9 +95,10 @@ main(int argc, char *argv[])
 	}
 
 	/* mini-mtree for mountd */
-	rump_sys_mkdir("/var", 0777);
-	rump_sys_mkdir("/var/run", 0777);
-	rump_sys_mkdir("/var/db", 0777);
+	static const char *const dirs[] = { "/var", "/var/run", "/var/db" };
+	for (size_t i = 0; i < __arraycount(dirs); i++)
+		if (rump_sys_mkdir(dirs[i], 0777) == -1)
+			err(1, "can't mkdir `%s'", dirs[i]);
 
 	if (ffs_fstest_newfs(NULL, &fsarg,
 	    imagename, FSTEST_IMGSIZE, NULL) != 0)

Index: src/tests/fs/nullfs/Makefile
diff -u src/tests/fs/nullfs/Makefile:1.3 src/tests/fs/nullfs/Makefile:1.3.22.1
--- src/tests/fs/nullfs/Makefile:1.3	Sat Apr 10 21:33:01 2010
+++ src/tests/fs/nullfs/Makefile	Sun Aug 10 06:57:07 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2010/04/10 21:33:01 pooka Exp $
+#	$NetBSD: Makefile,v 1.3.22.1 2014/08/10 06:57:07 tls Exp $
 #
 
 TESTSDIR=	${TESTSBASE}/fs/nullfs
@@ -7,6 +7,6 @@ WARNS=		4
 TESTS_C=	t_basic
 
 LDADD+=	-lrumpfs_tmpfs -lrumpfs_null -lrumpvfs_layerfs		# fs drivers
-LDADD+=	-lrumpvfs -lrump -lrumpuser -lpthread			# base
+LDADD+=	-lrumpvfs -lrump -lrumpuser -lrump -lpthread		# base
 
 .include <bsd.test.mk>

Index: src/tests/fs/ptyfs/Makefile
diff -u src/tests/fs/ptyfs/Makefile:1.4 src/tests/fs/ptyfs/Makefile:1.4.18.1
--- src/tests/fs/ptyfs/Makefile:1.4	Thu Oct 13 17:23:29 2011
+++ src/tests/fs/ptyfs/Makefile	Sun Aug 10 06:57:07 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2011/10/13 17:23:29 plunky Exp $
+#	$NetBSD: Makefile,v 1.4.18.1 2014/08/10 06:57:07 tls Exp $
 #
 
 TESTSDIR=	${TESTSBASE}/fs/ptyfs
@@ -9,7 +9,7 @@ TESTS_C+=	t_nullpts
 
 LDADD+=	-lrumpfs_ptyfs						# fs drivers
 LDADD+=	-lrumpkern_tty						# tty support
-LDADD+=	-lrumpvfs -lrump -lrumpuser -lpthread			# base
+LDADD+=	-lrumpvfs -lrump -lrumpuser -lrump -lpthread		# base
 
 LDADD.t_nullpts+= -lrumpfs_null -lrumpvfs_layerfs
 

Index: src/tests/fs/puffs/Makefile
diff -u src/tests/fs/puffs/Makefile:1.13 src/tests/fs/puffs/Makefile:1.13.22.1
--- src/tests/fs/puffs/Makefile:1.13	Fri Nov 12 17:35:34 2010
+++ src/tests/fs/puffs/Makefile	Sun Aug 10 06:57:08 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.13 2010/11/12 17:35:34 pooka Exp $
+#	$NetBSD: Makefile,v 1.13.22.1 2014/08/10 06:57:08 tls Exp $
 #
 
 .include <bsd.own.mk>
@@ -18,7 +18,7 @@ LDADD+=		-lrumpdev_putter -lrumpdev
 LDADD+=		-lrumpfs_syspuffs -lrumpvfs_fifofs
 LDADD+=		-lrumpnet_local -lrumpnet_net -lrumpnet
 LDADD+=		-lrumpvfs
-LDADD+=		-lrump -lrumpuser -lpthread
+LDADD+=		-lrump -lrumpuser -lrump -lpthread
 
 # required by -DPUFFSDUMP
 #LDADD+= 	-lpuffs -lutil

Index: src/tests/fs/umapfs/Makefile
diff -u src/tests/fs/umapfs/Makefile:1.3 src/tests/fs/umapfs/Makefile:1.3.22.1
--- src/tests/fs/umapfs/Makefile:1.3	Sun Apr 11 05:45:57 2010
+++ src/tests/fs/umapfs/Makefile	Sun Aug 10 06:57:08 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2010/04/11 05:45:57 pooka Exp $
+#	$NetBSD: Makefile,v 1.3.22.1 2014/08/10 06:57:08 tls Exp $
 #
 
 TESTSDIR=	${TESTSBASE}/fs/umapfs
@@ -7,6 +7,6 @@ WARNS=		4
 TESTS_C=	t_basic
 
 LDADD+=	-lrumpfs_tmpfs -lrumpfs_umap -lrumpvfs_layerfs		# fs drivers
-LDADD+=	-lrumpvfs -lrump -lrumpuser -lpthread			# base
+LDADD+=	-lrumpvfs -lrump -lrumpuser -lrump -lpthread		# base
 
 .include <bsd.test.mk>

Index: src/tests/fs/union/Makefile
diff -u src/tests/fs/union/Makefile:1.3 src/tests/fs/union/Makefile:1.3.22.1
--- src/tests/fs/union/Makefile:1.3	Wed Jan 12 21:13:26 2011
+++ src/tests/fs/union/Makefile	Sun Aug 10 06:57:08 2014
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.3 2011/01/12 21:13:26 pooka Exp $
+#	$NetBSD: Makefile,v 1.3.22.1 2014/08/10 06:57:08 tls Exp $
 #
 
 TESTSDIR=	${TESTSBASE}/fs/union
@@ -8,6 +8,6 @@ TESTS_C=	t_pr
 
 LDADD+=	-lrumpfs_union -lrumpvfs_layerfs -lrumpfs_ffs		# fs drivers
 LDADD+=	-lrumpdev_disk -lrumpdev				# disk device
-LDADD+=	-lrumpvfs -lrump -lrumpuser -lpthread			# base
+LDADD+=	-lrumpvfs -lrump -lrumpuser -lrump -lpthread		# base
 
 .include <bsd.test.mk>

Index: src/tests/fs/vfs/t_renamerace.c
diff -u src/tests/fs/vfs/t_renamerace.c:1.30 src/tests/fs/vfs/t_renamerace.c:1.30.2.1
--- src/tests/fs/vfs/t_renamerace.c:1.30	Thu Jan  9 13:23:57 2014
+++ src/tests/fs/vfs/t_renamerace.c	Sun Aug 10 06:57:08 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_renamerace.c,v 1.30 2014/01/09 13:23:57 hannken Exp $	*/
+/*	$NetBSD: t_renamerace.c,v 1.30.2.1 2014/08/10 06:57:08 tls Exp $	*/
 
 /*
  * Modified for rump and atf from a program supplied
@@ -101,9 +101,8 @@ renamerace(const atf_tc_t *tc, const cha
 		atf_tc_skip("filesystem has not enough inodes");
 	if (FSTYPE_RUMPFS(tc))
 		atf_tc_skip("rename not supported by file system");
-
 	if (FSTYPE_UDF(tc))
-		atf_tc_expect_fail("Test expected to fail");
+		atf_tc_expect_fail("PR kern/49046");
 
 	RZ(rump_pub_lwproc_rfork(RUMP_RFCFDG));
 	RL(wrkpid = rump_sys_getpid());
@@ -124,6 +123,9 @@ renamerace(const atf_tc_t *tc, const cha
 		pthread_join(pt2[i], NULL);
 	RL(rump_sys_chdir("/"));
 
+	if (FSTYPE_UDF(tc))
+		atf_tc_fail("race did not trigger this time");
+
 	if (FSTYPE_MSDOS(tc)) {
 		atf_tc_expect_fail("PR kern/44661");
 		/*
@@ -149,9 +151,6 @@ renamerace_dirs(const atf_tc_t *tc, cons
 	if (FSTYPE_RUMPFS(tc))
 		atf_tc_skip("rename not supported by file system");
 
-	if (FSTYPE_UDF(tc))
-		atf_tc_expect_fail("Test expected to fail");
-
 	/* XXX: msdosfs also sometimes hangs */
 	if (FSTYPE_MSDOS(tc))
 		atf_tc_expect_signal(-1, "PR kern/43626");

Index: src/tests/fs/vfs/t_vnops.c
diff -u src/tests/fs/vfs/t_vnops.c:1.38 src/tests/fs/vfs/t_vnops.c:1.38.2.1
--- src/tests/fs/vfs/t_vnops.c:1.38	Sat Oct 19 17:45:00 2013
+++ src/tests/fs/vfs/t_vnops.c	Sun Aug 10 06:57:08 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_vnops.c,v 1.38 2013/10/19 17:45:00 christos Exp $	*/
+/*	$NetBSD: t_vnops.c,v 1.38.2.1 2014/08/10 06:57:08 tls Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -97,7 +97,38 @@ lookup_complex(const atf_tc_t *tc, const
 	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
@@ -847,6 +878,30 @@ read_directory(const atf_tc_t *tc, const
 	FSTEST_EXIT();
 }
 
+static void
+lstat_symlink(const atf_tc_t *tc, const char *mp)
+{
+	const char *src, *dst;
+	int res;
+	struct stat st;
+
+	USES_SYMLINKS;
+	FSTEST_ENTER();
+
+	src = "source";
+	dst = "destination";
+
+	res = rump_sys_symlink(src, dst);
+	ATF_REQUIRE(res != -1);
+	res = rump_sys_lstat(dst, &st);
+	ATF_REQUIRE(res != -1);
+
+	ATF_CHECK(S_ISLNK(st.st_mode) != 0);
+	ATF_CHECK(st.st_size == (off_t)strlen(src));
+
+	FSTEST_EXIT();
+}
+
 ATF_TC_FSAPPLY(lookup_simple, "simple lookup (./.. on root)");
 ATF_TC_FSAPPLY(lookup_complex, "lookup of non-dot entries");
 ATF_TC_FSAPPLY(dir_simple, "mkdir/rmdir");
@@ -866,6 +921,7 @@ ATF_TC_FSAPPLY(fcntl_lock, "check fcntl 
 ATF_TC_FSAPPLY(fcntl_getlock_pids,"fcntl F_GETLK w/ many procs, PR kern/44494");
 ATF_TC_FSAPPLY(access_simple, "access(2)");
 ATF_TC_FSAPPLY(read_directory, "read(2) on directories");
+ATF_TC_FSAPPLY(lstat_symlink, "lstat(2) values for symbolic links");
 
 ATF_TP_ADD_TCS(tp)
 {
@@ -888,6 +944,7 @@ ATF_TP_ADD_TCS(tp)
 	ATF_TP_FSAPPLY(fcntl_getlock_pids);
 	ATF_TP_FSAPPLY(access_simple);
 	ATF_TP_FSAPPLY(read_directory);
+	ATF_TP_FSAPPLY(lstat_symlink);
 
 	return atf_no_error();
 }

Added files:

Index: src/tests/fs/cd9660/Makefile
diff -u /dev/null src/tests/fs/cd9660/Makefile:1.1.4.2
--- /dev/null	Sun Aug 10 06:57:08 2014
+++ src/tests/fs/cd9660/Makefile	Sun Aug 10 06:57:07 2014
@@ -0,0 +1,11 @@
+# $NetBSD: Makefile,v 1.1.4.2 2014/08/10 06:57:07 tls Exp $
+
+TESTSDIR=	${TESTSBASE}/fs/cd9660
+WARNS=		4
+FILESDIR=	${TESTSDIR}
+
+TESTS_SH=	t_high_ino_big_file
+FILES=		pr_48787.image.bz2
+UUDECODE_FILES= pr_48787.image.bz2
+
+.include <bsd.test.mk>
Index: src/tests/fs/cd9660/pr_48787.image.bz2.uue
diff -u /dev/null src/tests/fs/cd9660/pr_48787.image.bz2.uue:1.1.4.2
--- /dev/null	Sun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:R'!/%O@*_'(`!@```$$``80":C(5`2U(5`2YB@K),IK(<$\6^`K\<@`&``
+M``00`!A`)J,A4!+4A4!+F*"LDRFLAP3Q;X"OQR``8```!!``&$`FHR%0$M2%
+M0$N8H*R3*:R'!/%O@*_'(`!@```$$``80":C(5`2U(5`2YB@K),IK(<$\6^`
+MK\<@`&````00`!A`)J,A4!+4A4!+F*"LDRFLAP3Q;X"OQR``8```!!``&$`F
+MHR%0$M2%0$N8H*R3*:R'!/%O@*_'(`!@```$$``80":C(5`2U(5`2YB@K),I
+MK(<$\6^`K\<@`&````00`!A`)J,A4!+4A4!+F*"LDRFLAP3Q;X"OQR``8```
+M!!``&$`FHR%0$M2%0$N8H*R3*:R'!/%O@*_'(`!@```$$``80":C(5`2U(5`
+M2YB@K),IK(<$\6^`K\<@`&````00`!A`)J,A4!+4A4!+F*"LDRFLAP3Q;X"O
+MQR``8```!!``&$`FHR%0$M2%0$N8H*R3*:R'!/%O@*_'(`!@```$$``80":C
+M(5`2U(5`2YB@K),IK(<$\6^`K\<@`&````00`!A`)J,A4!+4A4!+F*"LDRFL
+MAP3Q;X"OQR``8```!!``&$`FHR%0$M2%0$N8H*R3*:R'!/%O@*_'(`!@```$
+M$``80":C(5`2U(5`2YB@K),IK(<$\6^`K\<@`&````00`!A`)J,A4!+4A4!+
+MF*"LDRFLAP3Q;X"OQR``8```!!``&$`FHR%0$M2%0$N8H*R3*:R'!/%O@*_'
+M(`!@```$$``80":C(5`2U(5`2YB@K),IK(<$\6^`K\<@`&````00`!A`)J,A
+M4!+4A4!+F*"LDRFLAP3Q;X"OQR``8```!!``&$`FHR%0$M2%0$N8H*R3*:R'
+M!/%O@*_'(`!@```$$``80":C(5`2U(5`2YB@K),IK(<$\6^`K\<@`&````00
+M`!A`)J,A4!+4A4!+F*"LDRFLAP3Q;X"OQR``8```!!``&$`FHR%0$M2%0$N8
+MH*R3*:R'!/%O@*_'(`!@```$$``80":C(5`2U(5`2YB@K),IK(<$\6^`K\<@
+M`&````00`!A`)J,A4!+4A4!+F*"LDRFLAP3Q;X"OQR``8```!!``&$`FHR%0
+M$M2%0$N8H*R3*:R'!/%O@*_'(`!@```$$``80":C(5`2U(5`2YB@K),IK(<$
+M\6^`K\<@`&````00`!A`)J,A4!+4A4!+F*"LDRFLAP3Q;X"OQR``8```!!``
+M&$`FHR%0$M2%0$N8H*R3*:R'!/%O@*_'(`!@```$$``80":C(5`2U(5`2YB@
+MK),IK(<$\6^`K\<@`&````00`!A`)J,A4!+4A4!+F*"LDRFLAP3Q;X"OQR``
+M8```!!``&$`FHR%0$M2%0$N8H*R3*:R'!/%O@*_'(`!@```$$``80":C(5`2
+MU(5`2YB@K),IK(<$\6^`K\<@`&````00`!A`)J,A4!+4A4!+F*"LDRFLAP3Q
+M;X"OQR``8```!!``&$`FHR%0$M2%0$N8H*R3*:R'!/%O@*_'(`!@```$$``8
+M0":C(5`2U(5`2YB@K),IK(<$\6^`K\<@`&````00`!A`)J,A4!+4A4!+F*"L
+MDRFLAP3Q;X"OQR``8```!!``&$`FHR%0$M2%0$N8H*R3*:R'!/%O@*_'(`!@
+M```$$``80":C(5`2U(5`2YB@K),IK(<$\6^`K\<@`&````00`!A`)J,A4!+4
+MA4!+F*"LDRFLAP3Q;X"OQR``8```!!``&$`FHR%0$M2%0$N8H*R3*:R'!/%O
+M@*_'(`!@```$$``80":C(5`2U(5`2YB@K),IK(<$\6^`K\<@`&````00`!A`
+M)J,A4!+4A4!+F*"LDRFLAP3Q;X"OQR``8```!!``&$`FHR%0$M2%0$N8H*R3
+M*:R'!/%O@*_'(`!@```$$``80":C(5`2U(5`2YB@K),IK(<$\6^`K\<@`&``
+M``00`!A`)J,A4!+4A4!+F*"LDRFLAP3Q;X"OQR``8```!!``&$`FHR%0$M2%
+M0$N8H*R3*:R'!/%O@*_'(`!@```$$``80":C(5`2U(5`2YB@K),IK(<$\6^`
+MK\<@`&````00`!A`)J,A4!+4A4!+F*"LDRFLAP3Q;X"OQR``8```!!``&$`F
+MHR%0$M2%0$N8H*R3*:R'!/%O@*_'(`!@```$$``80":C(5`2U(5`2YB@K),I
+MK(<$\6^`K\<@`&````00`!A`)J,A4!+4A4!+F*"LDRFLAP3Q;X"OQR``8```
+M!!``&$`FHR%0$M2%0$N8H*R3*:R'!/%O@*_'(`!@```$$``80":C(5`2U(5`
+M2YB@K),IK(<$\6^`K\<@`&````00`!A`)J,A4!+4A4!+F*"LDRFLAP3Q;X"O
+MQR``8```!!``&$`FHR%0$M2%0$N8H*R3*:R'!/%O@*_'(`!@```$$``80":C
+M(5`2U(5`2YB@K),IK(<$\6^`K\<@`&````00`!A`)J,A4!+4A4!+F*"LDRFL
+MAP3Q;X"OQR``8```!!``&$`FHR%0$M2%0$N8H*R3*:R'!/%O@*_'(`!@```$
+M$``80":C(5`2U(5`2YB@K),IK(<$\6^`K\<@`&````00`!A`)J,A4!+4A4!+
+MF*"LDRFLAP3Q;X"OQR``8```!!``&$`FHR%0$M2%0$N8H*R3*:R'!/%O@*_'
+M(`!@```$$``80":C(5`2U(5`2YB@K),IK(<$\6^`K\<@`&````00`!A`)J,A
+M4!+4A4!+F*"LDRFLAP3Q;X"OQR``8```!!``&$`FHR%0$M2%0$N8H*R3*:R'
+M!/%O@*_'(`!@```$$``80":C(5`2U(5`2YB@K),IK(<$\6^`K\<@`&````00
+M`!A`)J,A4!+4A4!+F*"LDRFLAP3Q;X"OQR``8```!!``&$`FHR%0$M2%0$N8
+MH*R3*:R'!/%O@*_'(`!@```$$``80":C(5`2U(5`2YB@K),IK(KI-J(`.S;_
+M[O_KZIKZ`[_T'_?OL''[3!(R1`(```"`(``A3^1@`6=-9:!3`DD(:)ZC%)Z9
+M33:@>DT]"`>IH&@`#1Z)M3"-#(T#$4:I[4U`/4T-````````````!PT-&31H
+MT::&1D,(`R`&0::``!D#(`D4IZIZ0-`T````````````]&II7`12+EV$9U/B
+MB!*_@T]?CB(F_;A17-%[AD,R8`JV@70VUC,Y6`FQ"$@1<L2$)(`2[M+DHCF`
+M0)`D)8!-P/',(82"IS(@R>@M3"$@0)"3F`Y&Q/<D<N339,\$GB`#`Q1SK=@R
+M<HD1R!2\A(3.H3EOJB05)8.6&%6&J\9CF>$XJBC2?^*)EA9:/'NE+<&E/_K^
+M-Z0($"0E11*I%KQK=*`$'<N+G-F@9[YHI1'6M:8%.$2785901!%"0`U7%A/<
+MPA@I4`8&N@"3L[Y!8V2Y*M8>NO&"YPP%*V4`5T>42;8B[:=M@:9#;@')!UFD
+M8$)CB(&5G68PD`TD`[D"*AV+N\79)G^Q/SOS[CLC2P3T;\WCMH#X(5\++`-#
+ML-+?DXEFS9H@P06,,HP2-X<1W%B*AY`JW`=,R?NG%O?)8;N6134$BXK2#F&&
+M*"8&QUDIX$R\2.;XAFVSP/=K'6.!M8;%=UGWD84CA7$<.IJ0]NS'LEV@J(Q[
+MA='$&9W%-><1MMG8-JCG-DG+D,4"H>!`EJIEKV61?:5TW2M97U?>B%$S@N0G
+M4!Q5$=A,ES!<J\):&C=5);/*T,$9.=>Z%;4P):4`FG@`X=YHB%#"PIU084Y4
+M<J@33)%J*]&*'15=HQ"PK3%#K"--<BB@FF*H%$2]4Y]`\FT7`^32RN'76OEC
+M>@/JFD\8E9G8Y\8:0TJYP'=17J(:!3R>)1/FE%'Z2XBYRI259/935.OC-50:
+M#[&,:!IG0R$A"P8>:89+I+'"&$B")A'5G8B+ZJ14JXH:'.:@IH0&T(0($A+"
+/#6J,VO\7<D4X4)!E$I5"
+`
+end

Index: src/tests/fs/cd9660/t_high_ino_big_file.sh
diff -u /dev/null src/tests/fs/cd9660/t_high_ino_big_file.sh:1.4.2.2
--- /dev/null	Sun Aug 10 06:57:08 2014
+++ src/tests/fs/cd9660/t_high_ino_big_file.sh	Sun Aug 10 06:57:07 2014
@@ -0,0 +1,118 @@
+# $NetBSD: t_high_ino_big_file.sh,v 1.4.2.2 2014/08/10 06:57:07 tls Exp $
+#
+# Copyright (c) 2014 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#    notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#    notice, this list of conditions and the following disclaimer in the
+#    documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+# ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+# TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+# PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+#
+
+# The image used in these tests has been provided by Thomas Schmitt under
+# the following license (see PR kern/48787 for details how to recreate it):
+#
+# Copyright (c) 1999 - 2008, Thomas Schmitt (scdbac...@gmx.net)
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# Redistributions of source code must retain the above copyright notice,
+# this list of conditions and the following disclaimer.
+#
+# Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# Neither the name of Thomas Schmitt nor the names of his contributors
+# may be used to endorse or promote products derived from this software without
+# specific prior written permission. 
+#
+#       THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+#       CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+#       INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+#       MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+#       DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
+#       LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+#       CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+#       PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+#       PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+#       THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+#       (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
+#       USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
+#       DAMAGE. 
+#
+# ------------------------------------------------------------------------
+# This is the BSD license as stated July 22 1999 with
+#  <OWNER>="Thomas Schmitt (scdbac...@gmx.net)",
+#  <ORGANIZATION>="Thomas Schmitt" and <YEAR>="1999"
+# an Open Source license approved by opensource.org
+#
+
+mntpnt=""
+
+atf_test_case pr_kern_48787 cleanup
+pr_kern_48787_head() {
+	atf_set "descr" "Verifies 32bit overflow isssues from PR kern/48787 are fixed"
+	atf_set "require.user" "root"
+	atf_set "require.progs" "rump_cd9660 bunzip2 stat"
+	atf_set "timeout" 6000
+}
+
+pr_kern_48787_body() {
+	avail=$( df -Pk . | awk '{if (NR==2) print $4}' )
+	if [ $avail -lt 4500000 ]; then
+		atf_skip "not enough free disk space, have ${avail} Kbytes, need ~ 4500000 Kbytes"
+	fi
+	bunzip2 < $(atf_get_srcdir)/pr_48787.image.bz2 > pr_48787.image
+	mntpnt=$(pwd)/mnt
+	mkdir ${mntpnt}
+	rump_cd9660 -o norrip ./pr_48787.image ${mntpnt}
+	if [ ! -r ${mntpnt}/small_file ]; then
+		atf_fail "${mntpnt}/small_file does not exist"
+	fi
+	if [ ! -r ${mntpnt}/my/large_file ]; then
+		atf_fail "${mntpnt}/my/large_file does not exist"
+	fi
+	umount ${mntpnt}
+	rump_cd9660 ./pr_48787.image ${mntpnt}
+	if [ ! -r ${mntpnt}/small_file ]; then
+		atf_fail "${mntpnt}/small_file does not exist"
+	fi
+	if [ ! -r ${mntpnt}/my/large_file ]; then
+		atf_fail "${mntpnt}/my/large_file does not exist"
+	fi
+	echo "this assumes current cd9660 inode encoding - adapt on changes"
+	atf_check -o match:"^4329541966$" stat -f "%i" ${mntpnt}/small_file
+	atf_check -o match:"^4329545920$" stat -f "%i" ${mntpnt}/my/large_file
+	umount ${mntpnt}
+	touch "done"
+}
+
+pr_kern_48787_cleanup() {
+	if [ ! -f done ]; then
+		if [ "x${mntpnt}" != "x" ]; then
+			umount -f ${mntpnt} || true
+		fi
+	fi
+}
+
+atf_init_test_cases() {
+	atf_add_test_case pr_kern_48787
+}

Reply via email to