From: David Stevens Date: Tue, 27 Oct 2020 04:40:17 +0000 (+0900) Subject: gralloctest: update test for ARCVM X-Git-Url: http://git.osdn.net/view?p=android-x86%2Fexternal-minigbm.git;a=commitdiff_plain;h=dfb45b0b5ca610e101f773ff23e3c66a02725b0a 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 Commit-Queue: David Stevens Tested-by: David Stevens --- 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;