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

kelmo-guest at users.alioth.debian.org kelmo-guest at users.alioth.debian.org
Fri Sep 12 07:20:14 UTC 2008


Author: kelmo-guest
Date: Fri Sep 12 07:20:13 2008
New Revision: 854

URL: http://svn.debian.org/wsvn/initscripts-ng/?sc=1&rev=854
Log:
Add test_script_in_runlevel() function to expose segfault reported
in #493202.

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=854&op=diff
==============================================================================
--- trunk/src/insserv/debian/changelog (original)
+++ trunk/src/insserv/debian/changelog Fri Sep 12 07:20:13 2008
@@ -10,8 +10,10 @@
   * 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 03:00:20 +1000
+  * Add test_script_in_runlevel() function to expose segfault reported
+    in #493202.
+
+ -- Kel Modderman <kel at otaku42.de>  Fri, 12 Sep 2008 17:19:46 +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=854&op=diff
==============================================================================
--- trunk/src/insserv/debian/run-testsuite (original)
+++ trunk/src/insserv/debian/run-testsuite Fri Sep 12 07:20:13 2008
@@ -1649,6 +1649,48 @@
 
 list_rclinks
 check_script_present 5 all
+}
+##########################################################################
+test_script_in_runlevel() {
+echo
+echo "info: add a bad script where only symlinks should be (#493202)"
+echo
+
+initdir_purge
+
+addscript badboy <<'EOF' || true
+setkeycodes \
+e03b 59 \
+e008 60 \
+e007 61 \
+e03e 62 \
+e03f 63 \
+e040 64 \
+e041 65 \
+e042 66 \
+e043 67 \
+e023 68 \
+e057 87 \
+e058 88
+EOF
+
+# Manually move this script to runlevel position
+mv $initddir/badboy $initddir/../rcS.d/S06badboy
+
+# Insert a real script, make sure bad script do not cause problems
+insertscript goodboy <<'EOF'
+### BEGIN INIT INFO
+# Provides:          goodboy
+# Required-Start:    $remote_fs
+# Required-Stop:
+# Default-Start:     S
+# Default-Stop:
+### END INIT INFO
+EOF
+
+list_rclinks
+
+check_script_present S goodboy
 }
 ##########################################################################
 
@@ -1684,3 +1726,4 @@
 test_initd_symlink
 test_deterministic_order
 test_all_keyword
+test_script_in_runlevel




More information about the Initscripts-ng-commits mailing list