[Intel-gfx] [PATCH i-g-t 1/1] igt/dapc: Test Driver Assisted Performance Capture (DAPC)

Daniel Vetter daniel at ffwll.ch
Wed Aug 30 09:39:52 UTC 2017


One more on top of Lionel's coments.

On Mon, Aug 28, 2017 at 03:23:03PM +0530, Sagar Arun Kamble wrote:
> +int main(int argc, char **argv)
> +{
> +	bool ret;
> +	int option;
> +	int platform;
> +
> +	if (argc != 3) {
> +		printf("Usage: \n./dapc <Platform> <Test_mode>\
> +		\nPlatform: 0-HSW, 1-BDW, 2-SKL\n\
> +		\nTest_mode:\n\
> +		\t0 - RCS OA mode\n\
> +		\t1 - RCS TS mode\n\
> +		\t2 - RCS TS+MMIO mode\n\
> +		\t3 - RCS OA+TS+MMIO mode\n\
> +		\t4 - Periodic OA mode\n");
> +		return 0;
> +	}
> +
> +	ret = initialize();
> +	if (!ret)
> +		return -1;
> +
> +	platform = atoi(argv[1]);
> +	switch (platform) {
> +	case 0:
> +		arch = ARCH_HSW;
> +		break;
> +	case 1:
> +		arch = ARCH_BDW;
> +		break;
> +	case 2:
> +		arch = ARCH_SKL;
> +		break;
> +	default:
> +		fprintf(stderr, "Invalid platform:%d\n", platform);
> +		return -1;
> +	}
> +
> +	option = atoi(argv[2]);

Please convert this into a proper igt testcase that enumrates subtests
like all the others. Otherwise CI won't pick it up, which makes this
wasted effort. This means using igt_main, igt_subtest, igt_fixture and all
the various igt_assert/require macros we have to check results.

Also dapc is not a good testcase name, needs some proper prefixing.
-Daniel

> +	switch (option) {
> +	case 0:
> +		test_perf_dapc_rcs_oa();
> +		break;
> +	case 1:
> +		test_perf_dapc_rcs_ts();
> +		break;
> +	case 2:
> +		test_perf_dapc_rcs_ts_mmio();
> +		break;
> +	case 3:
> +		test_perf_dapc_rcs_oa_ts_mmio();
> +		break;
> +	case 4:
> +		test_perf_dapc_periodic_oa();
> +		break;
> +	default:
> +		fprintf(stderr, "Invalid Option:%d\n", option);
> +		return -1;
> +	}
> +
> +	return 0;
> +}
> -- 
> 1.9.1
> 

> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx


-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch


More information about the Intel-gfx mailing list