istopwg / ippeveselfcert

IPP Everywhere Printer Self-Certification Tools
https://www.pwg.org/ipp/everywhere.html
Apache License 2.0
21 stars 6 forks source link

Document Tests D-2.4 / D-2.5 / D-3.5 / D-3.6 fail if printer doesn't support US Letter or A4 #99

Open wifiprintguy opened 1 year ago

wifiprintguy commented 1 year ago

The Document Tests in the current IPP Everywhere Self-Certification Manual v1.1 (5100.20-2020) define tests D-2.4, D-2.5, D-3.5 and D-3.6 such that the printer has to support US Letter and A4. If the printer does not support these media sizes, then the tests will fail. This seems unreasonable.

To resolve this issue, the tests themselves could be updated so that they are only run if that media size is supported.

For instance, Test D-2.4 is defined thus in sw-ippeveselfcert11-20220819:

{
    SKIP-IF-NOT-DEFINED HAVE_COLOR
    NAME "D-2.4 Print color.jpg with media=na_letter_8.5x11in and ipp-attribute-fidelity=true"
    OPERATION Print-Job
    GROUP operation-attributes-tag
    ATTR charset attributes-charset utf-8
    ATTR naturalLanguage attributes-natural-language en
    ATTR uri printer-uri $uri
    ATTR name requesting-user-name $user
    ATTR name job-name "D-2.4 color.jpg with media=na_letter_8.5x11in and ipp-attribute-fidelity=true"
    ATTR mimeMediaType document-format "image/jpeg"
    ATTR boolean ipp-attribute-fidelity true
    GROUP job-attributes-tag
    ATTR keyword media na_letter_8.5x11in
    FILE "color.jpg"

    STATUS successful-ok
    STATUS server-error-busy REPEAT-MATCH REPEAT-LIMIT 30
}

This test fails because there is no check for US Letter media support. There are already DEFINE-MATCH clauses in test D-1 to define HAVE_A4 and HAVE_LETTER. So all that would be needed would be for this to work for printers that don't support this media size is for a "SKIP-IF-NOT-DEFINED HAVE_LETTER" to be added at the start. Similar fixes for D-2.5, D-3.5 and D-3.6.

wifiprintguy commented 1 year ago

And just a reminder that the "SKIP-IF-NOT-DEFINED HAVE_LETTER" additions to the Print-Job test will also need to be in the Get-Job-Attributes test following it.