Bugzilla – Attachment 331340 Details for
Bug 559534
Installing lighttpd patch crashes webyast
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
lighty-webyast-init-test, extended with today's bugs
lighty-webyast-init-test (text/plain), 2.56 KB, created by
Martin Vidner
on 2009-12-07 12:07:10 UTC
(
hide
)
Description:
lighty-webyast-init-test, extended with today's bugs
Filename:
MIME Type:
Creator:
Martin Vidner
Created:
2009-12-07 12:07:10 UTC
Size:
2.56 KB
patch
obsolete
>#! /bin/bash ># testing the fixes for https://bugzilla.novell.com/show_bug.cgi?id=559534 > >LIGHTY=/etc/init.d/lighttpd >WYS=/etc/init.d/yastws >WYC=/etc/init.d/yastwc > >LIGHTY_PID=/var/run/lighttpd.pid >WYS_PID=/var/run/yastws.pid >WYC_PID=/var/run/yastwc.pid > >any_lighty_running() { > pgrep -fl lighttpd >} > >generic_lighty_running() { > pgrep -fl /etc/lighttpd/lighttpd.conf >} > >wys_running() { > pgrep -fl /etc/yastws/lighttpd.conf >} > >wyc_running() { > pgrep -fl /srv/www/yast/config/lighttpd.conf >} > >describe() { > echo "" > echo "$@" > echo "$@" | tr -c "\n" - > echo "" >} > >ASSERT_COUNT=0 ># usage: "assert command args" ># "command args" will be eval'd and must return zero >assert() { > : $((ASSERT_COUNT ++)) > eval "$@" > RET=$? > if [ $RET = 0 ]; then > return > fi > echo "ASSERTION #$ASSERT_COUNT FAILED, exit code $RET for <<$@>>" > pgrep -fl lighttpd > grep . /var/run/{yastw[cs],lighttpd}.pid > exit 1 >} > >assert_three() { > case $1-$2-$3 in > [lL]-[sS]-[cC]) > ;; > *) > echo usage: assert_three [lL] [sS] [cC] > exit 2 > esac > > if [ $1 = l ]; then NOT="!"; else NOT=""; fi > assert $NOT generic_lighty_running > assert $NOT $LIGHTY status > > if [ $2 = s ]; then NOT="!"; else NOT=""; fi > assert $NOT wys_running > assert $NOT $WYS status > > if [ $3 = c ]; then NOT="!"; else NOT=""; fi > assert $NOT wyc_running > assert $NOT $WYC status >} > >assert_just_webyast() { > assert_three l S C >} > >assert_full() { > assert_three L S C >} > >### MAIN ### > >describe "Must be root to run the tests" >assert 'test `id -u` = 0' > >describe "Initially we assume WebYaST is running ang lighty isn't" >assert_just_webyast > >describe "Stopping a non-running light shouldn't kill WebYaST, bnc #559534#c61" >$LIGHTY stop >assert_just_webyast > >describe "Update of lighty shouldn't kill WebYaST, bnc#559534" >$LIGHTY try-restart >assert_just_webyast > >$LIGHTY start >assert_full > >describe "Update of lighty shouldn't kill WebYaST, bnc#559534, in case lighty was running" >$LIGHTY try-restart >assert_full > >describe "WebYaST should realize it is not running, bnc#560302" >$WYS stop >$WYC stop >assert_three L s c > >describe "WebYaST should start even when lighty runs, bnc#560302" >$WYS start >$WYC start >assert_full > >describe "WebYaST should realize it is not running, with stale PIDs, bnc #559534#c62" >kill `cat $WYS_PID` >assert_three L s C >kill `cat $WYC_PID` >assert_three L s c > >describe "WebYaST should start with stale PIDs when lighty runs, bnc #559534#c63" >$WYS start >assert_three L S c >$WYC start >assert_full > >describe "Just getting back to original state" >$LIGHTY stop >assert_just_webyast > >describe TOTAL ASSERTIONS: $ASSERT_COUNT
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
Attachments on
bug 559534
:
330735
|
330736
|
330771
|
330994
|
331020
|
331050
| 331340