Source-Changes-HG archive

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

[src/trunk]: src/tests/dev/fss Mount the snapshot read-only; otherwise we get...



details:   https://anonhg.NetBSD.org/src/rev/904abd9c0b0d
branches:  trunk
changeset: 346715:904abd9c0b0d
user:      pgoyette <pgoyette%NetBSD.org@localhost>
date:      Fri Jul 29 20:27:37 2016 +0000

description:
Mount the snapshot read-only; otherwise we get a nasty panic.

Re-order the clean-up steps to properly undo what we did.

diffstat:

 tests/dev/fss/t_fss.sh |  10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diffs (38 lines):

diff -r 3f0c9a3db58f -r 904abd9c0b0d tests/dev/fss/t_fss.sh
--- a/tests/dev/fss/t_fss.sh    Fri Jul 29 19:27:45 2016 +0000
+++ b/tests/dev/fss/t_fss.sh    Fri Jul 29 20:27:37 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_fss.sh,v 1.1 2016/07/29 06:13:39 pgoyette Exp $
+# $NetBSD: t_fss.sh,v 1.2 2016/07/29 20:27:37 pgoyette Exp $
 #
 # Copyright (c) 2006, 2007, 2008 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -52,7 +52,7 @@
 # configure and mount a snapshot of the file system
 
        fssconfig -c fss0 ./m1 ./backup
-       mount /dev/fss0 ./m2
+       mount -o rdonly /dev/fss0 ./m2
 
 # Modify the data on the underlying file system
 
@@ -65,15 +65,17 @@
 
 # Unmount our temporary stuff
 
+       umount /dev/fss0        || true
+       fssconfig -u fss0       || true
        umount /dev/vnd0a       || true
-       umount /dev/fss0        || true
+       vndconfig -u vnd0       || true
 }
 
 basic_cleanup() {
        umount /dev/vnd0a       || true
+       fssconfig -u fss0       || true
        umount /dev/fss0        || true
        vndconfig -u vnd0       || true
-       fssconfig -u fss0       || true
 }
 
 atf_init_test_cases()



Home | Main Index | Thread Index | Old Index