summaryrefslogtreecommitdiff
path: root/toolbin
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2020-07-03 18:29:48 +0100
committerRobin Watts <Robin.Watts@artifex.com>2020-07-03 18:31:03 +0100
commitaafbb943f1298a75058485fc0c277edfd7ef4048 (patch)
treefc1f4895a66a058c931d2a9f237a2d135120b4d0 /toolbin
parent5410cc1d64a2082dcd0e037d1ccefdbf68894198 (diff)
downloadghostpdl-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.c14
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)