From: msweet Date: Mon, 7 Apr 2014 15:18:44 +0000 (+0000) Subject: Root Regression: On restart or checking share box in sys... X-Git-Tag: v2.2b1~670 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=698fa0aa4afef894089053fdb61986aeff2d19a7;p=thirdparty%2Fcups.git Root Regression: On restart or checking share box in sys pref printer uri changes to //dev/null Fix /DefaultPrinter handling. Also add restart testing (just for this specific issue for now) to the "make check" suite. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11798 a1ca3aef-8c08-0410-bb20-df032aa958be --- diff --git a/scheduler/printers.c b/scheduler/printers.c index 81e9ce8607..34d887ff99 100644 --- a/scheduler/printers.c +++ b/scheduler/printers.c @@ -885,7 +885,7 @@ cupsdLoadAllPrinters(void) cupsdLogMessage(CUPSD_LOG_ERROR, "Syntax error on line %d of printers.conf.", linenum); } - else if (!_cups_strcasecmp(line, "") || _cups_strcasecmp(line, "")) + else if (!_cups_strcasecmp(line, "") || !_cups_strcasecmp(line, "")) { if (p != NULL) { diff --git a/test/4.2-cups-printer-ops.test b/test/4.2-cups-printer-ops.test index 022335758c..241238281c 100644 --- a/test/4.2-cups-printer-ops.test +++ b/test/4.2-cups-printer-ops.test @@ -204,6 +204,7 @@ ATTR uri device-uri file:/tmp/Test1 ATTR enum printer-state 3 ATTR boolean printer-is-accepting-jobs true + ATTR text printer-info "Test Printer 1" FILE testps.ppd diff --git a/test/run-stp-tests.sh b/test/run-stp-tests.sh index 8569bf45f3..a9d1afa553 100755 --- a/test/run-stp-tests.sh +++ b/test/run-stp-tests.sh @@ -766,6 +766,35 @@ for file in 5*.sh; do fi done +# +# Restart the server... +# + +echo $ac_n "Performing restart test: $ac_c" +echo "" >>$strfile +echo "\"5.10-restart\":" >>$strfile + +kill -HUP $cupsd + +while true; do + running=`../systemv/lpstat -r 2>/dev/null` + if test "x$running" = "xscheduler is running"; then + break + fi + + sleep 10 +done + +description="`lpstat -l -p Test1 | grep Description | sed -e '1,$s/^[^:]*: //g'`" +if test "x$description" != "xTest Printer 1"; then + echo "Failed, printer-info for Test1 is '$description', expected 'Test Printer 1'." >>$strfile + echo "FAIL (got '$description', expected 'Test Printer 1')" + fail=`expr $fail + 1` +else + echo "Passed." >>$strfile + echo PASS +fi + echo "" >>$strfile # @@ -924,10 +953,10 @@ fi # Warning log messages count=`$GREP '^W ' $BASE/log/error_log | $GREP -v CreateProfile | wc -l | awk '{print $1}'` -if test $count != 9; then - echo "FAIL: $count warning messages, expected 9." +if test $count != 18; then + echo "FAIL: $count warning messages, expected 18." $GREP '^W ' $BASE/log/error_log - echo "

FAIL: $count warning messages, expected 9.

" >>$strfile + echo "

FAIL: $count warning messages, expected 18.

" >>$strfile echo "
" >>$strfile
 	$GREP '^W ' $BASE/log/error_log | sed -e '1,$s/&/&/g' -e '1,$s/>$strfile
 	echo "
" >>$strfile