summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scheduler/printers.c2
-rw-r--r--test/4.2-cups-printer-ops.test1
-rwxr-xr-xtest/run-stp-tests.sh35
3 files changed, 34 insertions, 4 deletions
diff --git a/scheduler/printers.c b/scheduler/printers.c
index 81e9ce860..34d887ff9 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, "</Printer>") || _cups_strcasecmp(line, "</DefaultPrinter>"))
+ else if (!_cups_strcasecmp(line, "</Printer>") || !_cups_strcasecmp(line, "</DefaultPrinter>"))
{
if (p != NULL)
{
diff --git a/test/4.2-cups-printer-ops.test b/test/4.2-cups-printer-ops.test
index 022335758..241238281 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 8569bf45f..a9d1afa55 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 "</PRE>" >>$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 "<P>FAIL: $count warning messages, expected 9.</P>" >>$strfile
+ echo "<P>FAIL: $count warning messages, expected 18.</P>" >>$strfile
echo "<PRE>" >>$strfile
$GREP '^W ' $BASE/log/error_log | sed -e '1,$s/&/&amp;/g' -e '1,$s/</&lt;/g' >>$strfile
echo "</PRE>" >>$strfile