Source-Changes-HG archive

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

[src/trunk]: src/tests/fs/psshfs Add a test for ls, which is just a lazy sche...



details:   https://anonhg.NetBSD.org/src/rev/7e18a8bfa59e
branches:  trunk
changeset: 760499:7e18a8bfa59e
user:      pooka <pooka%NetBSD.org@localhost>
date:      Thu Jan 06 07:28:32 2011 +0000

description:
Add a test for ls, which is just a lazy scheme to have some testing
for puffs_cc(3).

diffstat:

 tests/fs/psshfs/t_psshfs.sh |  40 +++++++++++++++++++++++++++++++++++++++-
 1 files changed, 39 insertions(+), 1 deletions(-)

diffs (59 lines):

diff -r 971c236daf74 -r 7e18a8bfa59e tests/fs/psshfs/t_psshfs.sh
--- a/tests/fs/psshfs/t_psshfs.sh       Thu Jan 06 07:05:51 2011 +0000
+++ b/tests/fs/psshfs/t_psshfs.sh       Thu Jan 06 07:28:32 2011 +0000
@@ -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
 }



Home | Main Index | Thread Index | Old Index