From f1b67a3ef58eea6f8f7b5ccdcabb51b83e32e2ca Mon Sep 17 00:00:00 2001 From: Mateusz Jablonski Date: Thu, 14 Sep 2023 11:20:04 +0000 Subject: [PATCH] test: add static assertions for size of xe structs Signed-off-by: Mateusz Jablonski --- .../os_interface/linux/xe/ioctl_helper_xe_tests.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/shared/test/unit_test/os_interface/linux/xe/ioctl_helper_xe_tests.cpp b/shared/test/unit_test/os_interface/linux/xe/ioctl_helper_xe_tests.cpp index 0646039304..15387b0de8 100644 --- a/shared/test/unit_test/os_interface/linux/xe/ioctl_helper_xe_tests.cpp +++ b/shared/test/unit_test/os_interface/linux/xe/ioctl_helper_xe_tests.cpp @@ -316,10 +316,11 @@ class DrmMockXe : public DrmMockCustom { {DRM_XE_ENGINE_CLASS_VIDEO_DECODE, 7, 1}, {DRM_XE_ENGINE_CLASS_VIDEO_ENHANCE, 8, 0}}; + static_assert(sizeof(drm_xe_query_mem_usage::drm_xe_query_mem_region) == 12 * sizeof(uint64_t), ""); uint64_t queryMemUsage[37]{}; // 1 qword for num regions and 12 qwords per region - uint64_t queryGts[27]{}; // 1 qword for num gts and 13 qwords per gt + static_assert(sizeof(drm_xe_query_gts::drm_xe_query_gt) == 13 * sizeof(uint64_t), ""); + uint64_t queryGts[27]{}; // 1 qword for num gts and 13 qwords per gt std::vector queryTopology; - StackVec waitUserFenceInputs; StackVec vmBindInputs; StackVec syncInputs;