diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2020-07-03 18:29:48 +0100 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2020-07-03 18:31:03 +0100 |
commit | aafbb943f1298a75058485fc0c277edfd7ef4048 (patch) | |
tree | fc1f4895a66a058c931d2a9f237a2d135120b4d0 /toolbin | |
parent | 5410cc1d64a2082dcd0e037d1ccefdbf68894198 (diff) | |
download | ghostpdl-aafbb943f1298a75058485fc0c277edfd7ef4048.tar.gz |
Fixes for displaydev_test.
In 64bit builds, we expect the display device to fail when asked
to align to a multiple of 4.
Also, correct detection of failures.
Diffstat (limited to 'toolbin')
-rw-r--r-- | toolbin/displaydev_test.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/toolbin/displaydev_test.c b/toolbin/displaydev_test.c index b5feeddc1..d0080fa71 100644 --- a/toolbin/displaydev_test.c +++ b/toolbin/displaydev_test.c @@ -686,6 +686,18 @@ static int do_test(const char *title, int format, /* Run our test. */ code = gsapi_init_with_args(instance, argc, argv); + if ((format & DISPLAY_ROW_ALIGN_MASK) == DISPLAY_ROW_ALIGN_4 && + sizeof(void *) > 4) { + if (code == -100) { + printf("Got expected failure!\n"); + code = 0; + goto fail; + } else if (code == 0) { + printf("Failed to get expected failure!\n"); + code = -1; + goto fail; + } + } if (code < 0) { printf("Error %d in gsapi_init_with_args\n", code); goto fail; @@ -707,7 +719,7 @@ failearly: printf("%s%s%s%s %s\n", title, clist_str, legacy_str, align_str, (code < 0) ? "failed" : "complete"); - return (code < 0); + return code; } static int test(const char *title, int format, const char *fname) |