CVS commit: src/tests/fs/psshfs
Module Name:src Committed By: christos Date: Wed May 24 15:29:51 UTC 2017 Modified Files: src/tests/fs/psshfs: t_psshfs.sh Log Message: give it more time. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/tests/fs/psshfs/t_psshfs.sh 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/psshfs/t_psshfs.sh diff -u src/tests/fs/psshfs/t_psshfs.sh:1.8 src/tests/fs/psshfs/t_psshfs.sh:1.9 --- src/tests/fs/psshfs/t_psshfs.sh:1.8 Mon Sep 5 04:53:57 2016 +++ src/tests/fs/psshfs/t_psshfs.sh Wed May 24 11:29:51 2017 @@ -1,4 +1,4 @@ -# $NetBSD: t_psshfs.sh,v 1.8 2016/09/05 08:53:57 christos Exp $ +# $NetBSD: t_psshfs.sh,v 1.9 2017/05/24 15:29:51 christos Exp $ # # Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -267,7 +267,7 @@ read_empty_file_head() { atf_set "descr" "Checks whether an empty file can be read" # This test is supposed to make sure psshfs does not hang # when reading from an empty file, hence the timeout. - atf_set "timeout" 8 + atf_set "timeout" 60 } read_empty_file_body() { require_puffs
CVS commit: src/tests/fs/psshfs
Module Name:src Committed By: christos Date: Mon May 22 21:22:30 UTC 2017 Modified Files: src/tests/fs/psshfs: sshd_config.in Log Message: there is no more UsePrivilegeSeparation To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/fs/psshfs/sshd_config.in 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/psshfs/sshd_config.in diff -u src/tests/fs/psshfs/sshd_config.in:1.2 src/tests/fs/psshfs/sshd_config.in:1.3 --- src/tests/fs/psshfs/sshd_config.in:1.2 Fri Feb 11 08:19:46 2011 +++ src/tests/fs/psshfs/sshd_config.in Mon May 22 17:22:30 2017 @@ -1,4 +1,4 @@ -# $NetBSD: sshd_config.in,v 1.2 2011/02/11 13:19:46 pooka Exp $ +# $NetBSD: sshd_config.in,v 1.3 2017/05/22 21:22:30 christos Exp $ # Basic settings. Port 1 @@ -23,7 +23,6 @@ StrictModes no PidFile @WORKDIR@/sshd.pid Subsystem sftp @WORKDIR@/sftp-server UsePam no -UsePrivilegeSeparation no # The root user should also be able to run the tests. PermitRootLogin yes
CVS commit: src/tests/fs/psshfs
Module Name:src Committed By: christos Date: Mon Sep 5 08:53:57 UTC 2016 Modified Files: src/tests/fs/psshfs: t_psshfs.sh Log Message: PR/51461: Mateusz Poszwa: Processes hang when attempting to read from an empty file on psshfs mount, add unit test: When a process attempts to read from an empty file originating from psshfs mount, it waits indefinitely. Until the hanged process is interrupted, the mounted filesystem appears to work as expected, except for the directory containing the empty file. Processes trying to list that directory also hang, and cause misbehaviour of the containing directory. It is possible to create a chain of hanged processes trying to read directories up to the mount point. At the same time, psshfs generates some network traffic (around 5KB/s, in my case). Interrupting the first hanged process causes emission of an error message by all other hanged processes, and psshfs ceases to generate network traffic. Subsequent trials to list any affected directory or if one of the affected directories is the mount point to unmount the filesystem, fail with the same error. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/tests/fs/psshfs/t_psshfs.sh 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/psshfs/t_psshfs.sh diff -u src/tests/fs/psshfs/t_psshfs.sh:1.7 src/tests/fs/psshfs/t_psshfs.sh:1.8 --- src/tests/fs/psshfs/t_psshfs.sh:1.7 Sat Mar 16 03:54:04 2013 +++ src/tests/fs/psshfs/t_psshfs.sh Mon Sep 5 04:53:57 2016 @@ -1,4 +1,4 @@ -# $NetBSD: t_psshfs.sh,v 1.7 2013/03/16 07:54:04 jmmv Exp $ +# $NetBSD: t_psshfs.sh,v 1.8 2016/09/05 08:53:57 christos Exp $ # # Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -262,6 +262,26 @@ setattr_cache_cleanup() { stop_ssh } +atf_test_case read_empty_file cleanup +read_empty_file_head() { + atf_set "descr" "Checks whether an empty file can be read" + # This test is supposed to make sure psshfs does not hang + # when reading from an empty file, hence the timeout. + atf_set "timeout" 8 +} +read_empty_file_body() { + require_puffs + start_ssh + atf_check mkdir root mnt + atf_check -x ': > root/empty' + mount_psshfs root mnt + atf_check cat mnt/empty +} +read_empty_file_cleanup() { + umount mnt + stop_ssh +} + # - # Initialization. # - @@ -271,4 +291,5 @@ atf_init_test_cases() { atf_add_test_case pwd atf_add_test_case ls #atf_add_test_case setattr_cache + atf_add_test_case read_empty_file }
CVS commit: src/tests/fs/psshfs
Module Name:src Committed By: jmmv Date: Sat Mar 16 07:54:04 UTC 2013 Modified Files: src/tests/fs/psshfs: t_psshfs.sh Log Message: Use /bin/sh for a temporary script instead of querying the name of the shell from atf-config. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/tests/fs/psshfs/t_psshfs.sh 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/psshfs/t_psshfs.sh diff -u src/tests/fs/psshfs/t_psshfs.sh:1.6 src/tests/fs/psshfs/t_psshfs.sh:1.7 --- src/tests/fs/psshfs/t_psshfs.sh:1.6 Fri Aug 12 04:14:00 2011 +++ src/tests/fs/psshfs/t_psshfs.sh Sat Mar 16 07:54:04 2013 @@ -1,4 +1,4 @@ -# $NetBSD: t_psshfs.sh,v 1.6 2011/08/12 04:14:00 riastradh Exp $ +# $NetBSD: t_psshfs.sh,v 1.7 2013/03/16 07:54:04 jmmv Exp $ # # Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -145,7 +145,7 @@ inode_nos_body() { touch root/file4 cat >ne_inodes.sh <
CVS commit: src/tests/fs/psshfs
Module Name:src Committed By: pooka Date: Thu Mar 31 12:56:04 UTC 2011 Modified Files: src/tests/fs/psshfs: t_psshfs.sh Log Message: Make sure test doesn't pass if file system could not be read at all. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/fs/psshfs/t_psshfs.sh 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/psshfs/t_psshfs.sh diff -u src/tests/fs/psshfs/t_psshfs.sh:1.4 src/tests/fs/psshfs/t_psshfs.sh:1.5 --- src/tests/fs/psshfs/t_psshfs.sh:1.4 Fri Feb 11 13:19:46 2011 +++ src/tests/fs/psshfs/t_psshfs.sh Thu Mar 31 12:56:03 2011 @@ -1,4 +1,4 @@ -# $NetBSD: t_psshfs.sh,v 1.4 2011/02/11 13:19:46 pooka Exp $ +# $NetBSD: t_psshfs.sh,v 1.5 2011/03/31 12:56:03 pooka Exp $ # # Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -150,7 +150,10 @@ # Compares the inodes of the two given files and returns true if they are # different; false otherwise. # -test \$(stat -f %i \${1}) -ne \$(stat -f %i \${2}) +set -e +ino1=\$(stat -f %i \${1}) +ino2=\$(stat -f %i \${2}) +test \${ino1} -ne \${ino2} EOF chmod +x ne_inodes.sh
CVS commit: src/tests/fs/psshfs
Module Name:src Committed By: pooka Date: Fri Feb 11 13:19:46 UTC 2011 Modified Files: src/tests/fs/psshfs: sshd_config.in t_psshfs.sh Log Message: Use sshd's pidfile instead of $! and wait for the pidfile to appear. This plugs a race condition where sshd did not have a chance to open a sucket before we attempted to connect to it. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/fs/psshfs/sshd_config.in cvs rdiff -u -r1.3 -r1.4 src/tests/fs/psshfs/t_psshfs.sh 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/psshfs/sshd_config.in diff -u src/tests/fs/psshfs/sshd_config.in:1.1 src/tests/fs/psshfs/sshd_config.in:1.2 --- src/tests/fs/psshfs/sshd_config.in:1.1 Tue Jul 6 14:06:22 2010 +++ src/tests/fs/psshfs/sshd_config.in Fri Feb 11 13:19:46 2011 @@ -1,4 +1,4 @@ -# $NetBSD: sshd_config.in,v 1.1 2010/07/06 14:06:22 pooka Exp $ +# $NetBSD: sshd_config.in,v 1.2 2011/02/11 13:19:46 pooka Exp $ # Basic settings. Port 1 @@ -20,7 +20,7 @@ StrictModes no # Some settings to allow user runs of sshd. -PidFile @WORKDIR@/sshd.pid.2 +PidFile @WORKDIR@/sshd.pid Subsystem sftp @WORKDIR@/sftp-server UsePam no UsePrivilegeSeparation no Index: src/tests/fs/psshfs/t_psshfs.sh diff -u src/tests/fs/psshfs/t_psshfs.sh:1.3 src/tests/fs/psshfs/t_psshfs.sh:1.4 --- src/tests/fs/psshfs/t_psshfs.sh:1.3 Thu Jan 6 07:28:32 2011 +++ src/tests/fs/psshfs/t_psshfs.sh Fri Feb 11 13:19:46 2011 @@ -1,4 +1,4 @@ -# $NetBSD: t_psshfs.sh,v 1.3 2011/01/06 07:28:32 pooka Exp $ +# $NetBSD: t_psshfs.sh,v 1.4 2011/02/11 13:19:46 pooka Exp $ # # Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -80,8 +80,10 @@ atf_check -s eq:0 -o empty -e empty chmod 400 ssh_host_key atf_check -s eq:0 -o empty -e empty chmod 444 ssh_host_key.pub - /usr/sbin/sshd -e -D -f ./sshd_config >sshd.log 2>&1 & - echo $! >sshd.pid + /usr/sbin/sshd -e -f ./sshd_config >sshd.log 2>&1 & + while [ ! -f sshd.pid ]; do + sleep 0.01 + done echo "SSH server started (pid $(cat sshd.pid))" echo "Setting up SSH client configuration"
CVS commit: src/tests/fs/psshfs
Module Name:src Committed By: pooka Date: Thu Jan 6 07:28:32 UTC 2011 Modified Files: src/tests/fs/psshfs: t_psshfs.sh Log Message: Add a test for ls, which is just a lazy scheme to have some testing for puffs_cc(3). To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/fs/psshfs/t_psshfs.sh 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/psshfs/t_psshfs.sh diff -u src/tests/fs/psshfs/t_psshfs.sh:1.2 src/tests/fs/psshfs/t_psshfs.sh:1.3 --- src/tests/fs/psshfs/t_psshfs.sh:1.2 Sun Nov 7 17:51:18 2010 +++ src/tests/fs/psshfs/t_psshfs.sh Thu Jan 6 07:28:32 2011 @@ -1,4 +1,4 @@ -# $NetBSD: t_psshfs.sh,v 1.2 2010/11/07 17:51:18 jmmv Exp $ +# $NetBSD: t_psshfs.sh,v 1.3 2011/01/06 07:28:32 pooka Exp $ # # Copyright (c) 2007, 2008 The NetBSD Foundation, Inc. # All rights reserved. @@ -193,6 +193,43 @@ stop_ssh } +atf_test_case ls cleanup +ls_head() { + atf_set "descr" "Uses ls, attempts to exercise puffs_cc" +} +ls_body() { + require_puffs + + start_ssh + + mkdir mnt + mkdir root + mkdir root/dir + touch root/dir/file1 + touch root/dir/file2 + touch root/file3 + touch root/file4 + + mount_psshfs root mnt + + ls -l mnt & + + IFS=' ' +lsout='dir +file3 +file4 + +mnt/dir: +file1 +file2 +' + atf_check -s exit:0 -o inline:"$lsout" ls -R mnt +} +ls_cleanup() { + umount mnt + stop_ssh +} + # - # Initialization. # - @@ -200,4 +237,5 @@ atf_init_test_cases() { atf_add_test_case inode_nos atf_add_test_case pwd + atf_add_test_case ls }
CVS commit: src/tests/fs/psshfs
Module Name:src Committed By: pooka Date: Tue Jul 6 16:44:26 UTC 2010 Modified Files: src/tests/fs/psshfs: Makefile Log Message: fix TESTSDIR To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/fs/psshfs/Makefile 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/psshfs/Makefile diff -u src/tests/fs/psshfs/Makefile:1.1 src/tests/fs/psshfs/Makefile:1.2 --- src/tests/fs/psshfs/Makefile:1.1 Tue Jul 6 14:06:22 2010 +++ src/tests/fs/psshfs/Makefile Tue Jul 6 16:44:26 2010 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile,v 1.1 2010/07/06 14:06:22 pooka Exp $ +# $NetBSD: Makefile,v 1.2 2010/07/06 16:44:26 pooka Exp $ -TESTSDIR= ${TESTSBASE}/fs/puffs +TESTSDIR= ${TESTSBASE}/fs/psshfs PROGS= h_have_puffs SRCS.h_have_puffs= h_have_puffs.c