OpenPrinting / cups

OpenPrinting CUPS Sources
https://openprinting.github.io/cups
Apache License 2.0
958 stars 174 forks source link

Get-Printer-Attributes Test Suite requested-attributes being none #909

Closed ARogovskyy closed 3 months ago

ARogovskyy commented 4 months ago

I am not sure if this a bug or working as intended, just stumbled upon this while running the IPP tests under examples/ against my ipp server.

There is a test in get-printer-attributes-suite.test which sends Get-Printer-Attributes with requested-attributes set to the single keyword none. I can't seem to find any referencce of none being a permitted special value for that attribute. Maybe I didn't look enough, but neither RFC 8011 nor the IANA IPP registrations page mention it.

Then, it would seem like a "fake" value to instruct the printer to return no attributes (because none is not an attribute name), which CUPS does. But then , shouldn't successful-ok-ignored-or-substituted-attributes be also a valid status code in this test? The RFC does explicitly allow the server to send the unsupported attributes in the Unsupported Attributes Group after all.

michaelrsweet commented 4 months ago

WRT this test file, you are correct that returning successful-ok-ignored-or-substituted is a valid implementation. The point of the 'none' case is to test the recommended behavior, but it would be good to make this more explicit somehow.

ARogovskyy commented 3 months ago

So I take it as that the course of action is not to add successful-ok-ignored-or-substituted but instead document that this test explicitly tests this particular behavior?

michaelrsweet commented 3 months ago

Been thinking about this, and given the goal is to test things that are supposed to work and not things that are not supposed to work, I'll just remove the 'none' test.

michaelrsweet commented 3 months ago

[master 83d979b5e] Drop 'none' test (Issue #909)