[Initscripts-ng-commits] r753 - in /trunk/src/insserv/debian: changelog run-testsuite

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Mon May 19 15:53:53 UTC 2008


Author: kelmo-guest
Date: Mon May 19 15:53:53 2008
New Revision: 753

URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=753
Log:
Add test_adding_start() to expose that adding start levels uncleanly
modifies on disk configuration. Give test_adding_start and
test_adding_stop test script unique names.

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=753&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Mon May 19 15:53:53 2008
@@ -45,8 +45,11 @@
     Start or Default-Stop lsb keywords.
   * Add test_noprovides_header() to show that it is possible to insert script
     missing Provides keyword, and many warnings are exposed as a result.
-
- -- Kel Modderman <kel at otaku42.de>  Tue, 20 May 2008 00:41:15 +1000
+  * Add test_adding_start() to expose that adding start levels uncleanly
+    modifies on disk configuration. Give test_adding_start and
+    test_adding_stop test script unique names.
+
+ -- Kel Modderman <kel at otaku42.de>  Tue, 20 May 2008 01:52:32 +1000
 
 insserv (1.11.0-8) unstable; urgency=low
 

Modified: trunk/src/insserv/debian/run-testsuite
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/run-testsuite?rev=753&op=diff
==============================================================================
--- trunk/src/insserv/debian/run-testsuite (original)
+++ trunk/src/insserv/debian/run-testsuite Mon May 19 15:53:53 2008
@@ -962,38 +962,94 @@
 check_order 0 stopfirst stopafter
 }
 ##########################################################################
-test_adding_stop() {
-echo
-echo "info: Make sure that adding stop levels do not change an existing installation."
-echo
-
-rm -rf $initddir
-mkdir -p $initddir
-
-insertscript testscript <<'EOF' || true
-### BEGIN INIT INFO
-# Provides:          testscript
-# Required-Start:
-# Required-Stop:
-# Default-Start:     S
-# Default-Stop:
-### END INIT INFO
-EOF
-
-check_script_present S testscript
-check_script_not_present 0 testscript
-check_script_not_present 1 testscript
-check_script_not_present 2 testscript
-check_script_not_present 3 testscript
-check_script_not_present 4 testscript
-check_script_not_present 5 testscript
-check_script_not_present 6 testscript
+test_adding_start() {
+echo
+echo "info: Make sure that adding start levels do not change an existing installation."
+echo
+
+rm -rf $initddir
+mkdir -p $initddir
+
+insertscript addstartscript <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          addstartscript
+# Required-Start:
+# Required-Stop:
+# Default-Start:
+# Default-Stop:      0 6
+### END INIT INFO
+EOF
+
+check_script_present 0 addstartscript
+check_script_present 6 addstartscript
+
+check_script_not_present 1 addstartscript
+check_script_not_present 2 addstartscript
+check_script_not_present 3 addstartscript
+check_script_not_present 4 addstartscript
+check_script_not_present 5 addstartscript
 
 # Then change runlevel in existing script
 set +C
-addscript testscript <<'EOF' || true
-### BEGIN INIT INFO
-# Provides:          testscript
+addscript addstartscript <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          addstartscript
+# Required-Start:
+# Required-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:      0 6
+### END INIT INFO
+EOF
+set -C
+
+# Update script after changing the header
+insserv_reg addstartscript || true
+
+list_rclinks
+
+check_script_present 0 addstartscript
+check_script_present 6 addstartscript
+
+check_script_not_present 1 addstartscript
+check_script_not_present 2 addstartscript
+check_script_not_present 3 addstartscript
+check_script_not_present 4 addstartscript
+check_script_not_present 5 addstartscript
+check_script_not_present 6 addstartscript
+}
+##########################################################################
+test_adding_stop() {
+echo
+echo "info: Make sure that adding stop levels do not change an existing installation."
+echo
+
+rm -rf $initddir
+mkdir -p $initddir
+
+insertscript addstopscript <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          addstopscript
+# Required-Start:
+# Required-Stop:
+# Default-Start:     S
+# Default-Stop:
+### END INIT INFO
+EOF
+
+check_script_present S addstopscript
+check_script_not_present 0 addstopscript
+check_script_not_present 1 addstopscript
+check_script_not_present 2 addstopscript
+check_script_not_present 3 addstopscript
+check_script_not_present 4 addstopscript
+check_script_not_present 5 addstopscript
+check_script_not_present 6 addstopscript
+
+# Then change runlevel in existing script
+set +C
+addscript addstopscript <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          addstopscript
 # Required-Start:
 # Required-Stop:
 # Default-Start:     2 3 4 5
@@ -1003,18 +1059,18 @@
 set -C
 
 # Update script after changing the header
-insserv_reg testscript || true
-
-list_rclinks
-
-check_script_present S testscript
-check_script_not_present 0 testscript
-check_script_not_present 1 testscript
-check_script_not_present 2 testscript
-check_script_not_present 3 testscript
-check_script_not_present 4 testscript
-check_script_not_present 5 testscript
-check_script_not_present 6 testscript
+insserv_reg addstopscript || true
+
+list_rclinks
+
+check_script_present S addstopscript
+check_script_not_present 0 addstopscript
+check_script_not_present 1 addstopscript
+check_script_not_present 2 addstopscript
+check_script_not_present 3 addstopscript
+check_script_not_present 4 addstopscript
+check_script_not_present 5 addstopscript
+check_script_not_present 6 addstopscript
 }
 ##########################################################################
 test_duplicate_provides() {
@@ -1277,6 +1333,7 @@
 test_newbug_keepoldorder
 test_start_before
 test_stop_after
+test_adding_start
 test_adding_stop
 test_duplicate_provides
 test_bogus_facility




More information about the Initscripts-ng-commits mailing list