diff --git a/test/v4l2_device/v4l2_device_test.cpp b/test/v4l2_device/v4l2_device_test.cpp
index 362553712caa..97876f8d65db 100644
--- a/test/v4l2_device/v4l2_device_test.cpp
+++ b/test/v4l2_device/v4l2_device_test.cpp
@@ -5,6 +5,7 @@
  * libcamera V4L2 API tests
  */
 
+#include <assert.h>
 #include <iostream>
 #include <sys/stat.h>
 
@@ -41,3 +42,8 @@ void V4L2DeviceTest::cleanup()
 {
 	delete dev_;
 };
+
+/* Static compile time assertion tests */
+
+static_assert(sizeof(struct v4l2_capability) == sizeof(struct V4L2Capability),
+	      "V4L2Capability must match v4l2_capability size");
