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

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Thu Aug 28 17:00:05 UTC 2008


Author: kelmo-guest
Date: Thu Aug 28 17:00:05 2008
New Revision: 851

URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=851
Log:
Add test_all_keyword() function to run-testsuite to observe the
semantics of using the $all keyword. It is currently a non-fatal
test.

Modified:
    trunk/src/insserv/debian/changelog
    trunk/src/insserv/debian/run-testsuite
    trunk/src/insserv/debian/testsuite-common

Modified: trunk/src/insserv/debian/changelog
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/changelog?rev=851&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Thu Aug 28 17:00:05 2008
@@ -5,8 +5,11 @@
   * Modify 10_nosuse.dpatch to define ISSUSE as -DNOTSUSE instead of unsetting
     it, to avoid fooling the build system.
   * Purge the rc symlinks in initddir_purge() function of testsuite-common.
-
- -- Kel Modderman <kel at otaku42.de>  Fri, 29 Aug 2008 02:04:49 +1000
+  * Add test_all_keyword() function to run-testsuite to observe the
+    semantics of using the $all keyword. It is currently a non-fatal
+    test.
+
+ -- Kel Modderman <kel at otaku42.de>  Fri, 29 Aug 2008 02:56:21 +1000
 
 insserv (1.12.0-2) 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=851&op=diff
==============================================================================
--- trunk/src/insserv/debian/run-testsuite (original)
+++ trunk/src/insserv/debian/run-testsuite Thu Aug 28 17:00:05 2008
@@ -1546,6 +1546,109 @@
 check_script_present S xyz
 check_script_not_present S abc
 check_script_not_present S hjk
+}
+##########################################################################
+test_all_keyword() {
+echo
+echo "info: test behaviour of a script depending on another with the \$all keyword"
+echo "info: #491391"
+echo
+
+initdir_purge
+
+# Insert a few scripts to flesh out $initdir
+for script in one two three
+do
+insertscript $script <<EOF || true
+### BEGIN INIT INFO
+# Provides:          $script
+# Required-Start:    \$remote_fs
+# Required-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:
+### END INIT INFO
+EOF
+done
+
+insertscript four <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          four
+# Required-Start:    $remote_fs
+# Required-Stop:
+# Should-Start:      one two three
+# Should-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:
+### END INIT INFO
+EOF
+
+insertscript rmnologin <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          rmnologin
+# Required-Start:    $remote_fs $all
+# Required-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:
+### END INIT INFO
+EOF
+
+# This version of bootchart LSB info is not the best, but it does reveal
+# an interesting and unexpected behaviour.
+insertscript bootchart <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          bootchart
+# Required-Start:    $remote_fs rmnologin
+# Required-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:
+### END INIT INFO
+EOF
+
+list_rclinks
+
+check_script_present 5 rmnologin
+check_script_present 5 bootchart
+test_order 5 rmnologin bootchart
+
+echo
+echo "info: now add \$all keyword to bootchart script and reinsert"
+echo
+
+remscript bootchart
+# This information looks correct, but due to the way all_links() works two or
+# more scripts with keyword $all in Required-Start start at same sequence, but
+# do start after all other scripts
+addscript bootchart <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          bootchart
+# Required-Start:    $all rmnologin
+# Required-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:
+### END INIT INFO
+EOF
+
+insserv_reg bootchart || true
+
+list_rclinks
+check_script_present 5 bootchart
+test_order 5 rmnologin bootchart
+
+echo
+echo "info: add yet another script depending on \$all"
+echo
+insertscript all <<'EOF' || true
+### BEGIN INIT INFO
+# Provides:          all
+# Required-Start:    $all
+# Required-Stop:
+# Default-Start:     2 3 4 5
+# Default-Stop:
+### END INIT INFO
+EOF
+
+list_rclinks
+check_script_present 5 all
 }
 ##########################################################################
 
@@ -1580,3 +1683,4 @@
 test_no_default_stop
 test_initd_symlink
 test_deterministic_order
+test_all_keyword

Modified: trunk/src/insserv/debian/testsuite-common
URL: http://svn.debian.org/wsvn/initscripts-ng/trunk/src/insserv/debian/testsuite-common?rev=851&op=diff
==============================================================================
--- trunk/src/insserv/debian/testsuite-common (original)
+++ trunk/src/insserv/debian/testsuite-common Thu Aug 28 17:00:05 2008
@@ -207,6 +207,13 @@
     chmod u+w,a+rx $script
 }
 
+remscript ()
+{
+    local scriptname=$1
+    local script=${initddir}/$scriptname
+    rm -f $script
+}
+
 insertscript ()
 {
     local scriptname=$1




More information about the Initscripts-ng-commits mailing list