[Initscripts-ng-commits] r1040 - in /trunk/src/insserv/debian: changelog run-testsuite
pere at users.alioth.debian.org
pere at users.alioth.debian.org
Sat Nov 7 21:25:21 UTC 2009
Author: pere
Date: Sat Nov 7 21:25:21 2009
New Revision: 1040
URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=1040
Log:
New testsuite code test_undetected_loop to report error when the
loop detection fail to trigger with a loop involving a virtual
facility, as was detected in #554905.
Modified:
trunk/src/insserv/debian/changelog
trunk/src/insserv/debian/run-testsuite
Modified: trunk/src/insserv/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/changelog?rev=1040&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Sat Nov 7 21:25:21 2009
@@ -2,6 +2,9 @@
* Fix typo (loop->look) in previous changelog (Closes: #549286).
Thanks to Josh Triplett.
+ * New testsuite code test_undetected_loop to report error when the
+ loop detection fail to trigger with a loop involving a virtual
+ facility, as was detected in #554905.
-- Petter Reinholdtsen <pere at debian.org> Fri, 02 Oct 2009 07:43:29 +0200
Modified: trunk/src/insserv/debian/run-testsuite
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/run-testsuite?rev=1040&op=diff
==============================================================================
--- trunk/src/insserv/debian/run-testsuite (original)
+++ trunk/src/insserv/debian/run-testsuite Sat Nov 7 21:25:21 2009
@@ -2133,6 +2133,61 @@
# Undo upstart config
insconf="$oldconf"
+}
+##########################################################################
+
+test_undetected_loop() {
+echo
+echo "info: test if insserv detect loop involving virtual facility,"
+echo "info: x-start-before and should-start. Issue detected in BTS"
+echo "info: report #554905."
+echo
+
+initdir_purge
+
+set +C
+cat <<'EOF' > $insconf
+$local_fs mountall
+EOF
+set -C
+
+insertscript hibernate <<EOF
+### BEGIN INIT INFO
+# Provides: hibernate-cleanup
+# Default-Start: S
+# Default-Stop:
+# Required-Start:
+# Required-Stop:
+# Should-Start: udev devfsd raid2 mdadm lvm evms cryptdisks
+# X-Start-Before: mountall
+### END INIT INFO
+EOF
+
+insertscript mountall.sh <<EOF
+### BEGIN INIT INFO
+# Provides: mountall
+# Required-Start:
+# Required-Stop:
+# Default-Start: S
+# Default-Stop:
+# Short-Description: Mount all filesystems.
+### END INIT INFO
+EOF
+
+# Inserting this script should fail, as it introduces a loop
+insertscript mdadm <<EOF || true
+### BEGIN INIT INFO
+# Provides: mdadm
+# Required-Start: $local_fs
+# Required-Stop: $local_fs
+# Default-Start: S
+# Default-Stop:
+### END INIT INFO
+EOF
+
+${severity}_script_not_present S mdadm
+
+list_rclinks
}
##########################################################################
@@ -2176,3 +2231,4 @@
test_insserv_virt_loop
test_local_virtual
test_insserv_upstart
+test_undetected_loop
More information about the Initscripts-ng-commits
mailing list