summaryrefslogtreecommitdiff
path: root/cros_gralloc
diff options
context:
space:
mode:
authorDavid Stevens <stevensd@chromium.org>2020-10-27 13:40:17 +0900
committerCommit Bot <commit-bot@chromium.org>2020-10-28 02:54:48 +0000
commitdfb45b0b5ca610e101f773ff23e3c66a02725b0a (patch)
tree6ef554177f2235c8e493c134947c99f31d823b0c /cros_gralloc
parentfd6f6f9788d9c07fa2eb7a3eb6d03d7a07b1d3eb (diff)
downloadminigbm-dfb45b0b5ca610e101f773ff23e3c66a02725b0a.tar.gz
gralloctest: update test for ARCVM
On ARCVM, the stride obtained from GRALLOC_DRM_GET_STRIDE is the host stride, and may be larger than the guest stride. This change also moves the line which prints the next test to execute to before the test actually runs, so it appears before test failures. BUG=b:155238003 TEST=tast run DUT arc.Gralloc* Change-Id: I4594f352fba585fa4bdbaff609f198888b99c8f5 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2500971 Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org> Commit-Queue: David Stevens <stevensd@chromium.org> Tested-by: David Stevens <stevensd@chromium.org>
Diffstat (limited to 'cros_gralloc')
-rw-r--r--cros_gralloc/gralloc0/tests/gralloctest.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/cros_gralloc/gralloc0/tests/gralloctest.c b/cros_gralloc/gralloc0/tests/gralloctest.c
index f663cd0..c1b0a6e 100644
--- a/cros_gralloc/gralloc0/tests/gralloctest.c
+++ b/cros_gralloc/gralloc0/tests/gralloctest.c
@@ -476,7 +476,7 @@ static int test_perform(struct gralloctest_context *ctx)
CHECK(allocate(ctx->device, &info));
CHECK(mod->perform(mod, GRALLOC_DRM_GET_STRIDE, info.handle, &stride) == 0);
- CHECK(stride == info.stride);
+ CHECK(stride >= info.stride);
CHECK(mod->perform(mod, GRALLOC_DRM_GET_FORMAT, info.handle, &format) == 0);
CHECK(format == info.format);
@@ -674,11 +674,12 @@ int main(int argc, char *argv[])
if (strcmp(tests[i].name, name) && strcmp("all", name))
continue;
+ printf("[ RUN ] gralloctest.%s\n", tests[i].name);
+
int success = 1;
if (ctx->api >= tests[i].required_api)
success = tests[i].run_test(ctx);
- printf("[ RUN ] gralloctest.%s\n", tests[i].name);
if (!success) {
fprintf(stderr, "[ FAILED ] gralloctest.%s\n", tests[i].name);
ret |= 1;