Currently, if a PPD fails validation, it's reported as a generic 'Failed to setup printer error'. If we know cupstestppd rejected the PPD, report it back to the user with as much information as might be helpful.
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform/system_api/+/2060d21131cbddaa506108851c974fd813687495 commit 2060d21131cbddaa506108851c974fd813687495 Author: Sean Kau <skau@chromium.org> Date: Sat Mar 04 01:11:29 2017 system_api: Update constants for Cups operations in debugd Remove the unused CupsAddPrinter opration. Add CupsResult enumeration values to improve error reporting from CupsTool. BUG=chromium:683241. chromium:683254 TEST=compiles on build bots Change-Id: I7b465bfed669020dbb16872cddb7a3f6870a1067 Reviewed-on: https://chromium-review.googlesource.com/448981 Commit-Ready: Sean Kau <skau@chromium.org> Tested-by: Sean Kau <skau@chromium.org> Reviewed-by: Dan Erat <derat@chromium.org> Reviewed-by: Justin Carlson <justincarlson@chromium.org> [modify] https://crrev.com/2060d21131cbddaa506108851c974fd813687495/dbus/debugd/dbus-constants.h
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/third_party/autotest/+/b4cb26a0ed3e6839c065d91d9115e96256003e46 commit b4cb26a0ed3e6839c065d91d9115e96256003e46 Author: Sean Kau <skau@chromium.org> Date: Tue Mar 21 02:30:08 2017 debugd: Add tests for CupsTool operations. Test CupsAddManuallyConfiguredPrinter and CupsAddAutoConfiguredPrinter to verify that they return the correct error codes. BUG=chromium:683241, chromium:683254 TEST=test_that ... e:platform_DebugDaemonCupsAdd.* CQ-DEPEND=CL:452804 Change-Id: I3d9c45a7a599070a8d5c61a31f40d055e31720d1 Reviewed-on: https://chromium-review.googlesource.com/452546 Commit-Ready: Sean Kau <skau@chromium.org> Tested-by: Sean Kau <skau@chromium.org> Reviewed-by: Katherine Threlkeld <kathrelkeld@chromium.org> Reviewed-by: Sean Kau <skau@chromium.org> [add] https://crrev.com/b4cb26a0ed3e6839c065d91d9115e96256003e46/client/site_tests/platform_DebugDaemonCupsAddPrinters/src/GenericPostScript.ppd.gz [add] https://crrev.com/b4cb26a0ed3e6839c065d91d9115e96256003e46/client/site_tests/platform_DebugDaemonCupsAddPrinters/platform_DebugDaemonCupsAddPrinters.py [add] https://crrev.com/b4cb26a0ed3e6839c065d91d9115e96256003e46/client/site_tests/platform_DebugDaemonCupsAddPrinters/control.lpadmin [add] https://crrev.com/b4cb26a0ed3e6839c065d91d9115e96256003e46/client/cros/debugd_util.py [add] https://crrev.com/b4cb26a0ed3e6839c065d91d9115e96256003e46/client/site_tests/platform_DebugDaemonCupsAddPrinters/control.valid_config [add] https://crrev.com/b4cb26a0ed3e6839c065d91d9115e96256003e46/client/site_tests/platform_DebugDaemonCupsAddPrinters/control.ppd_error [add] https://crrev.com/b4cb26a0ed3e6839c065d91d9115e96256003e46/client/site_tests/platform_DebugDaemonCupsAddPrinters/control.autoconf
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/83645e4eda2cb8d89154c175751ce87a53b5a749 commit 83645e4eda2cb8d89154c175751ce87a53b5a749 Author: Sean Kau <skau@chromium.org> Date: Tue Mar 21 02:30:08 2017 debugd: Update Cups operations in debugd. Remove unused CupsAddPrinter method. Improve error reporting by returning the appropriate CupsResult values when encountering an error. BUG= chromium:683254 ,chromium:683241 TEST=covered by autotest CQ-DEPEND=CL:452703 Change-Id: I08acc4e52fb79a3831f81aa39bbb0c54b897b67b Reviewed-on: https://chromium-review.googlesource.com/452804 Commit-Ready: Sean Kau <skau@chromium.org> Tested-by: Sean Kau <skau@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/83645e4eda2cb8d89154c175751ce87a53b5a749/debugd/src/cups_tool.cc [modify] https://crrev.com/83645e4eda2cb8d89154c175751ce87a53b5a749/debugd/src/cups_tool.h [modify] https://crrev.com/83645e4eda2cb8d89154c175751ce87a53b5a749/debugd/src/debug_daemon.h [modify] https://crrev.com/83645e4eda2cb8d89154c175751ce87a53b5a749/debugd/dbus_bindings/org.chromium.debugd.xml [modify] https://crrev.com/83645e4eda2cb8d89154c175751ce87a53b5a749/debugd/src/debug_daemon.cc
Comment 1 by skau@chromium.org
, Jan 20 2017