[llvm] [offload] add parameterized unit tests (PR #209115)

via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 06:05:00 PDT 2026


https://github.com/EuphoricThinking updated https://github.com/llvm/llvm-project/pull/209115

>From 9877ba55fd9266281b267ae20f6f1c6dbe6cf255 Mon Sep 17 00:00:00 2001
From: Agata Momot <agata.momot at intel.com>
Date: Mon, 15 Jun 2026 08:37:30 -0700
Subject: [PATCH 01/10] [offload] add parameterized unit tests

Previously, liboffload tests were parametrized only with different
devices. The following changes enable creating tests with additional
parameters, besides devices. The existing tests, which often used
C-style macros instead of incorporating Google Test features,
are rewritten so that macros are replaced fully with Google Test
parametrized fixtures.

This patch adds:
- a new fixture that allows for creating parameterized tests
- new macros for the instantiation of parameterized tests
- a helper header file that contains information related to
parameterized tests, including the definition of parameters
- new and refactored printers used in test instantiation

Moreover, selected existing tests are modified and parametrized in order
to make the code less repetitive and more concise. Tests with up to two
possible parameters are not parameterized.

Previously, the tests were already parameterized with
`TestEnvironment::Device`. However, this patch combines
`TestEnvironment::Device` with an additional parameter within
`OffloadParam = std::tuple<TestEnvironment::Device, T>`.
`OffloadParam<T>` is handled by a new fixture
`OffloadDeviceTestWithParam<T>`, which provides the `getTestParam()`
method for the parameter extraction. Other functionalities, such as
access to the `Host` and to the `Device`, are identical to the previous
version of `OffloadDeviceTest`.

In order to avoid code duplication, the unparameterized versions of
fixtures are aliases for parameterized fixtures, with `int` type chosen
arbitrarily as an ignored parameter type, for example: `using
OffloadDeviceTest = OffloadDeviceTestWithParam<int>;`. The single mock
parameter of value `0` is combined with the devices in the provided
macros, yielding tuples of type `std::tuple<TestEnvironment::Device,
int>`. The hidden `int` parameter is not used, but it enables users to
instantiate unparameterized tests without knowledge about the
implementation details. Moreover, it allows for modifying only one
version of the fixture (the one being aliased), without the need to also
change the other version: either parameterized or unparameterized.

The following macros are added in this patch:
- `OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE_WITH_PARAM(FIXTURE, VALUES,
PRINTER)`: instantiates `FIXTURE` with parameters stored in the provided
container `VALUES` (a C-style array or an STL-style container) and with
the given printer. The used devices do not include the host.
- `OFFLOAD_TESTS_INSTANTIATE_HOST_DEVICE_FIXTURE_WITH_PARAM(FIXTURE,
VALUES, PRINTER)`: similar to
`OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE_WITH_PARAM`, but includes the
`Host` in the tested devices.
- `OFFLOAD_TESTS_INSTANTIATE_HOST_DEVICE_FIXTURE(FIXTURE)`: instantiates
`FIXTURE` without additional parameters, but also includes the `Host` in
the used devices.
- `OFFLOAD_TESTS_INSTANTIATE_WITH_DEVICES(FIXTURE, DEVICES)`:
instantiates `FIXTURE` with the provided devices, internally using a
mock parameter. It is not intended for direct use and acts as a helper
macro for the instantiation of unparameterized tests.
- `OFFLOAD_TESTS_INSTANTIATE_WITH_DEVICES_WITH_PARAM(FIXTURE, VALUES,
DEVICES, PRINTER)`: instantiates `FIXTURE` with the provided devices,
parameters and the given printer. It is not intended for direct use and
acts as a helper macro for the instantiation of parameterized tests.

Since the new macros enable testing the `Host` as part of the used
devices, `offload/unittests/OffloadAPI/device/olGetHostInfo.cpp` is
deleted and its tests have been moved to
`offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp`.

The new helper header
`offload/unittests/OffloadAPI/common/Properties.hpp`:
- pairs properties with their sizes for tests similar to
`offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp`
- packs selected properties into containers or arrays for easier access
and instantiation of fixtures
---
 offload/unittests/OffloadAPI/CMakeLists.txt   |   3 +-
 .../unittests/OffloadAPI/common/Fixtures.hpp  | 125 +++++++--
 .../OffloadAPI/common/Properties.hpp          | 263 ++++++++++++++++++
 .../OffloadAPI/device/olGetDeviceInfo.cpp     | 252 ++++-------------
 .../OffloadAPI/device/olGetDeviceInfoSize.cpp |  84 ++----
 .../OffloadAPI/device/olGetHostInfo.cpp       | 195 -------------
 .../OffloadAPI/memory/olGetMemInfo.cpp        | 111 ++++----
 .../OffloadAPI/memory/olGetMemInfoSize.cpp    |  47 ++--
 .../OffloadAPI/memory/olMemAlloc.cpp          |  43 ++-
 .../OffloadAPI/memory/olMemAllocAligned.cpp   | 122 ++------
 .../unittests/OffloadAPI/memory/olMemFree.cpp |  26 +-
 .../OffloadAPI/platform/olGetPlatformInfo.cpp |  38 +--
 .../platform/olGetPlatformInfoSize.cpp        |  24 +-
 .../OffloadAPI/symbol/olGetSymbolInfoSize.cpp |  29 +-
 14 files changed, 600 insertions(+), 762 deletions(-)
 create mode 100644 offload/unittests/OffloadAPI/common/Properties.hpp
 delete mode 100644 offload/unittests/OffloadAPI/device/olGetHostInfo.cpp

diff --git a/offload/unittests/OffloadAPI/CMakeLists.txt b/offload/unittests/OffloadAPI/CMakeLists.txt
index c0dbc31a3a1ca..292ea1eb4852f 100644
--- a/offload/unittests/OffloadAPI/CMakeLists.txt
+++ b/offload/unittests/OffloadAPI/CMakeLists.txt
@@ -12,8 +12,7 @@ add_offload_unittest("context"
 add_offload_unittest("device"
     device/olIterateDevices.cpp
     device/olGetDeviceInfo.cpp
-    device/olGetDeviceInfoSize.cpp
-    device/olGetHostInfo.cpp)
+    device/olGetDeviceInfoSize.cpp)
 
 add_offload_unittest("event"
     event/olCreateEvent.cpp
diff --git a/offload/unittests/OffloadAPI/common/Fixtures.hpp b/offload/unittests/OffloadAPI/common/Fixtures.hpp
index f6b7502c41882..6d940584faef8 100644
--- a/offload/unittests/OffloadAPI/common/Fixtures.hpp
+++ b/offload/unittests/OffloadAPI/common/Fixtures.hpp
@@ -180,13 +180,16 @@ struct OffloadTest : ::testing::Test {
   ol_device_handle_t Host = TestEnvironment::getHostDevice();
 };
 
-struct OffloadDeviceTest
+template <class T> using OffloadParam = std::tuple<TestEnvironment::Device, T>;
+
+template <class T>
+struct OffloadDeviceTestWithParam
     : OffloadTest,
-      ::testing::WithParamInterface<TestEnvironment::Device> {
+      ::testing::WithParamInterface<OffloadParam<T>> {
   void SetUp() override {
     RETURN_ON_FATAL_FAILURE(OffloadTest::SetUp());
 
-    auto DeviceParam = GetParam();
+    auto &DeviceParam = std::get<0>(this->GetParam());
     Device = DeviceParam.Handle;
     if (Device == nullptr)
       GTEST_SKIP() << "No available devices.";
@@ -204,14 +207,31 @@ struct OffloadDeviceTest
     return Backend;
   }
 
+  const OffloadParam<T> &getParamTuple() const { return this->GetParam(); }
+
+  const T &getTestParam() { return std::get<1>(getParamTuple()); }
+
   ol_device_handle_t Device = nullptr;
 };
 
-struct OffloadPlatformTest : OffloadDeviceTest {
+// In order to avoid code duplication, the unparameterized versions of fixtures
+// are aliases for parameterized fixtures, with `int` type chosen arbitrarily as
+// an ignored parameter type. The single mock parameter of value `0` is combined
+// with the devices in the provided macros, yielding tuples
+// `std::tuple<TestEnvironment::Device, int>`. The hidden `int` parameter is not
+// used, but it enables users to instantiate unparameterized tests without the
+// knowledge about the details related to the implementation of fixtures.
+// Moreover, it allows for modifying only one version of the fixture, without
+// the need to also change the other version: either parameterized or
+// unparameterized.
+using OffloadDeviceTest = OffloadDeviceTestWithParam<int>;
+
+template <typename T>
+struct OffloadPlatformTestWithParam : OffloadDeviceTestWithParam<T> {
   void SetUp() override {
-    RETURN_ON_FATAL_FAILURE(OffloadDeviceTest::SetUp());
+    RETURN_ON_FATAL_FAILURE(OffloadDeviceTestWithParam<T>::SetUp());
 
-    ASSERT_SUCCESS(olGetDeviceInfo(Device, OL_DEVICE_INFO_PLATFORM,
+    ASSERT_SUCCESS(olGetDeviceInfo(this->Device, OL_DEVICE_INFO_PLATFORM,
                                    sizeof(Platform), &Platform));
     ASSERT_NE(Platform, nullptr);
   }
@@ -219,17 +239,20 @@ struct OffloadPlatformTest : OffloadDeviceTest {
   ol_platform_handle_t Platform = nullptr;
 };
 
+using OffloadPlatformTest = OffloadPlatformTestWithParam<int>;
+
 // Fixture for a generic program test. If you want a different program, use
 // offloadQueueTest and create your own program handle with the binary you want.
-struct OffloadProgramTest : OffloadDeviceTest {
+template <typename T>
+struct OffloadProgramTestWithParam : OffloadDeviceTestWithParam<T> {
   void SetUp() override { SetUpWith("foo"); }
 
   void SetUpWith(const char *ProgramName) {
-    RETURN_ON_FATAL_FAILURE(OffloadDeviceTest::SetUp());
-    ASSERT_TRUE(
-        TestEnvironment::loadDeviceBinary(ProgramName, Device, DeviceBin));
+    RETURN_ON_FATAL_FAILURE(OffloadDeviceTestWithParam<T>::SetUp());
+    ASSERT_TRUE(TestEnvironment::loadDeviceBinary(ProgramName, this->Device,
+                                                  DeviceBin));
     ASSERT_GE(DeviceBin->getBufferSize(), 0lu);
-    ASSERT_SUCCESS(olCreateProgram(Device, DeviceBin->getBufferStart(),
+    ASSERT_SUCCESS(olCreateProgram(this->Device, DeviceBin->getBufferStart(),
                                    DeviceBin->getBufferSize(), &Program));
   }
 
@@ -237,13 +260,15 @@ struct OffloadProgramTest : OffloadDeviceTest {
     if (Program) {
       olDestroyProgram(Program);
     }
-    RETURN_ON_FATAL_FAILURE(OffloadDeviceTest::TearDown());
+    RETURN_ON_FATAL_FAILURE(OffloadDeviceTestWithParam<T>::TearDown());
   }
 
   ol_program_handle_t Program = nullptr;
   std::unique_ptr<llvm::MemoryBuffer> DeviceBin;
 };
 
+using OffloadProgramTest = OffloadProgramTestWithParam<int>;
+
 struct OffloadKernelTest : OffloadProgramTest {
   void SetUp() override {
     RETURN_ON_FATAL_FAILURE(OffloadProgramTest::SetUp());
@@ -257,20 +282,24 @@ struct OffloadKernelTest : OffloadProgramTest {
   ol_symbol_handle_t Kernel = nullptr;
 };
 
-struct OffloadGlobalTest : OffloadProgramTest {
+template <typename T>
+struct OffloadGlobalTestWithParam : OffloadProgramTestWithParam<T> {
   void SetUp() override {
-    RETURN_ON_FATAL_FAILURE(OffloadProgramTest::SetUpWith("global"));
-    ASSERT_SUCCESS(olGetSymbol(Program, "global",
+    RETURN_ON_FATAL_FAILURE(
+        OffloadProgramTestWithParam<T>::SetUpWith("global"));
+    ASSERT_SUCCESS(olGetSymbol(this->Program, "global",
                                OL_SYMBOL_KIND_GLOBAL_VARIABLE, &Global));
   }
 
   void TearDown() override {
-    RETURN_ON_FATAL_FAILURE(OffloadProgramTest::TearDown());
+    RETURN_ON_FATAL_FAILURE(OffloadProgramTestWithParam<T>::TearDown());
   }
 
   ol_symbol_handle_t Global = nullptr;
 };
 
+using OffloadGlobalTest = OffloadGlobalTestWithParam<int>;
+
 struct OffloadQueueTest : OffloadDeviceTest {
   void SetUp() override {
     RETURN_ON_FATAL_FAILURE(OffloadDeviceTest::SetUp());
@@ -338,13 +367,69 @@ struct LaunchSingleKernelTestBase : LaunchKernelTestBase {
   ol_symbol_handle_t Kernel = nullptr;
 };
 
+using DevicesVec = std::vector<TestEnvironment::Device>;
+
+inline DevicesVec getDevicesAndHost() {
+  DevicesVec Res(TestEnvironment::getDevices());
+  TestEnvironment::Device Host{TestEnvironment::getHostDevice(), "HOST"};
+
+  Res.push_back(Host);
+
+  return Res;
+}
+
+template <class T>
+inline std::string
+defaultPrinterWithParam(const ::testing::TestParamInfo<OffloadParam<T>> &info) {
+  auto device = std::get<0>(info.param);
+  auto param = std::get<1>(info.param);
+
+  std::string placeholder;
+  llvm::raw_string_ostream ss(placeholder);
+
+  ss << device.Name << "__" << param;
+
+  return SanitizeString(ss.str());
+}
+
+inline std::string
+defaultPrinter(const ::testing::TestParamInfo<OffloadParam<int>> &info) {
+  auto device = std::get<0>(info.param);
+
+  return SanitizeString(device.Name);
+}
+
 // Devices might not be available for offload testing, so allow uninstantiated
 // tests (as the device list will be empty). This means that all tests requiring
 // a device will be silently skipped.
+#define OFFLOAD_TESTS_INSTANTIATE_WITH_DEVICES(FIXTURE, DEVICES)               \
+  INSTANTIATE_TEST_SUITE_P(                                                    \
+      , FIXTURE,                                                               \
+      testing::Combine(::testing::ValuesIn(DEVICES), testing::ValuesIn({0})),  \
+      defaultPrinter);                                                         \
+  GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(FIXTURE)
+
 #define OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(FIXTURE)                      \
+  OFFLOAD_TESTS_INSTANTIATE_WITH_DEVICES(FIXTURE, TestEnvironment::getDevices())
+
+#define OFFLOAD_TESTS_INSTANTIATE_HOST_DEVICE_FIXTURE(FIXTURE)                 \
+  OFFLOAD_TESTS_INSTANTIATE_WITH_DEVICES(FIXTURE, getDevicesAndHost())
+
+#define OFFLOAD_TESTS_INSTANTIATE_WITH_DEVICES_WITH_PARAM(FIXTURE, VALUES,     \
+                                                          DEVICES, PRINTER)    \
   INSTANTIATE_TEST_SUITE_P(                                                    \
-      , FIXTURE, ::testing::ValuesIn(TestEnvironment::getDevices()),           \
-      [](const ::testing::TestParamInfo<TestEnvironment::Device> &info) {      \
-        return SanitizeString(info.param.Name);                                \
-      });                                                                      \
+      , FIXTURE,                                                               \
+      testing::Combine(::testing::ValuesIn(TestEnvironment::getDevices()),     \
+                       ::testing::ValuesIn(VALUES)),                           \
+      PRINTER);                                                                \
   GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(FIXTURE)
+
+#define OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE_WITH_PARAM(FIXTURE, VALUES,   \
+                                                            PRINTER)           \
+  OFFLOAD_TESTS_INSTANTIATE_WITH_DEVICES_WITH_PARAM(                           \
+      FIXTURE, VALUES, TestEnvironment::getDevices(), PRINTER)
+
+#define OFFLOAD_TESTS_INSTANTIATE_HOST_DEVICE_FIXTURE_WITH_PARAM(              \
+    FIXTURE, VALUES, PRINTER)                                                  \
+  OFFLOAD_TESTS_INSTANTIATE_WITH_DEVICES_WITH_PARAM(                           \
+      FIXTURE, VALUES, getDevicesAndHost(), PRINTER)
diff --git a/offload/unittests/OffloadAPI/common/Properties.hpp b/offload/unittests/OffloadAPI/common/Properties.hpp
new file mode 100644
index 0000000000000..4c7d827dbd156
--- /dev/null
+++ b/offload/unittests/OffloadAPI/common/Properties.hpp
@@ -0,0 +1,263 @@
+#pragma once
+
+#include "Fixtures.hpp"
+#include "OffloadAPI.h"
+
+inline constexpr size_t MAX_DEVICE_INFO_BYTES = 8;
+
+inline constexpr char zeroArray[MAX_DEVICE_INFO_BYTES] = {};
+
+template <typename T> struct SizedProperty {
+  size_t size;
+  T property;
+};
+
+template <typename T>
+using PropertiesWithSizeContainer = std::vector<SizedProperty<T>>;
+template <typename T> using PropertiesContainer = std::set<T>;
+template <typename T>
+using PropertiesTypes = std::unordered_map<T, SizedProperty<T>>;
+
+template <typename T>
+auto createPropertiesWithSizeContainer(
+    size_t PropSize, PropertiesContainer<T> SelectedProperties)
+    -> PropertiesWithSizeContainer<T> {
+  PropertiesWithSizeContainer<T> Res;
+  for (auto p : SelectedProperties) {
+    Res.push_back({PropSize, p});
+  }
+
+  return Res;
+}
+
+template <typename T>
+auto mergeProperties(
+    std::initializer_list<PropertiesWithSizeContainer<T>> properties)
+    -> PropertiesWithSizeContainer<T> {
+  PropertiesWithSizeContainer<T> finalProperties;
+
+  for (auto prop : properties) {
+    finalProperties.insert(finalProperties.end(), prop.begin(), prop.end());
+  }
+
+  return finalProperties;
+}
+
+template <typename T>
+PropertiesContainer<T>
+removeIrrelevantProperties(PropertiesContainer<T> base,
+                           PropertiesContainer<T> unwanted) {
+  PropertiesContainer<T> res(base);
+
+  for (auto prop : unwanted) {
+    res.erase(prop);
+  }
+
+  return res;
+}
+
+template <typename T>
+PropertiesTypes<T> inline createTypesMap(
+    std::initializer_list<PropertiesWithSizeContainer<T>> properties) {
+  PropertiesTypes<T> Res;
+
+  for (auto container : properties) {
+    for (auto prop : container) {
+      Res.insert({prop.property, prop});
+    }
+  }
+
+  return Res;
+}
+
+// ol_device_info_t
+using DeviceInfoProp = PropertiesContainer<ol_device_info_t>;
+using DeviceInfoProperties = PropertiesWithSizeContainer<ol_device_info_t>;
+using DeviceInfoPropertiesTypes = PropertiesTypes<ol_device_info_t>;
+
+inline const DeviceInfoProp PropBool{OL_DEVICE_INFO_SINGLE_FP_SUPPORT,
+                                     OL_DEVICE_INFO_DOUBLE_FP_SUPPORT,
+                                     OL_DEVICE_INFO_HALF_FP_SUPPORT};
+inline const DeviceInfoProperties BoolProperties =
+    createPropertiesWithSizeContainer(sizeof(bool), PropBool);
+
+inline const DeviceInfoProp PropUint32{
+    OL_DEVICE_INFO_MAX_WORK_GROUP_SIZE,
+    OL_DEVICE_INFO_MAX_WORK_SIZE,
+    OL_DEVICE_INFO_VENDOR_ID,
+    OL_DEVICE_INFO_NUM_COMPUTE_UNITS,
+    OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR,
+    OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT,
+    OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT,
+    OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG,
+    OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT,
+    OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE,
+    OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF,
+    OL_DEVICE_INFO_MAX_CLOCK_FREQUENCY,
+    OL_DEVICE_INFO_MEMORY_CLOCK_RATE,
+    OL_DEVICE_INFO_ADDRESS_BITS,
+    OL_DEVICE_INFO_NUM_LANES};
+inline const DeviceInfoProperties Uint32Properties =
+    createPropertiesWithSizeContainer(sizeof(uint32_t), PropUint32);
+
+inline const DeviceInfoProp PropUint64{
+    OL_DEVICE_INFO_MAX_MEM_ALLOC_SIZE, OL_DEVICE_INFO_GLOBAL_MEM_SIZE,
+    OL_DEVICE_INFO_WORK_GROUP_LOCAL_MEM_SIZE};
+inline const DeviceInfoProperties Uint64Properties =
+    createPropertiesWithSizeContainer(sizeof(uint64_t), PropUint64);
+
+inline const DeviceInfoProp PropCapabilitiesFlags{
+    OL_DEVICE_INFO_SINGLE_FP_CONFIG, OL_DEVICE_INFO_HALF_FP_CONFIG,
+    OL_DEVICE_INFO_DOUBLE_FP_CONFIG};
+// sizeof(ol_device_fp_capability_flags_t) == sizeof(uint32_t)
+inline const DeviceInfoProperties CapabilitesFlagsProperties =
+    createPropertiesWithSizeContainer(sizeof(ol_device_fp_capability_flags_t),
+                                      PropCapabilitiesFlags);
+
+inline const DeviceInfoProp PropIrrelevantGTCapabilities = {
+    OL_DEVICE_INFO_HALF_FP_CONFIG};
+inline const DeviceInfoProp Prop_RelevantGTCapabilites =
+    removeIrrelevantProperties(PropCapabilitiesFlags,
+                               PropIrrelevantGTCapabilities);
+inline const DeviceInfoProperties RelevantGTCapabilitiesProperties =
+    createPropertiesWithSizeContainer(sizeof(ol_device_fp_capability_flags_t),
+                                      Prop_RelevantGTCapabilites);
+
+inline const DeviceInfoProp PropIrrelevantGTUint32 = {
+    OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF};
+inline const DeviceInfoProp Prop_RelevantGTUint32 =
+    removeIrrelevantProperties(PropUint32, PropIrrelevantGTUint32);
+inline const DeviceInfoProperties RelevantGTUint32Properties =
+    createPropertiesWithSizeContainer(sizeof(uint32_t), Prop_RelevantGTUint32);
+
+inline const DeviceInfoProp PropDeviceType{OL_DEVICE_INFO_TYPE};
+inline const DeviceInfoProperties DeviceTypeProperties =
+    createPropertiesWithSizeContainer(sizeof(ol_device_type_t), PropDeviceType);
+
+inline const DeviceInfoProp PropPlatform{OL_DEVICE_INFO_PLATFORM};
+inline const DeviceInfoProperties PlatformProperties =
+    createPropertiesWithSizeContainer(sizeof(ol_platform_handle_t),
+                                      PropPlatform);
+
+inline const DeviceInfoProp PropNames{
+    OL_DEVICE_INFO_NAME, OL_DEVICE_INFO_PRODUCT_NAME, OL_DEVICE_INFO_UID,
+    OL_DEVICE_INFO_VENDOR, OL_DEVICE_INFO_DRIVER_VERSION};
+inline const DeviceInfoProperties NamesProperties =
+    createPropertiesWithSizeContainer(0, PropNames);
+
+inline const DeviceInfoProp PropDimensions{
+    OL_DEVICE_INFO_MAX_WORK_GROUP_SIZE_PER_DIMENSION,
+    OL_DEVICE_INFO_MAX_WORK_SIZE_PER_DIMENSION};
+inline const DeviceInfoProperties DimensionsProperties =
+    createPropertiesWithSizeContainer(sizeof(ol_dimensions_t), PropDimensions);
+
+inline const DeviceInfoPropertiesTypes propertiesTypes =
+    createTypesMap({BoolProperties, Uint32Properties, Uint64Properties,
+                    CapabilitesFlagsProperties});
+
+inline bool defaultCheckIsNonZero(char *buffer) {
+  return memcmp(buffer, zeroArray, MAX_DEVICE_INFO_BYTES) != 0;
+}
+
+template <typename T>
+inline std::string defaultPropertyTestPrinter(
+    const ::testing::TestParamInfo<OffloadParam<SizedProperty<T>>> &info) {
+  auto device = std::get<0>(info.param);
+  auto paramData = std::get<1>(info.param);
+
+  std::string ss;
+  llvm::raw_string_ostream finalName(ss);
+
+  auto property = paramData.property;
+  finalName << device.Name << "__" << property;
+
+  return SanitizeString(finalName.str());
+}
+
+template <typename T>
+struct olPropertyTest : OffloadDeviceTestWithParam<SizedProperty<T>> {
+  void SetUp() override {
+    RETURN_ON_FATAL_FAILURE(
+        OffloadDeviceTestWithParam<SizedProperty<T>>::SetUp());
+
+    auto paramData = this->getTestParam();
+    PropertySize = paramData.size;
+    Property = paramData.property;
+  }
+
+  size_t PropertySize = 0;
+  T Property;
+};
+
+struct olGetHostDeviceInfoPropertyTest : olPropertyTest<ol_device_info_t> {
+  bool isHost() { return Host == this->Device; }
+};
+
+struct olGetHostDeviceInfoTest : OffloadDeviceTest {
+  void SetUp() override { RETURN_ON_FATAL_FAILURE(OffloadDeviceTest::SetUp()); }
+
+  bool isHost() { return Host == this->Device; }
+};
+
+// ol_symbol_info
+using SymbolInfoTuple = SizedProperty<ol_symbol_info_t>;
+using SymbolInfoProp = PropertiesContainer<ol_symbol_info_t>;
+using SymbolInfoProperties = PropertiesWithSizeContainer<ol_symbol_info_t>;
+
+inline const SymbolInfoProp PropSymbolInfoGlobal{
+    OL_SYMBOL_INFO_KIND, OL_SYMBOL_INFO_GLOBAL_VARIABLE_ADDRESS,
+    OL_SYMBOL_INFO_GLOBAL_VARIABLE_SIZE};
+inline const SymbolInfoProperties SymbolGlobalProperties{
+    {sizeof(ol_symbol_kind_t), OL_SYMBOL_INFO_KIND},
+    {sizeof(void *), OL_SYMBOL_INFO_GLOBAL_VARIABLE_ADDRESS},
+    {sizeof(size_t), OL_SYMBOL_INFO_GLOBAL_VARIABLE_SIZE}};
+
+struct olGetSymbolInfoSizeGlobalTest
+    : OffloadGlobalTestWithParam<SymbolInfoTuple> {
+  void SetUp() override {
+    RETURN_ON_FATAL_FAILURE(
+        OffloadGlobalTestWithParam<SymbolInfoTuple>::SetUp());
+
+    auto paramData = this->getTestParam();
+    PropertySize = paramData.size;
+    Property = paramData.property;
+  }
+
+  size_t PropertySize = 0;
+  ol_symbol_info_t Property;
+};
+
+// ol_platform_info_t
+inline const ol_platform_info_t PlatformInfoNames[3] = {
+    OL_PLATFORM_INFO_NAME, OL_PLATFORM_INFO_VENDOR_NAME,
+    OL_PLATFORM_INFO_VERSION};
+
+// ol_alloc_type_t
+struct olMemAllocHostOrDeviceTest
+    : OffloadDeviceTestWithParam<ol_alloc_type_t> {
+  ol_result_t allocateDeviceOrHost(size_t Size, size_t Alignment,
+                                   void **Alloc) {
+    ol_alloc_type_t AllocType = getTestParam();
+    if (AllocType == OL_ALLOC_TYPE_HOST) {
+      return olMemAllocAlignedHost(this->Device, Size, Alignment, Alloc);
+    }
+
+    return olMemAllocAligned(this->Device, AllocType, Size, Alignment, Alloc);
+  }
+};
+
+inline const ol_alloc_type_t AllocTypes[3] = {
+    OL_ALLOC_TYPE_DEVICE, OL_ALLOC_TYPE_MANAGED, OL_ALLOC_TYPE_HOST};
+inline const size_t TestAllocsNum = 1000;
+
+// ol_mem_info_t
+using MemInfoProp = PropertiesContainer<ol_mem_info_t>;
+using MemInfoProperties = PropertiesWithSizeContainer<ol_mem_info_t>;
+
+inline const MemInfoProp PropMemInfo{OL_MEM_INFO_DEVICE, OL_MEM_INFO_BASE,
+                                     OL_MEM_INFO_SIZE, OL_MEM_INFO_TYPE};
+inline const MemInfoProperties MemInfoSizeProperties{
+    {sizeof(ol_device_handle_t), OL_MEM_INFO_DEVICE},
+    {sizeof(void *), OL_MEM_INFO_BASE},
+    {sizeof(size_t), OL_MEM_INFO_SIZE},
+    {sizeof(ol_alloc_type_t), OL_MEM_INFO_TYPE}};
diff --git a/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp b/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp
index 301d2922fe598..9e810ececab53 100644
--- a/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp
+++ b/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp
@@ -6,258 +6,120 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "../common/Fixtures.hpp"
+#include "../common/Properties.hpp"
 #include <OffloadAPI.h>
 #include <gtest/gtest.h>
 
-using olGetDeviceInfoTest = OffloadDeviceTest;
-OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olGetDeviceInfoTest);
+DeviceInfoProperties JustSupportedProperties = mergeProperties(
+    {BoolProperties,
+     {propertiesTypes.at(OL_DEVICE_INFO_HALF_FP_CONFIG),
+      propertiesTypes.at(OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF)}});
 
-#define OL_DEVICE_INFO_TEST_SUCCESS_CHECK(TestName, PropType, PropName, Dev,   \
-                                          Expr)                                \
-  TEST_P(olGetDeviceInfoTest, Test##Dev##TestName) {                           \
-    PropType Value;                                                            \
-    ASSERT_SUCCESS(olGetDeviceInfo(Dev, PropName, sizeof(Value), &Value));     \
-    Expr;                                                                      \
-  }
-
-#define OL_DEVICE_INFO_TEST_DEVICE_SUCCESS(TestName, PropType, PropName)       \
-  OL_DEVICE_INFO_TEST_SUCCESS_CHECK(TestName, PropType, PropName, Device, {})
-
-#define OL_DEVICE_INFO_TEST_HOST_SUCCESS(TestName, PropType, PropName)         \
-  OL_DEVICE_INFO_TEST_SUCCESS_CHECK(TestName, PropType, PropName, Host, {})
-
-#define OL_DEVICE_INFO_TEST_SUCCESS(TestName, PropType, PropName)              \
-  OL_DEVICE_INFO_TEST_DEVICE_SUCCESS(TestName, PropType, PropName)             \
-  OL_DEVICE_INFO_TEST_HOST_SUCCESS(TestName, PropType, PropName)
+DeviceInfoProperties NonZeroProperties =
+    mergeProperties({RelevantGTCapabilitiesProperties,
+                     RelevantGTUint32Properties, Uint64Properties});
 
-#define OL_DEVICE_INFO_TEST_DEVICE_VALUE_GT(TestName, PropType, PropName,      \
-                                            LowBound)                          \
-  OL_DEVICE_INFO_TEST_SUCCESS_CHECK(TestName, PropType, PropName, Device,      \
-                                    ASSERT_GT(Value, LowBound))
+using olGetHostDeviceInfoPropertySupportTest = olGetHostDeviceInfoPropertyTest;
+using olGetHostDeviceInfoPropertyNonZeroTest = olGetHostDeviceInfoPropertyTest;
 
-#define OL_DEVICE_INFO_TEST_HOST_VALUE_GT(TestName, PropType, PropName,        \
-                                          LowBound)                            \
-  OL_DEVICE_INFO_TEST_SUCCESS_CHECK(TestName, PropType, PropName, Host,        \
-                                    ASSERT_GT(Value, LowBound))
+OFFLOAD_TESTS_INSTANTIATE_HOST_DEVICE_FIXTURE_WITH_PARAM(
+    olGetHostDeviceInfoPropertySupportTest, JustSupportedProperties,
+    defaultPropertyTestPrinter<ol_device_info_t>);
 
-#define OL_DEVICE_INFO_TEST_VALUE_GT(TestName, PropType, PropName, LowBound)   \
-  OL_DEVICE_INFO_TEST_DEVICE_VALUE_GT(TestName, PropType, PropName, LowBound)  \
-  OL_DEVICE_INFO_TEST_HOST_VALUE_GT(TestName, PropType, PropName, LowBound)
+OFFLOAD_TESTS_INSTANTIATE_HOST_DEVICE_FIXTURE_WITH_PARAM(
+    olGetHostDeviceInfoPropertyNonZeroTest, NonZeroProperties,
+    defaultPropertyTestPrinter<ol_device_info_t>);
 
-TEST_P(olGetDeviceInfoTest, SuccessType) {
-  ol_device_type_t DeviceType;
-  ASSERT_SUCCESS(olGetDeviceInfo(Device, OL_DEVICE_INFO_TYPE,
-                                 sizeof(ol_device_type_t), &DeviceType));
+// Properties without gt test
+TEST_P(olGetHostDeviceInfoPropertySupportTest, Success) {
+  char Value[MAX_DEVICE_INFO_BYTES];
+  ASSERT_SUCCESS(olGetDeviceInfo(Device, Property, PropertySize, &Value));
 }
 
-TEST_P(olGetDeviceInfoTest, HostSuccessType) {
-  ol_device_type_t DeviceType;
-  ASSERT_SUCCESS(olGetDeviceInfo(Host, OL_DEVICE_INFO_TYPE,
-                                 sizeof(ol_device_type_t), &DeviceType));
-  ASSERT_EQ(DeviceType, OL_DEVICE_TYPE_HOST);
-}
+TEST_P(olGetHostDeviceInfoPropertyNonZeroTest, Value) {
+  char Value[MAX_DEVICE_INFO_BYTES] = {};
+  ASSERT_SUCCESS(olGetDeviceInfo(Device, Property, PropertySize, &Value));
 
-TEST_P(olGetDeviceInfoTest, SuccessPlatform) {
-  ol_platform_handle_t Platform = nullptr;
-  ASSERT_SUCCESS(olGetDeviceInfo(Device, OL_DEVICE_INFO_PLATFORM,
-                                 sizeof(ol_platform_handle_t), &Platform));
-  ASSERT_NE(Platform, nullptr);
+  ASSERT_TRUE(defaultCheckIsNonZero(Value));
 }
 
-TEST_P(olGetDeviceInfoTest, SuccessName) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(olGetDeviceInfoSize(Device, OL_DEVICE_INFO_NAME, &Size));
-  ASSERT_GT(Size, 0ul);
-  std::vector<char> Name;
-  Name.resize(Size);
-  ASSERT_SUCCESS(
-      olGetDeviceInfo(Device, OL_DEVICE_INFO_NAME, Size, Name.data()));
-  ASSERT_EQ(std::strlen(Name.data()), Size - 1);
-}
-
-TEST_P(olGetDeviceInfoTest, HostName) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(olGetDeviceInfoSize(Host, OL_DEVICE_INFO_NAME, &Size));
-  ASSERT_GT(Size, 0ul);
-  std::vector<char> Name;
-  Name.resize(Size);
-  ASSERT_SUCCESS(olGetDeviceInfo(Host, OL_DEVICE_INFO_NAME, Size, Name.data()));
-  ASSERT_EQ(std::strlen(Name.data()), Size - 1);
-}
-
-TEST_P(olGetDeviceInfoTest, SuccessProductName) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(
-      olGetDeviceInfoSize(Device, OL_DEVICE_INFO_PRODUCT_NAME, &Size));
-  ASSERT_GT(Size, 0ul);
-  std::vector<char> Name;
-  Name.resize(Size);
-  ASSERT_SUCCESS(
-      olGetDeviceInfo(Device, OL_DEVICE_INFO_PRODUCT_NAME, Size, Name.data()));
-  ASSERT_EQ(std::strlen(Name.data()), Size - 1);
-}
+using olGetDeviceHostInfoNamesTest = olGetHostDeviceInfoPropertyTest;
 
-TEST_P(olGetDeviceInfoTest, SuccessUID) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(olGetDeviceInfoSize(Device, OL_DEVICE_INFO_UID, &Size));
-  ASSERT_GT(Size, 0ul);
-  std::vector<char> UID;
-  UID.resize(Size);
-  ASSERT_SUCCESS(olGetDeviceInfo(Device, OL_DEVICE_INFO_UID, Size, UID.data()));
-  ASSERT_EQ(std::strlen(UID.data()), Size - 1);
-}
+OFFLOAD_TESTS_INSTANTIATE_HOST_DEVICE_FIXTURE_WITH_PARAM(
+    olGetDeviceHostInfoNamesTest, NamesProperties,
+    defaultPropertyTestPrinter<ol_device_info_t>);
 
-TEST_P(olGetDeviceInfoTest, HostProductName) {
+TEST_P(olGetDeviceHostInfoNamesTest, SuccessNames) {
   size_t Size = 0;
-  ASSERT_SUCCESS(olGetDeviceInfoSize(Host, OL_DEVICE_INFO_PRODUCT_NAME, &Size));
+  ASSERT_SUCCESS(olGetDeviceInfoSize(Device, Property, &Size));
   ASSERT_GT(Size, 0ul);
   std::vector<char> Name;
   Name.resize(Size);
-  ASSERT_SUCCESS(
-      olGetDeviceInfo(Host, OL_DEVICE_INFO_PRODUCT_NAME, Size, Name.data()));
+  ASSERT_SUCCESS(olGetDeviceInfo(Device, Property, Size, Name.data()));
   ASSERT_EQ(std::strlen(Name.data()), Size - 1);
 }
 
-TEST_P(olGetDeviceInfoTest, HostUID) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(olGetDeviceInfoSize(Host, OL_DEVICE_INFO_UID, &Size));
-  ASSERT_GT(Size, 0ul);
-  std::vector<char> UID;
-  UID.resize(Size);
-  ASSERT_SUCCESS(olGetDeviceInfo(Host, OL_DEVICE_INFO_UID, Size, UID.data()));
-  ASSERT_EQ(std::strlen(UID.data()), Size - 1);
-}
-
-TEST_P(olGetDeviceInfoTest, SuccessVendor) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(olGetDeviceInfoSize(Device, OL_DEVICE_INFO_VENDOR, &Size));
-  ASSERT_GT(Size, 0ul);
-  std::vector<char> Vendor;
-  Vendor.resize(Size);
-  ASSERT_SUCCESS(
-      olGetDeviceInfo(Device, OL_DEVICE_INFO_VENDOR, Size, Vendor.data()));
-  ASSERT_EQ(std::strlen(Vendor.data()), Size - 1);
-}
+using olGetHostDeviceInfoDimensionsTest = olGetHostDeviceInfoPropertyTest;
 
-TEST_P(olGetDeviceInfoTest, SuccessDriverVersion) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(
-      olGetDeviceInfoSize(Device, OL_DEVICE_INFO_DRIVER_VERSION, &Size));
-  ASSERT_GT(Size, 0ul);
-  std::vector<char> DriverVersion;
-  DriverVersion.resize(Size);
-  ASSERT_SUCCESS(olGetDeviceInfo(Device, OL_DEVICE_INFO_DRIVER_VERSION, Size,
-                                 DriverVersion.data()));
-  ASSERT_EQ(std::strlen(DriverVersion.data()), Size - 1);
-}
+OFFLOAD_TESTS_INSTANTIATE_HOST_DEVICE_FIXTURE_WITH_PARAM(
+    olGetHostDeviceInfoDimensionsTest, DimensionsProperties,
+    defaultPropertyTestPrinter<ol_device_info_t>);
 
-OL_DEVICE_INFO_TEST_VALUE_GT(MaxWorkGroupSize, uint32_t,
-                             OL_DEVICE_INFO_MAX_WORK_GROUP_SIZE, 0);
-
-TEST_P(olGetDeviceInfoTest, SuccessMaxWorkGroupSizePerDimension) {
+TEST_P(olGetHostDeviceInfoDimensionsTest, Success) {
   ol_dimensions_t Value{0, 0, 0};
-  ASSERT_SUCCESS(
-      olGetDeviceInfo(Device, OL_DEVICE_INFO_MAX_WORK_GROUP_SIZE_PER_DIMENSION,
-                      sizeof(Value), &Value));
+  ASSERT_SUCCESS(olGetDeviceInfo(Device, Property, sizeof(Value), &Value));
   ASSERT_GT(Value.x, 0u);
   ASSERT_GT(Value.y, 0u);
   ASSERT_GT(Value.z, 0u);
 }
 
-OL_DEVICE_INFO_TEST_VALUE_GT(MaxWorkSize, uint32_t,
-                             OL_DEVICE_INFO_MAX_WORK_SIZE, 0);
+OFFLOAD_TESTS_INSTANTIATE_HOST_DEVICE_FIXTURE(olGetHostDeviceInfoTest);
 
-TEST_P(olGetDeviceInfoTest, SuccessMaxWorkSizePerDimension) {
-  ol_dimensions_t Value{0, 0, 0};
-  ASSERT_SUCCESS(olGetDeviceInfo(Device,
-                                 OL_DEVICE_INFO_MAX_WORK_SIZE_PER_DIMENSION,
-                                 sizeof(Value), &Value));
-  ASSERT_GT(Value.x, 0u);
-  ASSERT_GT(Value.y, 0u);
-  ASSERT_GT(Value.z, 0u);
+TEST_P(olGetHostDeviceInfoTest, HostSuccessType) {
+  ol_device_type_t DeviceType;
+  ASSERT_SUCCESS(olGetDeviceInfo(Device, OL_DEVICE_INFO_TYPE,
+                                 sizeof(ol_device_type_t), &DeviceType));
+
+  if (isHost()) {
+    ASSERT_EQ(DeviceType, OL_DEVICE_TYPE_HOST);
+  }
 }
 
-OL_DEVICE_INFO_TEST_DEVICE_VALUE_GT(VendorId, uint32_t,
-                                    OL_DEVICE_INFO_VENDOR_ID, 0);
-OL_DEVICE_INFO_TEST_HOST_SUCCESS(VendorId, uint32_t, OL_DEVICE_INFO_VENDOR_ID);
-OL_DEVICE_INFO_TEST_VALUE_GT(NumComputeUnits, uint32_t,
-                             OL_DEVICE_INFO_NUM_COMPUTE_UNITS, 0);
-OL_DEVICE_INFO_TEST_VALUE_GT(SingleFPConfig, ol_device_fp_capability_flags_t,
-                             OL_DEVICE_INFO_SINGLE_FP_CONFIG, 0);
-OL_DEVICE_INFO_TEST_SUCCESS(HalfFPConfig, ol_device_fp_capability_flags_t,
-                            OL_DEVICE_INFO_HALF_FP_CONFIG);
-OL_DEVICE_INFO_TEST_VALUE_GT(DoubleFPConfig, ol_device_fp_capability_flags_t,
-                             OL_DEVICE_INFO_DOUBLE_FP_CONFIG, 0);
-OL_DEVICE_INFO_TEST_VALUE_GT(NativeVectorWidthChar, uint32_t,
-                             OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR, 0);
-OL_DEVICE_INFO_TEST_VALUE_GT(NativeVectorWidthShort, uint32_t,
-                             OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT, 0);
-OL_DEVICE_INFO_TEST_VALUE_GT(NativeVectorWidthInt, uint32_t,
-                             OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT, 0);
-OL_DEVICE_INFO_TEST_VALUE_GT(NativeVectorWidthLong, uint32_t,
-                             OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG, 0);
-OL_DEVICE_INFO_TEST_VALUE_GT(NativeVectorWidthFloat, uint32_t,
-                             OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT, 0);
-OL_DEVICE_INFO_TEST_VALUE_GT(NativeVectorWidthDouble, uint32_t,
-                             OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE, 0);
-OL_DEVICE_INFO_TEST_SUCCESS(SingleFPSupport, bool,
-                            OL_DEVICE_INFO_SINGLE_FP_SUPPORT);
-OL_DEVICE_INFO_TEST_SUCCESS(DoubleFPSupport, bool,
-                            OL_DEVICE_INFO_DOUBLE_FP_SUPPORT);
-OL_DEVICE_INFO_TEST_SUCCESS(HalfFPSupport, bool,
-                            OL_DEVICE_INFO_HALF_FP_SUPPORT);
-OL_DEVICE_INFO_TEST_SUCCESS(NativeVectorWidthHalf, uint32_t,
-                            OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF);
-OL_DEVICE_INFO_TEST_VALUE_GT(MaxClockFrequency, uint32_t,
-                             OL_DEVICE_INFO_MAX_CLOCK_FREQUENCY, 0);
-OL_DEVICE_INFO_TEST_VALUE_GT(MemoryClockRate, uint32_t,
-                             OL_DEVICE_INFO_MEMORY_CLOCK_RATE, 0);
-OL_DEVICE_INFO_TEST_VALUE_GT(NumLanes, uint32_t, OL_DEVICE_INFO_NUM_LANES, 0);
-OL_DEVICE_INFO_TEST_VALUE_GT(AddressBits, uint32_t, OL_DEVICE_INFO_ADDRESS_BITS,
-                             0);
-OL_DEVICE_INFO_TEST_DEVICE_VALUE_GT(MaxMemAllocSize, uint64_t,
-                                    OL_DEVICE_INFO_MAX_MEM_ALLOC_SIZE, 0);
-OL_DEVICE_INFO_TEST_HOST_SUCCESS(MaxMemAllocSize, uint64_t,
-                                 OL_DEVICE_INFO_MAX_MEM_ALLOC_SIZE);
-OL_DEVICE_INFO_TEST_DEVICE_VALUE_GT(GlobalMemSize, uint64_t,
-                                    OL_DEVICE_INFO_GLOBAL_MEM_SIZE, 0);
-OL_DEVICE_INFO_TEST_HOST_SUCCESS(GlobalMemSize, uint64_t,
-                                 OL_DEVICE_INFO_GLOBAL_MEM_SIZE);
-OL_DEVICE_INFO_TEST_DEVICE_VALUE_GT(SharedMemSize, uint64_t,
-                                    OL_DEVICE_INFO_WORK_GROUP_LOCAL_MEM_SIZE,
-                                    0);
-OL_DEVICE_INFO_TEST_HOST_SUCCESS(SharedMemSize, uint64_t,
-                                 OL_DEVICE_INFO_WORK_GROUP_LOCAL_MEM_SIZE);
+TEST_P(olGetHostDeviceInfoTest, SuccessPlatform) {
+  ol_platform_handle_t Platform = nullptr;
+  ASSERT_SUCCESS(olGetDeviceInfo(Device, OL_DEVICE_INFO_PLATFORM,
+                                 sizeof(ol_platform_handle_t), &Platform));
+  ASSERT_NE(Platform, nullptr);
+}
 
-TEST_P(olGetDeviceInfoTest, InvalidNullHandleDevice) {
+TEST_P(olGetHostDeviceInfoTest, InvalidNullHandleDevice) {
   ol_device_type_t DeviceType;
   ASSERT_ERROR(OL_ERRC_INVALID_NULL_HANDLE,
                olGetDeviceInfo(nullptr, OL_DEVICE_INFO_TYPE,
                                sizeof(ol_device_type_t), &DeviceType));
 }
 
-TEST_P(olGetDeviceInfoTest, InvalidEnumerationInfoType) {
+TEST_P(olGetHostDeviceInfoTest, InvalidEnumerationInfoType) {
   ol_device_type_t DeviceType;
   ASSERT_ERROR(OL_ERRC_INVALID_ENUMERATION,
                olGetDeviceInfo(Device, OL_DEVICE_INFO_FORCE_UINT32,
                                sizeof(ol_device_type_t), &DeviceType));
 }
 
-TEST_P(olGetDeviceInfoTest, InvalidSizePropSize) {
+TEST_P(olGetHostDeviceInfoTest, InvalidPropSize) {
   ol_device_type_t DeviceType;
   ASSERT_ERROR(OL_ERRC_INVALID_SIZE,
                olGetDeviceInfo(Device, OL_DEVICE_INFO_TYPE, 0, &DeviceType));
 }
 
-TEST_P(olGetDeviceInfoTest, InvalidSizePropSizeSmall) {
+TEST_P(olGetHostDeviceInfoTest, InvalidPropSizeSmall) {
   ol_device_type_t DeviceType;
   ASSERT_ERROR(OL_ERRC_INVALID_SIZE,
                olGetDeviceInfo(Device, OL_DEVICE_INFO_TYPE,
                                sizeof(DeviceType) - 1, &DeviceType));
 }
 
-TEST_P(olGetDeviceInfoTest, InvalidNullPointerPropValue) {
+TEST_P(olGetHostDeviceInfoTest, InvalidNullPointerPropValue) {
   ol_device_type_t DeviceType;
   ASSERT_ERROR(OL_ERRC_INVALID_NULL_POINTER,
                olGetDeviceInfo(Device, OL_DEVICE_INFO_TYPE, sizeof(DeviceType),
diff --git a/offload/unittests/OffloadAPI/device/olGetDeviceInfoSize.cpp b/offload/unittests/OffloadAPI/device/olGetDeviceInfoSize.cpp
index bc4c3d92a04e1..82e0d36f027d9 100644
--- a/offload/unittests/OffloadAPI/device/olGetDeviceInfoSize.cpp
+++ b/offload/unittests/OffloadAPI/device/olGetDeviceInfoSize.cpp
@@ -6,74 +6,38 @@
 //
 //===----------------------------------------------------------------------===//
 
+#include "../common/Properties.hpp"
 #include <OffloadAPI.h>
 
-#include "../common/Fixtures.hpp"
-
 using olGetDeviceInfoSizeTest = OffloadDeviceTest;
 OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olGetDeviceInfoSizeTest);
 
-#define OL_DEVICE_INFO_SIZE_TEST(TestName, PropName, Expr)                     \
-  TEST_P(olGetDeviceInfoSizeTest, Success##TestName) {                         \
-    size_t Size = 0;                                                           \
-    ASSERT_SUCCESS(olGetDeviceInfoSize(Device, PropName, &Size));              \
-    Expr;                                                                      \
-  }
+using olGetDeviceInfoSizeEqualTest = olGetHostDeviceInfoPropertyTest;
+using olGetDeviceInfoSizeNonZeroTest = olGetHostDeviceInfoPropertyTest;
+
+DeviceInfoProperties answerSizeEqualToTypeSizeProperties = mergeProperties(
+    {Uint32Properties, Uint64Properties, CapabilitesFlagsProperties,
+     PlatformProperties, DeviceTypeProperties});
 
-#define OL_DEVICE_INFO_SIZE_TEST_EQ(TestName, PropType, PropName)              \
-  OL_DEVICE_INFO_SIZE_TEST(TestName, PropName,                                 \
-                           ASSERT_EQ(Size, sizeof(PropType)));
+OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE_WITH_PARAM(
+    olGetDeviceInfoSizeEqualTest, answerSizeEqualToTypeSizeProperties,
+    defaultPropertyTestPrinter<ol_device_info_t>);
 
-#define OL_DEVICE_INFO_SIZE_TEST_NONZERO(TestName, PropName)                   \
-  OL_DEVICE_INFO_SIZE_TEST(TestName, PropName, ASSERT_NE(Size, 0ul));
+OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE_WITH_PARAM(
+    olGetDeviceInfoSizeNonZeroTest, NamesProperties,
+    defaultPropertyTestPrinter<ol_device_info_t>);
 
-OL_DEVICE_INFO_SIZE_TEST_EQ(Type, ol_device_type_t, OL_DEVICE_INFO_TYPE);
-OL_DEVICE_INFO_SIZE_TEST_EQ(Platform, ol_platform_handle_t,
-                            OL_DEVICE_INFO_PLATFORM);
-OL_DEVICE_INFO_SIZE_TEST_NONZERO(Name, OL_DEVICE_INFO_NAME);
-OL_DEVICE_INFO_SIZE_TEST_NONZERO(ProductName, OL_DEVICE_INFO_PRODUCT_NAME);
-OL_DEVICE_INFO_SIZE_TEST_NONZERO(UID, OL_DEVICE_INFO_UID);
-OL_DEVICE_INFO_SIZE_TEST_NONZERO(Vendor, OL_DEVICE_INFO_VENDOR);
-OL_DEVICE_INFO_SIZE_TEST_NONZERO(DriverVersion, OL_DEVICE_INFO_DRIVER_VERSION);
-OL_DEVICE_INFO_SIZE_TEST_EQ(MaxWorkGroupSize, uint32_t,
-                            OL_DEVICE_INFO_MAX_WORK_GROUP_SIZE);
-OL_DEVICE_INFO_SIZE_TEST_EQ(MaxWorkSize, uint32_t,
-                            OL_DEVICE_INFO_MAX_WORK_SIZE);
-OL_DEVICE_INFO_SIZE_TEST_EQ(VendorId, uint32_t, OL_DEVICE_INFO_VENDOR_ID);
-OL_DEVICE_INFO_SIZE_TEST_EQ(NumComputeUnits, uint32_t,
-                            OL_DEVICE_INFO_NUM_COMPUTE_UNITS);
-OL_DEVICE_INFO_SIZE_TEST_EQ(SingleFPConfig, ol_device_fp_capability_flags_t,
-                            OL_DEVICE_INFO_SINGLE_FP_CONFIG);
-OL_DEVICE_INFO_SIZE_TEST_EQ(HalfFPConfig, ol_device_fp_capability_flags_t,
-                            OL_DEVICE_INFO_HALF_FP_CONFIG);
-OL_DEVICE_INFO_SIZE_TEST_EQ(DoubleFPConfig, ol_device_fp_capability_flags_t,
-                            OL_DEVICE_INFO_DOUBLE_FP_CONFIG);
-OL_DEVICE_INFO_SIZE_TEST_EQ(NativeVectorWidthChar, uint32_t,
-                            OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR);
-OL_DEVICE_INFO_SIZE_TEST_EQ(NativeVectorWidthShort, uint32_t,
-                            OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT);
-OL_DEVICE_INFO_SIZE_TEST_EQ(NativeVectorWidthInt, uint32_t,
-                            OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT);
-OL_DEVICE_INFO_SIZE_TEST_EQ(NativeVectorWidthLong, uint32_t,
-                            OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG);
-OL_DEVICE_INFO_SIZE_TEST_EQ(NativeVectorWidthFloat, uint32_t,
-                            OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT);
-OL_DEVICE_INFO_SIZE_TEST_EQ(NativeVectorWidthDouble, uint32_t,
-                            OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE);
-OL_DEVICE_INFO_SIZE_TEST_EQ(NativeVectorWidthHalf, uint32_t,
-                            OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF);
-OL_DEVICE_INFO_SIZE_TEST_EQ(MaxClockFrequency, uint32_t,
-                            OL_DEVICE_INFO_MAX_CLOCK_FREQUENCY);
-OL_DEVICE_INFO_SIZE_TEST_EQ(MemoryClockRate, uint32_t,
-                            OL_DEVICE_INFO_MEMORY_CLOCK_RATE);
-OL_DEVICE_INFO_SIZE_TEST_EQ(NumLanes, uint32_t, OL_DEVICE_INFO_NUM_LANES);
-OL_DEVICE_INFO_SIZE_TEST_EQ(AddressBits, uint32_t, OL_DEVICE_INFO_ADDRESS_BITS);
-OL_DEVICE_INFO_SIZE_TEST_EQ(MaxMemAllocSize, uint64_t,
-                            OL_DEVICE_INFO_MAX_MEM_ALLOC_SIZE);
-OL_DEVICE_INFO_SIZE_TEST_EQ(GlobalMemSize, uint64_t,
-                            OL_DEVICE_INFO_GLOBAL_MEM_SIZE);
-OL_DEVICE_INFO_SIZE_TEST_EQ(SharedMemSize, uint64_t,
-                            OL_DEVICE_INFO_WORK_GROUP_LOCAL_MEM_SIZE);
+TEST_P(olGetDeviceInfoSizeEqualTest, Success) {
+  size_t Size = 0;
+  ASSERT_SUCCESS(olGetDeviceInfoSize(Device, Property, &Size));
+  ASSERT_EQ(PropertySize, Size);
+}
+
+TEST_P(olGetDeviceInfoSizeNonZeroTest, Success) {
+  size_t Size = 0;
+  ASSERT_SUCCESS(olGetDeviceInfoSize(Device, Property, &Size));
+  ASSERT_NE(Size, 0ul);
+}
 
 TEST_P(olGetDeviceInfoSizeTest, SuccessMaxWorkGroupSizePerDimension) {
   size_t Size = 0;
diff --git a/offload/unittests/OffloadAPI/device/olGetHostInfo.cpp b/offload/unittests/OffloadAPI/device/olGetHostInfo.cpp
deleted file mode 100644
index debd29e0bb190..0000000000000
--- a/offload/unittests/OffloadAPI/device/olGetHostInfo.cpp
+++ /dev/null
@@ -1,195 +0,0 @@
-//===------- Offload API tests - olGetHostInfo ---------------------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-
-#include "../common/Fixtures.hpp"
-#include <OffloadAPI.h>
-#include <gtest/gtest.h>
-
-using olGetHostInfoTest = OffloadTest;
-
-#define OL_DEVICE_INFO_TEST_SUCCESS_CHECK(TestName, PropType, PropName, Dev,   \
-                                          Expr)                                \
-  TEST_F(olGetHostInfoTest, Test##Dev##TestName) {                             \
-    PropType Value;                                                            \
-    ASSERT_SUCCESS(olGetDeviceInfo(Dev, PropName, sizeof(Value), &Value));     \
-    Expr;                                                                      \
-  }
-
-#define OL_DEVICE_INFO_TEST_HOST_SUCCESS(TestName, PropType, PropName)         \
-  OL_DEVICE_INFO_TEST_SUCCESS_CHECK(TestName, PropType, PropName, Host, {})
-
-#define OL_DEVICE_INFO_TEST_HOST_VALUE_GT(TestName, PropType, PropName,        \
-                                          LowBound)                            \
-  OL_DEVICE_INFO_TEST_SUCCESS_CHECK(TestName, PropType, PropName, Host,        \
-                                    ASSERT_GT(Value, LowBound))
-
-TEST_F(olGetHostInfoTest, HostSuccessType) {
-  ol_device_type_t DeviceType;
-  ASSERT_SUCCESS(olGetDeviceInfo(Host, OL_DEVICE_INFO_TYPE,
-                                 sizeof(ol_device_type_t), &DeviceType));
-  ASSERT_EQ(DeviceType, OL_DEVICE_TYPE_HOST);
-}
-
-TEST_F(olGetHostInfoTest, SuccessHostPlatform) {
-  ol_platform_handle_t Platform = nullptr;
-  ASSERT_SUCCESS(olGetDeviceInfo(Host, OL_DEVICE_INFO_PLATFORM,
-                                 sizeof(ol_platform_handle_t), &Platform));
-  ASSERT_NE(Platform, nullptr);
-}
-
-TEST_F(olGetHostInfoTest, HostName) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(olGetDeviceInfoSize(Host, OL_DEVICE_INFO_NAME, &Size));
-  ASSERT_GT(Size, 0ul);
-  std::vector<char> Name;
-  Name.resize(Size);
-  ASSERT_SUCCESS(olGetDeviceInfo(Host, OL_DEVICE_INFO_NAME, Size, Name.data()));
-  ASSERT_EQ(std::strlen(Name.data()), Size - 1);
-}
-
-TEST_F(olGetHostInfoTest, HostProductName) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(olGetDeviceInfoSize(Host, OL_DEVICE_INFO_PRODUCT_NAME, &Size));
-  ASSERT_GT(Size, 0ul);
-  std::vector<char> Name;
-  Name.resize(Size);
-  ASSERT_SUCCESS(
-      olGetDeviceInfo(Host, OL_DEVICE_INFO_PRODUCT_NAME, Size, Name.data()));
-  ASSERT_EQ(std::strlen(Name.data()), Size - 1);
-}
-
-TEST_F(olGetHostInfoTest, HostUID) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(olGetDeviceInfoSize(Host, OL_DEVICE_INFO_UID, &Size));
-  ASSERT_GT(Size, 0ul);
-  std::vector<char> UID;
-  UID.resize(Size);
-  ASSERT_SUCCESS(olGetDeviceInfo(Host, OL_DEVICE_INFO_UID, Size, UID.data()));
-  ASSERT_EQ(std::strlen(UID.data()), Size - 1);
-}
-
-TEST_F(olGetHostInfoTest, SuccessHostVendor) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(olGetDeviceInfoSize(Host, OL_DEVICE_INFO_VENDOR, &Size));
-  ASSERT_GT(Size, 0ul);
-  std::vector<char> Vendor;
-  Vendor.resize(Size);
-  ASSERT_SUCCESS(
-      olGetDeviceInfo(Host, OL_DEVICE_INFO_VENDOR, Size, Vendor.data()));
-  ASSERT_EQ(std::strlen(Vendor.data()), Size - 1);
-}
-
-TEST_F(olGetHostInfoTest, SuccessHostDriverVersion) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(
-      olGetDeviceInfoSize(Host, OL_DEVICE_INFO_DRIVER_VERSION, &Size));
-  ASSERT_GT(Size, 0ul);
-  std::vector<char> DriverVersion;
-  DriverVersion.resize(Size);
-  ASSERT_SUCCESS(olGetDeviceInfo(Host, OL_DEVICE_INFO_DRIVER_VERSION, Size,
-                                 DriverVersion.data()));
-  ASSERT_EQ(std::strlen(DriverVersion.data()), Size - 1);
-}
-
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(MaxWorkGroupSize, uint32_t,
-                                  OL_DEVICE_INFO_MAX_WORK_GROUP_SIZE, 0);
-
-TEST_F(olGetHostInfoTest, SuccessHostMaxWorkGroupSizePerDimension) {
-  ol_dimensions_t Value{0, 0, 0};
-  ASSERT_SUCCESS(
-      olGetDeviceInfo(Host, OL_DEVICE_INFO_MAX_WORK_GROUP_SIZE_PER_DIMENSION,
-                      sizeof(Value), &Value));
-  ASSERT_GT(Value.x, 0u);
-  ASSERT_GT(Value.y, 0u);
-  ASSERT_GT(Value.z, 0u);
-}
-
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(MaxWorkSize, uint32_t,
-                                  OL_DEVICE_INFO_MAX_WORK_SIZE, 0);
-
-TEST_F(olGetHostInfoTest, SuccessHostMaxWorkSizePerDimension) {
-  ol_dimensions_t Value{0, 0, 0};
-  ASSERT_SUCCESS(olGetDeviceInfo(
-      Host, OL_DEVICE_INFO_MAX_WORK_SIZE_PER_DIMENSION, sizeof(Value), &Value));
-  ASSERT_GT(Value.x, 0u);
-  ASSERT_GT(Value.y, 0u);
-  ASSERT_GT(Value.z, 0u);
-}
-
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(VendorId, uint32_t, OL_DEVICE_INFO_VENDOR_ID,
-                                  0);
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(NumComputeUnits, uint32_t,
-                                  OL_DEVICE_INFO_NUM_COMPUTE_UNITS, 0);
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(SingleFPConfig,
-                                  ol_device_fp_capability_flags_t,
-                                  OL_DEVICE_INFO_SINGLE_FP_CONFIG, 0);
-OL_DEVICE_INFO_TEST_HOST_SUCCESS(HalfFPConfig, ol_device_fp_capability_flags_t,
-                                 OL_DEVICE_INFO_HALF_FP_CONFIG);
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(DoubleFPConfig,
-                                  ol_device_fp_capability_flags_t,
-                                  OL_DEVICE_INFO_DOUBLE_FP_CONFIG, 0);
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(NativeVectorWidthChar, uint32_t,
-                                  OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_CHAR, 0);
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(NativeVectorWidthShort, uint32_t,
-                                  OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_SHORT, 0);
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(NativeVectorWidthInt, uint32_t,
-                                  OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_INT, 0);
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(NativeVectorWidthLong, uint32_t,
-                                  OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_LONG, 0);
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(NativeVectorWidthFloat, uint32_t,
-                                  OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_FLOAT, 0);
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(NativeVectorWidthDouble, uint32_t,
-                                  OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_DOUBLE, 0);
-OL_DEVICE_INFO_TEST_HOST_SUCCESS(NativeVectorWidthHalf, uint32_t,
-                                 OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF);
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(MaxClockFrequency, uint32_t,
-                                  OL_DEVICE_INFO_MAX_CLOCK_FREQUENCY, 0);
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(MemoryClockRate, uint32_t,
-                                  OL_DEVICE_INFO_MEMORY_CLOCK_RATE, 0);
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(AddressBits, uint32_t,
-                                  OL_DEVICE_INFO_ADDRESS_BITS, 0);
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(MaxMemAllocSize, uint64_t,
-                                  OL_DEVICE_INFO_MAX_MEM_ALLOC_SIZE, 0);
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(GlobalMemSize, uint64_t,
-                                  OL_DEVICE_INFO_GLOBAL_MEM_SIZE, 0);
-OL_DEVICE_INFO_TEST_HOST_VALUE_GT(SharedMemSize, uint64_t,
-                                  OL_DEVICE_INFO_WORK_GROUP_LOCAL_MEM_SIZE, 0);
-
-TEST_F(olGetHostInfoTest, InvalidNullHandleDevice) {
-  ol_device_type_t DeviceType;
-  ASSERT_ERROR(OL_ERRC_INVALID_NULL_HANDLE,
-               olGetDeviceInfo(nullptr, OL_DEVICE_INFO_TYPE,
-                               sizeof(ol_device_type_t), &DeviceType));
-}
-
-TEST_F(olGetHostInfoTest, InvalidEnumerationInfoType) {
-  ol_device_type_t DeviceType;
-  ASSERT_ERROR(OL_ERRC_INVALID_ENUMERATION,
-               olGetDeviceInfo(Host, OL_DEVICE_INFO_FORCE_UINT32,
-                               sizeof(ol_device_type_t), &DeviceType));
-}
-
-TEST_F(olGetHostInfoTest, InvalidSizePropSize) {
-  ol_device_type_t DeviceType;
-  ASSERT_ERROR(OL_ERRC_INVALID_SIZE,
-               olGetDeviceInfo(Host, OL_DEVICE_INFO_TYPE, 0, &DeviceType));
-}
-
-TEST_F(olGetHostInfoTest, InvalidSizePropSizeSmall) {
-  ol_device_type_t DeviceType;
-  ASSERT_ERROR(OL_ERRC_INVALID_SIZE,
-               olGetDeviceInfo(Host, OL_DEVICE_INFO_TYPE,
-                               sizeof(DeviceType) - 1, &DeviceType));
-}
-
-TEST_F(olGetHostInfoTest, InvalidNullPointerPropValue) {
-  ol_device_type_t DeviceType;
-  ASSERT_ERROR(
-      OL_ERRC_INVALID_NULL_POINTER,
-      olGetDeviceInfo(Host, OL_DEVICE_INFO_TYPE, sizeof(DeviceType), nullptr));
-}
diff --git a/offload/unittests/OffloadAPI/memory/olGetMemInfo.cpp b/offload/unittests/OffloadAPI/memory/olGetMemInfo.cpp
index 949396417f1d2..f7b192b08b88b 100644
--- a/offload/unittests/OffloadAPI/memory/olGetMemInfo.cpp
+++ b/offload/unittests/OffloadAPI/memory/olGetMemInfo.cpp
@@ -6,97 +6,82 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "../common/Fixtures.hpp"
+#include "../common/Properties.hpp"
 #include <OffloadAPI.h>
 #include <gtest/gtest.h>
 
 constexpr size_t SIZE = 1024;
 
-struct olGetMemInfoBaseTest : OffloadDeviceTest {
-  void *OffsetPtr() { return &reinterpret_cast<char *>(Ptr)[123]; }
+struct olGetMemInfoAllocTypeTest : OffloadDeviceTestWithParam<ol_alloc_type_t> {
+  void SetUp() override {
+    RETURN_ON_FATAL_FAILURE(
+        OffloadDeviceTestWithParam<ol_alloc_type_t>::SetUp());
+    AllocType = getTestParam();
+    if (AllocType == OL_ALLOC_TYPE_HOST)
+      ASSERT_SUCCESS(olMemAllocHost(Device, SIZE, &Ptr));
+    else
+      ASSERT_SUCCESS(olMemAlloc(Device, AllocType, SIZE, &Ptr));
+  }
+
+  void TearDown() override {
+    ASSERT_SUCCESS(olMemFree(Ptr));
+    RETURN_ON_FATAL_FAILURE(
+        OffloadDeviceTestWithParam<ol_alloc_type_t>::TearDown());
+  }
 
   void *Ptr;
+
+  ol_alloc_type_t AllocType;
 };
 
-template <ol_alloc_type_t AllocType>
-struct olGetMemInfoTest : olGetMemInfoBaseTest {
+struct olGetMemInfoTest : OffloadDeviceTest {
   void SetUp() override {
     RETURN_ON_FATAL_FAILURE(OffloadDeviceTest::SetUp());
-    if constexpr (AllocType == OL_ALLOC_TYPE_HOST)
-      ASSERT_SUCCESS(olMemAllocHost(Device, SIZE, &Ptr));
-    else
-      ASSERT_SUCCESS(olMemAlloc(Device, AllocType, SIZE, &Ptr));
+    ASSERT_SUCCESS(olMemAlloc(Device, OL_ALLOC_TYPE_DEVICE, SIZE, &Ptr));
   }
 
   void TearDown() override {
     ASSERT_SUCCESS(olMemFree(Ptr));
     RETURN_ON_FATAL_FAILURE(OffloadDeviceTest::TearDown());
   }
+
+  void *Ptr;
 };
-using olGetMemInfoDeviceTest = olGetMemInfoTest<OL_ALLOC_TYPE_DEVICE>;
-OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olGetMemInfoDeviceTest);
-using olGetMemInfoManagedTest = olGetMemInfoTest<OL_ALLOC_TYPE_MANAGED>;
-OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olGetMemInfoManagedTest);
-using olGetMemInfoHostTest = olGetMemInfoTest<OL_ALLOC_TYPE_HOST>;
-OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olGetMemInfoHostTest);
-
-#define PER_ALLOC_TEST(FUNCTION)                                               \
-  TEST_P(olGetMemInfoDeviceTest, FUNCTION) {                                   \
-    FUNCTION(this, Ptr, OL_ALLOC_TYPE_DEVICE);                                 \
-  }                                                                            \
-  TEST_P(olGetMemInfoManagedTest, FUNCTION) {                                  \
-    FUNCTION(this, Ptr, OL_ALLOC_TYPE_MANAGED);                                \
-  }                                                                            \
-  TEST_P(olGetMemInfoHostTest, FUNCTION) {                                     \
-    FUNCTION(this, OffsetPtr(), OL_ALLOC_TYPE_HOST);                           \
-  }                                                                            \
-  TEST_P(olGetMemInfoDeviceTest, FUNCTION##Offset) {                           \
-    FUNCTION(this, Ptr, OL_ALLOC_TYPE_DEVICE);                                 \
-  }                                                                            \
-  TEST_P(olGetMemInfoManagedTest, FUNCTION##Offset) {                          \
-    FUNCTION(this, OffsetPtr(), OL_ALLOC_TYPE_MANAGED);                        \
-  }                                                                            \
-  TEST_P(olGetMemInfoHostTest, FUNCTION##Offset) {                             \
-    FUNCTION(this, OffsetPtr(), OL_ALLOC_TYPE_HOST);                           \
-  }
 
-void SuccessDevice(olGetMemInfoBaseTest *Fixture, void *Ptr,
-                   ol_alloc_type_t Type) {
+OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE_WITH_PARAM(
+    olGetMemInfoAllocTypeTest, AllocTypes,
+    defaultPrinterWithParam<ol_alloc_type_t>);
+OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olGetMemInfoTest);
+
+TEST_P(olGetMemInfoAllocTypeTest, SuccessDevice) {
   ol_device_handle_t RetrievedDevice;
-  ASSERT_SUCCESS(olGetMemInfo(Fixture->Ptr, OL_MEM_INFO_DEVICE,
-                              sizeof(RetrievedDevice), &RetrievedDevice));
-  ASSERT_EQ(RetrievedDevice, Fixture->Device);
+  ASSERT_SUCCESS(olGetMemInfo(Ptr, OL_MEM_INFO_DEVICE, sizeof(RetrievedDevice),
+                              &RetrievedDevice));
+  ASSERT_EQ(RetrievedDevice, Device);
 }
-PER_ALLOC_TEST(SuccessDevice);
 
-void SuccessBase(olGetMemInfoBaseTest *Fixture, void *Ptr,
-                 ol_alloc_type_t Type) {
+TEST_P(olGetMemInfoAllocTypeTest, SuccessBase) {
   void *RetrievedBase;
-  ASSERT_SUCCESS(olGetMemInfo(Fixture->Ptr, OL_MEM_INFO_BASE,
-                              sizeof(RetrievedBase), &RetrievedBase));
-  ASSERT_EQ(RetrievedBase, Fixture->Ptr);
+  ASSERT_SUCCESS(olGetMemInfo(Ptr, OL_MEM_INFO_BASE, sizeof(RetrievedBase),
+                              &RetrievedBase));
+  ASSERT_EQ(RetrievedBase, Ptr);
 }
-PER_ALLOC_TEST(SuccessBase);
 
-void SuccessSize(olGetMemInfoBaseTest *Fixture, void *Ptr,
-                 ol_alloc_type_t Type) {
+TEST_P(olGetMemInfoAllocTypeTest, SuccessSize) {
   size_t RetrievedSize;
-  ASSERT_SUCCESS(olGetMemInfo(Fixture->Ptr, OL_MEM_INFO_SIZE,
-                              sizeof(RetrievedSize), &RetrievedSize));
+  ASSERT_SUCCESS(olGetMemInfo(Ptr, OL_MEM_INFO_SIZE, sizeof(RetrievedSize),
+                              &RetrievedSize));
   ASSERT_EQ(RetrievedSize, SIZE);
 }
-PER_ALLOC_TEST(SuccessSize);
 
-void SuccessType(olGetMemInfoBaseTest *Fixture, void *Ptr,
-                 ol_alloc_type_t Type) {
+TEST_P(olGetMemInfoAllocTypeTest, SuccessType) {
   ol_alloc_type_t RetrievedType;
-  ASSERT_SUCCESS(olGetMemInfo(Fixture->Ptr, OL_MEM_INFO_TYPE,
-                              sizeof(RetrievedType), &RetrievedType));
-  ASSERT_EQ(RetrievedType, Type);
+  ASSERT_SUCCESS(olGetMemInfo(Ptr, OL_MEM_INFO_TYPE, sizeof(RetrievedType),
+                              &RetrievedType));
+  ASSERT_EQ(RetrievedType, getTestParam());
 }
-PER_ALLOC_TEST(SuccessType);
 
-TEST_P(olGetMemInfoDeviceTest, InvalidNotFound) {
+TEST_P(olGetMemInfoTest, InvalidNotFound) {
   // Assuming that we aren't unlucky and happen to get 0x1234 as a random
   // pointer
   void *RetrievedBase;
@@ -105,27 +90,27 @@ TEST_P(olGetMemInfoDeviceTest, InvalidNotFound) {
                             sizeof(RetrievedBase), &RetrievedBase));
 }
 
-TEST_P(olGetMemInfoDeviceTest, InvalidNullPtr) {
+TEST_P(olGetMemInfoTest, InvalidNullPtr) {
   ol_device_handle_t RetrievedDevice;
   ASSERT_ERROR(OL_ERRC_INVALID_NULL_POINTER,
                olGetMemInfo(nullptr, OL_MEM_INFO_DEVICE,
                             sizeof(RetrievedDevice), &RetrievedDevice));
 }
 
-TEST_P(olGetMemInfoDeviceTest, InvalidSizeZero) {
+TEST_P(olGetMemInfoTest, InvalidSizeZero) {
   ol_device_handle_t RetrievedDevice;
   ASSERT_ERROR(OL_ERRC_INVALID_SIZE,
                olGetMemInfo(Ptr, OL_MEM_INFO_DEVICE, 0, &RetrievedDevice));
 }
 
-TEST_P(olGetMemInfoDeviceTest, InvalidSizeSmall) {
+TEST_P(olGetMemInfoTest, InvalidSizeSmall) {
   ol_device_handle_t RetrievedDevice;
   ASSERT_ERROR(OL_ERRC_INVALID_SIZE,
                olGetMemInfo(Ptr, OL_MEM_INFO_DEVICE,
                             sizeof(RetrievedDevice) - 1, &RetrievedDevice));
 }
 
-TEST_P(olGetMemInfoDeviceTest, InvalidNullPointerPropValue) {
+TEST_P(olGetMemInfoTest, InvalidNullPointerPropValue) {
   ol_device_handle_t RetrievedDevice;
   ASSERT_ERROR(
       OL_ERRC_INVALID_NULL_POINTER,
diff --git a/offload/unittests/OffloadAPI/memory/olGetMemInfoSize.cpp b/offload/unittests/OffloadAPI/memory/olGetMemInfoSize.cpp
index f1a1e790fb22f..7e0ffaacea19d 100644
--- a/offload/unittests/OffloadAPI/memory/olGetMemInfoSize.cpp
+++ b/offload/unittests/OffloadAPI/memory/olGetMemInfoSize.cpp
@@ -8,7 +8,27 @@
 
 #include <OffloadAPI.h>
 
-#include "../common/Fixtures.hpp"
+#include "../common/Properties.hpp"
+
+struct olGetMemInfoSizeTypesTest : olPropertyTest<ol_mem_info_t> {
+  void *OffsetPtr() { return &reinterpret_cast<char *>(Ptr)[123]; }
+
+  void SetUp() override {
+    RETURN_ON_FATAL_FAILURE(olPropertyTest<ol_mem_info_t>::SetUp());
+    ASSERT_SUCCESS(olMemAlloc(Device, OL_ALLOC_TYPE_DEVICE, 0x1024, &Ptr));
+  }
+
+  void TearDown() override {
+    ASSERT_SUCCESS(olMemFree(Ptr));
+    RETURN_ON_FATAL_FAILURE(olPropertyTest<ol_mem_info_t>::TearDown());
+  }
+
+  void *Ptr;
+};
+
+OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE_WITH_PARAM(
+    olGetMemInfoSizeTypesTest, MemInfoSizeProperties,
+    defaultPropertyTestPrinter<ol_mem_info_t>);
 
 struct olGetMemInfoSizeTest : OffloadDeviceTest {
   void *OffsetPtr() { return &reinterpret_cast<char *>(Ptr)[123]; }
@@ -25,30 +45,13 @@ struct olGetMemInfoSizeTest : OffloadDeviceTest {
 
   void *Ptr;
 };
-OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olGetMemInfoSizeTest);
-
-TEST_P(olGetMemInfoSizeTest, SuccessDevice) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(olGetMemInfoSize(Ptr, OL_MEM_INFO_DEVICE, &Size));
-  ASSERT_EQ(Size, sizeof(ol_device_handle_t));
-}
 
-TEST_P(olGetMemInfoSizeTest, SuccessBase) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(olGetMemInfoSize(Ptr, OL_MEM_INFO_BASE, &Size));
-  ASSERT_EQ(Size, sizeof(void *));
-}
-
-TEST_P(olGetMemInfoSizeTest, SuccessSize) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(olGetMemInfoSize(Ptr, OL_MEM_INFO_SIZE, &Size));
-  ASSERT_EQ(Size, sizeof(size_t));
-}
+OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olGetMemInfoSizeTest);
 
-TEST_P(olGetMemInfoSizeTest, SuccessType) {
+TEST_P(olGetMemInfoSizeTypesTest, Success) {
   size_t Size = 0;
-  ASSERT_SUCCESS(olGetMemInfoSize(Ptr, OL_MEM_INFO_TYPE, &Size));
-  ASSERT_EQ(Size, sizeof(ol_alloc_type_t));
+  ASSERT_SUCCESS(olGetMemInfoSize(Ptr, Property, &Size));
+  ASSERT_EQ(Size, PropertySize);
 }
 
 TEST_P(olGetMemInfoSizeTest, InvalidSymbolInfoEnumeration) {
diff --git a/offload/unittests/OffloadAPI/memory/olMemAlloc.cpp b/offload/unittests/OffloadAPI/memory/olMemAlloc.cpp
index 240faff25c4a4..ae6c7f286eee2 100644
--- a/offload/unittests/OffloadAPI/memory/olMemAlloc.cpp
+++ b/offload/unittests/OffloadAPI/memory/olMemAlloc.cpp
@@ -6,47 +6,44 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "../common/Fixtures.hpp"
+#include "../common/Properties.hpp"
 #include <OffloadAPI.h>
 #include <gtest/gtest.h>
 
 using olMemAllocTest = OffloadDeviceTest;
 OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olMemAllocTest);
 
-TEST_P(olMemAllocTest, SuccessAllocManaged) {
-  void *Alloc = nullptr;
-  ASSERT_SUCCESS(olMemAlloc(Device, OL_ALLOC_TYPE_MANAGED, 1024, &Alloc));
-  ASSERT_NE(Alloc, nullptr);
-  olMemFree(Alloc);
-}
+using olMemAllocAllocTypesTest = olMemAllocHostOrDeviceTest;
 
-TEST_P(olMemAllocTest, SuccessAllocHost) {
-  void *Alloc = nullptr;
-  ASSERT_SUCCESS(olMemAllocHost(Device, 1024, &Alloc));
-  ASSERT_NE(Alloc, nullptr);
-  olMemFree(Alloc);
-}
+OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE_WITH_PARAM(
+    olMemAllocAllocTypesTest, AllocTypes,
+    defaultPrinterWithParam<ol_alloc_type_t>); // printerMine);
 
-TEST_P(olMemAllocTest, SuccessAllocDevice) {
+TEST_P(olMemAllocAllocTypesTest, Success) {
   void *Alloc = nullptr;
-  ASSERT_SUCCESS(olMemAlloc(Device, OL_ALLOC_TYPE_DEVICE, 1024, &Alloc));
+  ol_alloc_type_t AllocType = getTestParam();
+
+  if (AllocType == OL_ALLOC_TYPE_HOST) {
+    ASSERT_SUCCESS(olMemAllocHost(Device, 1024, &Alloc));
+  } else {
+    ASSERT_SUCCESS(olMemAlloc(Device, AllocType, 1024, &Alloc));
+  }
   ASSERT_NE(Alloc, nullptr);
   olMemFree(Alloc);
 }
 
 TEST_P(olMemAllocTest, SuccessAllocMany) {
   std::vector<void *> Allocs;
-  Allocs.reserve(1000);
-
-  constexpr ol_alloc_type_t TYPES[2] = {OL_ALLOC_TYPE_DEVICE,
-                                        OL_ALLOC_TYPE_MANAGED};
+  Allocs.reserve(TestAllocsNum);
 
-  for (size_t I = 1; I < 1000; I++) {
+  for (size_t I = 1; I < TestAllocsNum; I++) {
     void *Alloc = nullptr;
-    if (I % 3 == 2)
+    ol_alloc_type_t AllocType = AllocTypes[I % 3];
+    if (AllocType == OL_ALLOC_TYPE_HOST) {
       ASSERT_SUCCESS(olMemAllocHost(Device, 1024 * I, &Alloc));
-    else
-      ASSERT_SUCCESS(olMemAlloc(Device, TYPES[I % 2], 1024 * I, &Alloc));
+    } else {
+      ASSERT_SUCCESS(olMemAlloc(Device, AllocType, 1024 * I, &Alloc));
+    }
     ASSERT_NE(Alloc, nullptr);
 
     Allocs.push_back(Alloc);
diff --git a/offload/unittests/OffloadAPI/memory/olMemAllocAligned.cpp b/offload/unittests/OffloadAPI/memory/olMemAllocAligned.cpp
index 58b708787cc9d..cfba6ab0685a2 100644
--- a/offload/unittests/OffloadAPI/memory/olMemAllocAligned.cpp
+++ b/offload/unittests/OffloadAPI/memory/olMemAllocAligned.cpp
@@ -6,32 +6,35 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "../common/Fixtures.hpp"
+#include "../common/Properties.hpp"
 #include <OffloadAPI.h>
 #include <gtest/gtest.h>
 
 using olMemAllocAlignedTest = OffloadDeviceTest;
-
 OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olMemAllocAlignedTest);
 
+using olMemAllocAlignedTypesTest = olMemAllocHostOrDeviceTest;
+
+OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE_WITH_PARAM(
+    olMemAllocAlignedTypesTest, AllocTypes,
+    defaultPrinterWithParam<ol_alloc_type_t>);
+
 constexpr size_t DefaultAlignment = 16;
-constexpr size_t TestAllocsNum = 1000;
 
 TEST_P(olMemAllocAlignedTest, SuccessAllocMany) {
   std::vector<void *> Allocs;
-  Allocs.reserve(1000);
-
-  constexpr ol_alloc_type_t TYPES[2] = {OL_ALLOC_TYPE_DEVICE,
-                                        OL_ALLOC_TYPE_MANAGED};
+  Allocs.reserve(TestAllocsNum);
 
   for (size_t I = 1; I < TestAllocsNum; I++) {
     void *Alloc = nullptr;
-    if (I % 3 == 2)
+    ol_alloc_type_t AllocType = AllocTypes[I % 3];
+    if (AllocType == OL_ALLOC_TYPE_HOST) {
       ASSERT_SUCCESS(
           olMemAllocAlignedHost(Device, 1024 * I, DefaultAlignment, &Alloc));
-    else
-      ASSERT_SUCCESS(olMemAllocAligned(Device, TYPES[I % 2], 1024 * I,
+    } else {
+      ASSERT_SUCCESS(olMemAllocAligned(Device, AllocType, 1024 * I,
                                        DefaultAlignment, &Alloc));
+    }
     ASSERT_NE(Alloc, nullptr);
 
     Allocs.push_back(Alloc);
@@ -91,82 +94,23 @@ TEST_P(olMemAllocAlignedTest, CudaExceedDefaultAlignment) {
   ASSERT_EQ(Alloc, nullptr);
 }
 
-TEST_P(olMemAllocAlignedTest, SuccessAllocManagedDifferentAlignments) {
+TEST_P(olMemAllocAlignedTypesTest, SuccessAllocDifferentAlignments) {
   void *Alloc = nullptr;
-  size_t NumAlignments = 6;
   size_t Alignments[] = {8, 16, 32, 64, 128, 256};
+  size_t NumAlignments = sizeof(Alignments) / sizeof(Alignments[0]);
   size_t Alignment;
 
   for (size_t i = 0; i < NumAlignments; i++) {
     Alignment = Alignments[i];
     SCOPED_TRACE("alignment: " + std::to_string(Alignment));
-    ASSERT_SUCCESS(olMemAllocAligned(Device, OL_ALLOC_TYPE_MANAGED, 1024,
-                                     Alignment, &Alloc));
+    ASSERT_SUCCESS(allocateDeviceOrHost(1024, Alignment, &Alloc));
+    ASSERT_SUCCESS(allocateDeviceOrHost(1024, Alignment, &Alloc));
     ASSERT_NE(Alloc, nullptr);
     olMemFree(Alloc);
   }
 }
 
-TEST_P(olMemAllocAlignedTest, SuccessAllocHostDifferentAlignments) {
-  void *Alloc = nullptr;
-  size_t NumAlignments = 6;
-  size_t Alignments[] = {8, 16, 32, 64, 128, 256};
-  size_t Alignment;
-
-  for (size_t i = 0; i < NumAlignments; i++) {
-    Alignment = Alignments[i];
-    SCOPED_TRACE("alignment: " + std::to_string(Alignment));
-    ASSERT_SUCCESS(olMemAllocAlignedHost(Device, 1024, Alignment, &Alloc));
-    ASSERT_NE(Alloc, nullptr);
-    olMemFree(Alloc);
-  }
-}
-
-TEST_P(olMemAllocAlignedTest, SuccessAllocDeviceDifferentAlignments) {
-  void *Alloc = nullptr;
-  size_t NumAlignments = 6;
-  size_t Alignments[] = {8, 16, 32, 64, 128, 256};
-  size_t Alignment;
-
-  for (size_t i = 0; i < NumAlignments; i++) {
-    Alignment = Alignments[i];
-    SCOPED_TRACE("alignment: " + std::to_string(Alignment));
-    ASSERT_SUCCESS(olMemAllocAligned(Device, OL_ALLOC_TYPE_DEVICE, 1024,
-                                     Alignment, &Alloc));
-    ASSERT_NE(Alloc, nullptr);
-
-    olMemFree(Alloc);
-  }
-}
-
-TEST_P(olMemAllocAlignedTest, SuccessMemcpyManagedDiferentAlignments) {
-  constexpr size_t Size = 1024;
-  void *Alloc;
-  std::vector<uint8_t> Input(Size, 42);
-  std::vector<uint8_t> Output(Size, 0);
-
-  size_t NumAlignments = 6;
-  size_t Alignments[] = {8, 16, 32, 64, 128, 256};
-  size_t Alignment;
-  for (size_t i = 0; i < NumAlignments; i++) {
-    Alignment = Alignments[i];
-    SCOPED_TRACE("alignment: " + std::to_string(Alignment));
-
-    ASSERT_SUCCESS(olMemAllocAligned(Device, OL_ALLOC_TYPE_MANAGED, Size,
-                                     Alignment, &Alloc));
-    // memcpy is synchronous when queue is unspecified.
-    ASSERT_SUCCESS(olMemcpy(nullptr, Alloc, Device, Input.data(), Host, Size));
-    ASSERT_SUCCESS(olMemcpy(nullptr, Output.data(), Host, Alloc, Device, Size));
-
-    for (uint8_t Val : Output) {
-      ASSERT_EQ(Val, 42);
-    }
-
-    ASSERT_SUCCESS(olMemFree(Alloc));
-  }
-}
-
-TEST_P(olMemAllocAlignedTest, SuccessMemcpyDeviceDiferentAlignments) {
+TEST_P(olMemAllocAlignedTypesTest, SuccessMemcpyDiferentAlignments) {
   constexpr size_t Size = 1024;
   void *Alloc;
   std::vector<uint8_t> Input(Size, 42);
@@ -178,35 +122,7 @@ TEST_P(olMemAllocAlignedTest, SuccessMemcpyDeviceDiferentAlignments) {
   for (size_t i = 0; i < NumAlignments; i++) {
     Alignment = Alignments[i];
     SCOPED_TRACE("alignment: " + std::to_string(Alignment));
-
-    ASSERT_SUCCESS(olMemAllocAligned(Device, OL_ALLOC_TYPE_DEVICE, Size,
-                                     Alignment, &Alloc));
-    // memcpy is synchronous when queue is unspecified.
-    ASSERT_SUCCESS(olMemcpy(nullptr, Alloc, Device, Input.data(), Host, Size));
-    ASSERT_SUCCESS(olMemcpy(nullptr, Output.data(), Host, Alloc, Device, Size));
-
-    for (uint8_t Val : Output) {
-      ASSERT_EQ(Val, 42);
-    }
-
-    ASSERT_SUCCESS(olMemFree(Alloc));
-  }
-}
-
-TEST_P(olMemAllocAlignedTest, SuccessMemcpyHostDiferentAlignments) {
-  constexpr size_t Size = 1024;
-  void *Alloc;
-  std::vector<uint8_t> Input(Size, 42);
-  std::vector<uint8_t> Output(Size, 0);
-
-  size_t NumAlignments = 6;
-  size_t Alignments[] = {8, 16, 32, 64, 128, 256};
-  size_t Alignment;
-  for (size_t i = 0; i < NumAlignments; i++) {
-    Alignment = Alignments[i];
-    SCOPED_TRACE("alignment: " + std::to_string(Alignment));
-
-    ASSERT_SUCCESS(olMemAllocAlignedHost(Device, Size, Alignment, &Alloc));
+    ASSERT_SUCCESS(allocateDeviceOrHost(Size, Alignment, &Alloc));
     // memcpy is synchronous when queue is unspecified.
     ASSERT_SUCCESS(olMemcpy(nullptr, Alloc, Device, Input.data(), Host, Size));
     ASSERT_SUCCESS(olMemcpy(nullptr, Output.data(), Host, Alloc, Device, Size));
diff --git a/offload/unittests/OffloadAPI/memory/olMemFree.cpp b/offload/unittests/OffloadAPI/memory/olMemFree.cpp
index c7f795832d7bb..0bb7475bee1ae 100644
--- a/offload/unittests/OffloadAPI/memory/olMemFree.cpp
+++ b/offload/unittests/OffloadAPI/memory/olMemFree.cpp
@@ -6,28 +6,26 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "../common/Fixtures.hpp"
+#include "../common/Properties.hpp"
 #include <OffloadAPI.h>
 #include <gtest/gtest.h>
 
 using olMemFreeTest = OffloadDeviceTest;
 OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olMemFreeTest);
 
-TEST_P(olMemFreeTest, SuccessFreeManaged) {
-  void *Alloc = nullptr;
-  ASSERT_SUCCESS(olMemAlloc(Device, OL_ALLOC_TYPE_MANAGED, 1024, &Alloc));
-  ASSERT_SUCCESS(olMemFree(Alloc));
-}
-
-TEST_P(olMemFreeTest, SuccessFreeHost) {
-  void *Alloc = nullptr;
-  ASSERT_SUCCESS(olMemAllocHost(Device, 1024, &Alloc));
-  ASSERT_SUCCESS(olMemFree(Alloc));
-}
+using olMemFreeAllocTypesTest = OffloadDeviceTestWithParam<ol_alloc_type_t>;
+OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE_WITH_PARAM(
+    olMemFreeAllocTypesTest, AllocTypes,
+    defaultPrinterWithParam<ol_alloc_type_t>);
 
-TEST_P(olMemFreeTest, SuccessFreeDevice) {
+TEST_P(olMemFreeAllocTypesTest, Success) {
   void *Alloc = nullptr;
-  ASSERT_SUCCESS(olMemAlloc(Device, OL_ALLOC_TYPE_DEVICE, 1024, &Alloc));
+  ol_alloc_type_t AllocType = getTestParam();
+  if (AllocType == OL_ALLOC_TYPE_HOST) {
+    ASSERT_SUCCESS(olMemAllocHost(Device, 1024, &Alloc));
+  } else {
+    ASSERT_SUCCESS(olMemAlloc(Device, AllocType, 1024, &Alloc));
+  }
   ASSERT_SUCCESS(olMemFree(Alloc));
 }
 
diff --git a/offload/unittests/OffloadAPI/platform/olGetPlatformInfo.cpp b/offload/unittests/OffloadAPI/platform/olGetPlatformInfo.cpp
index 862b008fb9e85..f95ecd21e1232 100644
--- a/offload/unittests/OffloadAPI/platform/olGetPlatformInfo.cpp
+++ b/offload/unittests/OffloadAPI/platform/olGetPlatformInfo.cpp
@@ -8,46 +8,28 @@
 
 #include <OffloadAPI.h>
 
-#include "../common/Fixtures.hpp"
+#include "../common/Properties.hpp"
 
 using olGetPlatformInfoTest = OffloadPlatformTest;
 OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olGetPlatformInfoTest);
 
-TEST_P(olGetPlatformInfoTest, SuccessName) {
+using olGetPlatformInfoNamesTest =
+    OffloadPlatformTestWithParam<ol_platform_info_t>;
+OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE_WITH_PARAM(
+    olGetPlatformInfoNamesTest, PlatformInfoNames,
+    defaultPrinterWithParam<ol_platform_info_t>);
+
+TEST_P(olGetPlatformInfoNamesTest, SuccessName) {
   size_t Size = 0;
-  ASSERT_SUCCESS(olGetPlatformInfoSize(Platform, OL_PLATFORM_INFO_NAME, &Size));
+  ASSERT_SUCCESS(olGetPlatformInfoSize(Platform, getTestParam(), &Size));
   ASSERT_GT(Size, 0ul);
   std::vector<char> Name;
   Name.resize(Size);
   ASSERT_SUCCESS(
-      olGetPlatformInfo(Platform, OL_PLATFORM_INFO_NAME, Size, Name.data()));
+      olGetPlatformInfo(Platform, getTestParam(), Size, Name.data()));
   ASSERT_EQ(std::strlen(Name.data()), Size - 1);
 }
 
-TEST_P(olGetPlatformInfoTest, SuccessVendorName) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(
-      olGetPlatformInfoSize(Platform, OL_PLATFORM_INFO_VENDOR_NAME, &Size));
-  ASSERT_GT(Size, 0ul);
-  std::vector<char> VendorName;
-  VendorName.resize(Size);
-  ASSERT_SUCCESS(olGetPlatformInfo(Platform, OL_PLATFORM_INFO_VENDOR_NAME, Size,
-                                   VendorName.data()));
-  ASSERT_EQ(std::strlen(VendorName.data()), Size - 1);
-}
-
-TEST_P(olGetPlatformInfoTest, SuccessVersion) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(
-      olGetPlatformInfoSize(Platform, OL_PLATFORM_INFO_VERSION, &Size));
-  ASSERT_GT(Size, 0ul);
-  std::vector<char> Version;
-  Version.resize(Size);
-  ASSERT_SUCCESS(olGetPlatformInfo(Platform, OL_PLATFORM_INFO_VERSION, Size,
-                                   Version.data()));
-  ASSERT_EQ(std::strlen(Version.data()), Size - 1);
-}
-
 TEST_P(olGetPlatformInfoTest, SuccessBackend) {
   ol_platform_backend_t Backend;
   ASSERT_SUCCESS(olGetPlatformInfo(Platform, OL_PLATFORM_INFO_BACKEND,
diff --git a/offload/unittests/OffloadAPI/platform/olGetPlatformInfoSize.cpp b/offload/unittests/OffloadAPI/platform/olGetPlatformInfoSize.cpp
index 9ed9835ff945e..b7478bc64d2cb 100644
--- a/offload/unittests/OffloadAPI/platform/olGetPlatformInfoSize.cpp
+++ b/offload/unittests/OffloadAPI/platform/olGetPlatformInfoSize.cpp
@@ -8,28 +8,20 @@
 
 #include <OffloadAPI.h>
 
-#include "../common/Fixtures.hpp"
+#include "../common/Properties.hpp"
 
 using olGetPlatformInfoSizeTest = OffloadPlatformTest;
 OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olGetPlatformInfoSizeTest);
 
-TEST_P(olGetPlatformInfoSizeTest, SuccessName) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(olGetPlatformInfoSize(Platform, OL_PLATFORM_INFO_NAME, &Size));
-  ASSERT_NE(Size, 0ul);
-}
+using olGetPlatformInfoSizeNameTest =
+    OffloadPlatformTestWithParam<ol_platform_info_t>;
+OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE_WITH_PARAM(
+    olGetPlatformInfoSizeNameTest, PlatformInfoNames,
+    defaultPrinterWithParam<ol_platform_info_t>);
 
-TEST_P(olGetPlatformInfoSizeTest, SuccessVendorName) {
+TEST_P(olGetPlatformInfoSizeNameTest, Success) {
   size_t Size = 0;
-  ASSERT_SUCCESS(
-      olGetPlatformInfoSize(Platform, OL_PLATFORM_INFO_VENDOR_NAME, &Size));
-  ASSERT_NE(Size, 0ul);
-}
-
-TEST_P(olGetPlatformInfoSizeTest, SuccessVersion) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(
-      olGetPlatformInfoSize(Platform, OL_PLATFORM_INFO_VERSION, &Size));
+  ASSERT_SUCCESS(olGetPlatformInfoSize(Platform, getTestParam(), &Size));
   ASSERT_NE(Size, 0ul);
 }
 
diff --git a/offload/unittests/OffloadAPI/symbol/olGetSymbolInfoSize.cpp b/offload/unittests/OffloadAPI/symbol/olGetSymbolInfoSize.cpp
index ec011865cc6ad..60c1a6767b13b 100644
--- a/offload/unittests/OffloadAPI/symbol/olGetSymbolInfoSize.cpp
+++ b/offload/unittests/OffloadAPI/symbol/olGetSymbolInfoSize.cpp
@@ -8,38 +8,25 @@
 
 #include <OffloadAPI.h>
 
-#include "../common/Fixtures.hpp"
+#include "../common/Properties.hpp"
 
 using olGetSymbolInfoSizeKernelTest = OffloadKernelTest;
 OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olGetSymbolInfoSizeKernelTest);
 
-using olGetSymbolInfoSizeGlobalTest = OffloadGlobalTest;
-OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olGetSymbolInfoSizeGlobalTest);
+OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE_WITH_PARAM(
+    olGetSymbolInfoSizeGlobalTest, SymbolGlobalProperties,
+    defaultPropertyTestPrinter<ol_symbol_info_t>);
 
-TEST_P(olGetSymbolInfoSizeKernelTest, SuccessKind) {
+TEST_P(olGetSymbolInfoSizeKernelTest, SuccessPropertySize) {
   size_t Size = 0;
   ASSERT_SUCCESS(olGetSymbolInfoSize(Kernel, OL_SYMBOL_INFO_KIND, &Size));
   ASSERT_EQ(Size, sizeof(ol_symbol_kind_t));
 }
 
-TEST_P(olGetSymbolInfoSizeGlobalTest, SuccessKind) {
+TEST_P(olGetSymbolInfoSizeGlobalTest, SuccessPropertySize) {
   size_t Size = 0;
-  ASSERT_SUCCESS(olGetSymbolInfoSize(Global, OL_SYMBOL_INFO_KIND, &Size));
-  ASSERT_EQ(Size, sizeof(ol_symbol_kind_t));
-}
-
-TEST_P(olGetSymbolInfoSizeGlobalTest, SuccessAddress) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(olGetSymbolInfoSize(
-      Global, OL_SYMBOL_INFO_GLOBAL_VARIABLE_ADDRESS, &Size));
-  ASSERT_EQ(Size, sizeof(void *));
-}
-
-TEST_P(olGetSymbolInfoSizeGlobalTest, SuccessSize) {
-  size_t Size = 0;
-  ASSERT_SUCCESS(
-      olGetSymbolInfoSize(Global, OL_SYMBOL_INFO_GLOBAL_VARIABLE_SIZE, &Size));
-  ASSERT_EQ(Size, sizeof(size_t));
+  ASSERT_SUCCESS(olGetSymbolInfoSize(Global, Property, &Size));
+  ASSERT_EQ(Size, PropertySize);
 }
 
 TEST_P(olGetSymbolInfoSizeKernelTest, InvalidNullHandle) {

>From 897781ae125dd9babc7f8cecadf5060e07ebf385 Mon Sep 17 00:00:00 2001
From: Agata Momot <agata.momot at intel.com>
Date: Fri, 31 Jul 2026 10:14:01 +0200
Subject: [PATCH 02/10] remove pragma, add explanatory comments

---
 .../unittests/OffloadAPI/common/Properties.hpp | 18 +++++++++++++++---
 1 file changed, 15 insertions(+), 3 deletions(-)

diff --git a/offload/unittests/OffloadAPI/common/Properties.hpp b/offload/unittests/OffloadAPI/common/Properties.hpp
index 4c7d827dbd156..12776fe2b1b30 100644
--- a/offload/unittests/OffloadAPI/common/Properties.hpp
+++ b/offload/unittests/OffloadAPI/common/Properties.hpp
@@ -1,8 +1,17 @@
-#pragma once
-
 #include "Fixtures.hpp"
 #include "OffloadAPI.h"
 
+// Properties are grouped by the data type that stores the information. As
+// queries for selected properties might have different results for either the
+// device or the host, or might be even unsupported for the host, some of the
+// tests verify only whether the function that queried the host returned success
+// rather than checking the exact value. For tests analyzing the exact value -
+// for example, verifying whether the value is greater than the given lower
+// bound - only relevant host properties are added to the container with
+// properties passed to the fixture during instantiation. The selection of
+// relevant properties is achieved by merging or removing selected properties,
+// marked as "Relevant" or "Irrelevant" in their names.
+
 inline constexpr size_t MAX_DEVICE_INFO_BYTES = 8;
 
 inline constexpr char zeroArray[MAX_DEVICE_INFO_BYTES] = {};
@@ -12,9 +21,12 @@ template <typename T> struct SizedProperty {
   T property;
 };
 
+// Firstly, we list all needed properties explicitly in PropertiesContainer
+template <typename T> using PropertiesContainer = std::set<T>;
+// Secondly, we process selected properties and save their data sizes for tests
+// that require them
 template <typename T>
 using PropertiesWithSizeContainer = std::vector<SizedProperty<T>>;
-template <typename T> using PropertiesContainer = std::set<T>;
 template <typename T>
 using PropertiesTypes = std::unordered_map<T, SizedProperty<T>>;
 

>From 033f16e11a529a7febc92360f36bbb15ceafe42c Mon Sep 17 00:00:00 2001
From: Agata Momot <agata.momot at intel.com>
Date: Fri, 31 Jul 2026 22:04:12 +0200
Subject: [PATCH 03/10] fix using only aligned versions of olMemAlloc for
 olMemAlloc and olMemllocAligned tests

---
 .../OffloadAPI/common/Properties.hpp          | 14 +-------
 .../OffloadAPI/memory/olMemAlloc.cpp          | 24 +++++++------
 .../OffloadAPI/memory/olMemAllocAligned.cpp   | 35 ++++++++++++-------
 3 files changed, 38 insertions(+), 35 deletions(-)

diff --git a/offload/unittests/OffloadAPI/common/Properties.hpp b/offload/unittests/OffloadAPI/common/Properties.hpp
index 12776fe2b1b30..88823e4217ed0 100644
--- a/offload/unittests/OffloadAPI/common/Properties.hpp
+++ b/offload/unittests/OffloadAPI/common/Properties.hpp
@@ -245,22 +245,10 @@ inline const ol_platform_info_t PlatformInfoNames[3] = {
     OL_PLATFORM_INFO_VERSION};
 
 // ol_alloc_type_t
-struct olMemAllocHostOrDeviceTest
-    : OffloadDeviceTestWithParam<ol_alloc_type_t> {
-  ol_result_t allocateDeviceOrHost(size_t Size, size_t Alignment,
-                                   void **Alloc) {
-    ol_alloc_type_t AllocType = getTestParam();
-    if (AllocType == OL_ALLOC_TYPE_HOST) {
-      return olMemAllocAlignedHost(this->Device, Size, Alignment, Alloc);
-    }
-
-    return olMemAllocAligned(this->Device, AllocType, Size, Alignment, Alloc);
-  }
-};
-
 inline const ol_alloc_type_t AllocTypes[3] = {
     OL_ALLOC_TYPE_DEVICE, OL_ALLOC_TYPE_MANAGED, OL_ALLOC_TYPE_HOST};
 inline const size_t TestAllocsNum = 1000;
+inline const size_t DefaultAllocSize = 1024;
 
 // ol_mem_info_t
 using MemInfoProp = PropertiesContainer<ol_mem_info_t>;
diff --git a/offload/unittests/OffloadAPI/memory/olMemAlloc.cpp b/offload/unittests/OffloadAPI/memory/olMemAlloc.cpp
index ae6c7f286eee2..3dfd8de06eea6 100644
--- a/offload/unittests/OffloadAPI/memory/olMemAlloc.cpp
+++ b/offload/unittests/OffloadAPI/memory/olMemAlloc.cpp
@@ -13,7 +13,16 @@
 using olMemAllocTest = OffloadDeviceTest;
 OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olMemAllocTest);
 
-using olMemAllocAllocTypesTest = olMemAllocHostOrDeviceTest;
+struct olMemAllocAllocTypesTest : OffloadDeviceTestWithParam<ol_alloc_type_t> {
+  ol_result_t allocateDeviceOrHost(size_t Size, void **Alloc) {
+    ol_alloc_type_t AllocType = getTestParam();
+    if (AllocType == OL_ALLOC_TYPE_HOST) {
+      return olMemAllocHost(this->Device, Size, Alloc);
+    }
+
+    return olMemAlloc(this->Device, AllocType, Size, Alloc);
+  }
+};
 
 OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE_WITH_PARAM(
     olMemAllocAllocTypesTest, AllocTypes,
@@ -21,13 +30,7 @@ OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE_WITH_PARAM(
 
 TEST_P(olMemAllocAllocTypesTest, Success) {
   void *Alloc = nullptr;
-  ol_alloc_type_t AllocType = getTestParam();
-
-  if (AllocType == OL_ALLOC_TYPE_HOST) {
-    ASSERT_SUCCESS(olMemAllocHost(Device, 1024, &Alloc));
-  } else {
-    ASSERT_SUCCESS(olMemAlloc(Device, AllocType, 1024, &Alloc));
-  }
+  ASSERT_SUCCESS(allocateDeviceOrHost(DefaultAllocSize, &Alloc));
   ASSERT_NE(Alloc, nullptr);
   olMemFree(Alloc);
 }
@@ -40,9 +43,10 @@ TEST_P(olMemAllocTest, SuccessAllocMany) {
     void *Alloc = nullptr;
     ol_alloc_type_t AllocType = AllocTypes[I % 3];
     if (AllocType == OL_ALLOC_TYPE_HOST) {
-      ASSERT_SUCCESS(olMemAllocHost(Device, 1024 * I, &Alloc));
+      ASSERT_SUCCESS(olMemAllocHost(Device, DefaultAllocSize * I, &Alloc));
     } else {
-      ASSERT_SUCCESS(olMemAlloc(Device, AllocType, 1024 * I, &Alloc));
+      ASSERT_SUCCESS(
+          olMemAlloc(Device, AllocType, DefaultAllocSize * I, &Alloc));
     }
     ASSERT_NE(Alloc, nullptr);
 
diff --git a/offload/unittests/OffloadAPI/memory/olMemAllocAligned.cpp b/offload/unittests/OffloadAPI/memory/olMemAllocAligned.cpp
index cfba6ab0685a2..ab995abcbb002 100644
--- a/offload/unittests/OffloadAPI/memory/olMemAllocAligned.cpp
+++ b/offload/unittests/OffloadAPI/memory/olMemAllocAligned.cpp
@@ -13,7 +13,18 @@
 using olMemAllocAlignedTest = OffloadDeviceTest;
 OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE(olMemAllocAlignedTest);
 
-using olMemAllocAlignedTypesTest = olMemAllocHostOrDeviceTest;
+struct olMemAllocAlignedTypesTest
+    : OffloadDeviceTestWithParam<ol_alloc_type_t> {
+  ol_result_t allocateDeviceOrHost(size_t Size, size_t Alignment,
+                                   void **Alloc) {
+    ol_alloc_type_t AllocType = getTestParam();
+    if (AllocType == OL_ALLOC_TYPE_HOST) {
+      return olMemAllocAlignedHost(this->Device, Size, Alignment, Alloc);
+    }
+
+    return olMemAllocAligned(this->Device, AllocType, Size, Alignment, Alloc);
+  }
+};
 
 OFFLOAD_TESTS_INSTANTIATE_DEVICE_FIXTURE_WITH_PARAM(
     olMemAllocAlignedTypesTest, AllocTypes,
@@ -29,10 +40,10 @@ TEST_P(olMemAllocAlignedTest, SuccessAllocMany) {
     void *Alloc = nullptr;
     ol_alloc_type_t AllocType = AllocTypes[I % 3];
     if (AllocType == OL_ALLOC_TYPE_HOST) {
-      ASSERT_SUCCESS(
-          olMemAllocAlignedHost(Device, 1024 * I, DefaultAlignment, &Alloc));
+      ASSERT_SUCCESS(olMemAllocAlignedHost(Device, DefaultAllocSize * I,
+                                           DefaultAlignment, &Alloc));
     } else {
-      ASSERT_SUCCESS(olMemAllocAligned(Device, AllocType, 1024 * I,
+      ASSERT_SUCCESS(olMemAllocAligned(Device, AllocType, DefaultAllocSize * I,
                                        DefaultAlignment, &Alloc));
     }
     ASSERT_NE(Alloc, nullptr);
@@ -103,18 +114,16 @@ TEST_P(olMemAllocAlignedTypesTest, SuccessAllocDifferentAlignments) {
   for (size_t i = 0; i < NumAlignments; i++) {
     Alignment = Alignments[i];
     SCOPED_TRACE("alignment: " + std::to_string(Alignment));
-    ASSERT_SUCCESS(allocateDeviceOrHost(1024, Alignment, &Alloc));
-    ASSERT_SUCCESS(allocateDeviceOrHost(1024, Alignment, &Alloc));
+    ASSERT_SUCCESS(allocateDeviceOrHost(DefaultAllocSize, Alignment, &Alloc));
     ASSERT_NE(Alloc, nullptr);
     olMemFree(Alloc);
   }
 }
 
 TEST_P(olMemAllocAlignedTypesTest, SuccessMemcpyDiferentAlignments) {
-  constexpr size_t Size = 1024;
   void *Alloc;
-  std::vector<uint8_t> Input(Size, 42);
-  std::vector<uint8_t> Output(Size, 0);
+  std::vector<uint8_t> Input(DefaultAllocSize, 42);
+  std::vector<uint8_t> Output(DefaultAllocSize, 0);
 
   size_t NumAlignments = 6;
   size_t Alignments[] = {8, 16, 32, 64, 128, 256};
@@ -122,10 +131,12 @@ TEST_P(olMemAllocAlignedTypesTest, SuccessMemcpyDiferentAlignments) {
   for (size_t i = 0; i < NumAlignments; i++) {
     Alignment = Alignments[i];
     SCOPED_TRACE("alignment: " + std::to_string(Alignment));
-    ASSERT_SUCCESS(allocateDeviceOrHost(Size, Alignment, &Alloc));
+    ASSERT_SUCCESS(allocateDeviceOrHost(DefaultAllocSize, Alignment, &Alloc));
     // memcpy is synchronous when queue is unspecified.
-    ASSERT_SUCCESS(olMemcpy(nullptr, Alloc, Device, Input.data(), Host, Size));
-    ASSERT_SUCCESS(olMemcpy(nullptr, Output.data(), Host, Alloc, Device, Size));
+    ASSERT_SUCCESS(
+        olMemcpy(nullptr, Alloc, Device, Input.data(), Host, DefaultAllocSize));
+    ASSERT_SUCCESS(olMemcpy(nullptr, Output.data(), Host, Alloc, Device,
+                            DefaultAllocSize));
 
     for (uint8_t Val : Output) {
       ASSERT_EQ(Val, 42);

>From 25e1fdf9753a502b18e756c1aa1ca6ce4c971653 Mon Sep 17 00:00:00 2001
From: Agata Momot <agata.momot at intel.com>
Date: Tue, 4 Aug 2026 20:08:29 +0200
Subject: [PATCH 04/10] playing round with memory

---
 offload/unittests/OffloadAPI/memory/olMemAllocAligned.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/offload/unittests/OffloadAPI/memory/olMemAllocAligned.cpp b/offload/unittests/OffloadAPI/memory/olMemAllocAligned.cpp
index ab995abcbb002..a894dde5ec77c 100644
--- a/offload/unittests/OffloadAPI/memory/olMemAllocAligned.cpp
+++ b/offload/unittests/OffloadAPI/memory/olMemAllocAligned.cpp
@@ -101,7 +101,7 @@ TEST_P(olMemAllocAlignedTest, CudaExceedDefaultAlignment) {
   // The default page size for cuda is 64 KB.
   ASSERT_ERROR(OL_ERRC_UNSUPPORTED,
                olMemAllocAligned(Device, OL_ALLOC_TYPE_DEVICE, 1024,
-                                 1024 * 64 * 64, &Alloc));
+                                 1024 * 64 * 64 * 64, &Alloc));
   ASSERT_EQ(Alloc, nullptr);
 }
 

>From 837d3ff2659374c56426cf84a151041592186114 Mon Sep 17 00:00:00 2001
From: Agata Momot <agata.momot at intel.com>
Date: Wed, 5 Aug 2026 09:21:26 +0200
Subject: [PATCH 05/10] fix CamelCase

---
 .../OffloadAPI/common/Properties.hpp          | 75 ++++++++++---------
 1 file changed, 38 insertions(+), 37 deletions(-)

diff --git a/offload/unittests/OffloadAPI/common/Properties.hpp b/offload/unittests/OffloadAPI/common/Properties.hpp
index 88823e4217ed0..0b0323dab6697 100644
--- a/offload/unittests/OffloadAPI/common/Properties.hpp
+++ b/offload/unittests/OffloadAPI/common/Properties.hpp
@@ -14,11 +14,11 @@
 
 inline constexpr size_t MAX_DEVICE_INFO_BYTES = 8;
 
-inline constexpr char zeroArray[MAX_DEVICE_INFO_BYTES] = {};
+inline constexpr char ZeroArray[MAX_DEVICE_INFO_BYTES] = {};
 
 template <typename T> struct SizedProperty {
-  size_t size;
-  T property;
+  size_t Size;
+  T Property;
 };
 
 // Firstly, we list all needed properties explicitly in PropertiesContainer
@@ -35,47 +35,46 @@ auto createPropertiesWithSizeContainer(
     size_t PropSize, PropertiesContainer<T> SelectedProperties)
     -> PropertiesWithSizeContainer<T> {
   PropertiesWithSizeContainer<T> Res;
-  for (auto p : SelectedProperties) {
-    Res.push_back({PropSize, p});
+  for (auto Prop : SelectedProperties) {
+    Res.push_back({PropSize, Prop});
   }
 
   return Res;
 }
 
 template <typename T>
-auto mergeProperties(
-    std::initializer_list<PropertiesWithSizeContainer<T>> properties)
-    -> PropertiesWithSizeContainer<T> {
-  PropertiesWithSizeContainer<T> finalProperties;
+auto mergeProperties(std::initializer_list<PropertiesWithSizeContainer<T>>
+                         Properties) -> PropertiesWithSizeContainer<T> {
+  PropertiesWithSizeContainer<T> FinalProperties;
 
-  for (auto prop : properties) {
-    finalProperties.insert(finalProperties.end(), prop.begin(), prop.end());
+  for (auto Prop : Properties) {
+    FinalProperties.insert(FinalProperties.end(), Prop.begin(), Prop.end());
   }
 
-  return finalProperties;
+  return FinalProperties;
 }
 
 template <typename T>
 PropertiesContainer<T>
-removeIrrelevantProperties(PropertiesContainer<T> base,
-                           PropertiesContainer<T> unwanted) {
-  PropertiesContainer<T> res(base);
+removeIrrelevantProperties(PropertiesContainer<T> Base,
+                           PropertiesContainer<T> Unwanted) {
+  PropertiesContainer<T> Res(Base);
 
-  for (auto prop : unwanted) {
-    res.erase(prop);
+  for (auto Prop : Unwanted) {
+    Res.erase(Prop);
   }
 
-  return res;
+  return Res;
 }
 
 template <typename T>
 PropertiesTypes<T> inline createTypesMap(
-    std::initializer_list<PropertiesWithSizeContainer<T>> properties) {
+    std::initializer_list<PropertiesWithSizeContainer<T>> Properties) {
   PropertiesTypes<T> Res;
 
-  for (auto container : properties) {
-    for (auto prop : container) {
-      Res.insert({prop.property, prop});
+  for (auto Container : Properties) {
+    for (auto Prop : Container) {
+      Res.insert({Prop.Property, Prop});
     }
   }
 
@@ -167,23 +166,23 @@ inline const DeviceInfoPropertiesTypes propertiesTypes =
     createTypesMap({BoolProperties, Uint32Properties, Uint64Properties,
                     CapabilitesFlagsProperties});
 
-inline bool defaultCheckIsNonZero(char *buffer) {
-  return memcmp(buffer, zeroArray, MAX_DEVICE_INFO_BYTES) != 0;
+inline bool defaultCheckIsNonZero(char *Buffer) {
+  return memcmp(Buffer, ZeroArray, MAX_DEVICE_INFO_BYTES) != 0;
 }
 
 template <typename T>
 inline std::string defaultPropertyTestPrinter(
     const ::testing::TestParamInfo<OffloadParam<SizedProperty<T>>> &info) {
-  auto device = std::get<0>(info.param);
-  auto paramData = std::get<1>(info.param);
+  auto Device = std::get<0>(info.param);
+  auto ParamData = std::get<1>(info.param);
 
-  std::string ss;
-  llvm::raw_string_ostream finalName(ss);
+  std::string TempStr;
+  llvm::raw_string_ostream FinalName(TempStr);
 
-  auto property = paramData.property;
-  finalName << device.Name << "__" << property;
+  auto Prop = ParamData.Property;
+  FinalName << Device.Name << "__" << Prop;
 
-  return SanitizeString(finalName.str());
+  return SanitizeString(FinalName.str());
 }
 
 template <typename T>
@@ -192,9 +191,9 @@ struct olPropertyTest : OffloadDeviceTestWithParam<SizedProperty<T>> {
     RETURN_ON_FATAL_FAILURE(
         OffloadDeviceTestWithParam<SizedProperty<T>>::SetUp());
 
-    auto paramData = this->getTestParam();
-    PropertySize = paramData.size;
-    Property = paramData.property;
+    auto ParamData = this->getTestParam();
+    PropertySize = ParamData.Size;
+    Property = ParamData.Property;
   }
 
   size_t PropertySize = 0;
@@ -202,6 +201,8 @@ struct olPropertyTest : OffloadDeviceTestWithParam<SizedProperty<T>> {
 };
 
 struct olGetHostDeviceInfoPropertyTest : olPropertyTest<ol_device_info_t> {
+  // Used when the fixture has been instantiated with getDevicesAndHost() in
+  // Fixtures.hpp instead of TestEnvironment::getDevices()
   bool isHost() { return Host == this->Device; }
 };
 
@@ -230,9 +231,9 @@ struct olGetSymbolInfoSizeGlobalTest
     RETURN_ON_FATAL_FAILURE(
         OffloadGlobalTestWithParam<SymbolInfoTuple>::SetUp());
 
-    auto paramData = this->getTestParam();
-    PropertySize = paramData.size;
-    Property = paramData.property;
+    auto ParamData = this->getTestParam();
+    PropertySize = ParamData.Size;
+    Property = ParamData.Property;
   }
 
   size_t PropertySize = 0;

>From 5605933944e314dd8cef0489cc6ba0d5f1574a9b Mon Sep 17 00:00:00 2001
From: Agata Momot <agata.momot at intel.com>
Date: Thu, 6 Aug 2026 11:28:03 +0200
Subject: [PATCH 06/10] formatting

---
 offload/unittests/OffloadAPI/common/Properties.hpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/offload/unittests/OffloadAPI/common/Properties.hpp b/offload/unittests/OffloadAPI/common/Properties.hpp
index 0b0323dab6697..0d47079addd3a 100644
--- a/offload/unittests/OffloadAPI/common/Properties.hpp
+++ b/offload/unittests/OffloadAPI/common/Properties.hpp
@@ -43,8 +43,9 @@ auto createPropertiesWithSizeContainer(
 }
 
 template <typename T>
-auto mergeProperties(std::initializer_list<PropertiesWithSizeContainer<T>>
-                         Properties) -> PropertiesWithSizeContainer<T> {
+auto mergeProperties(
+    std::initializer_list<PropertiesWithSizeContainer<T>> Properties)
+    -> PropertiesWithSizeContainer<T> {
   PropertiesWithSizeContainer<T> FinalProperties;
 
   for (auto Prop : Properties) {

>From e84dc400650dbc314adca686791a59c41b93173a Mon Sep 17 00:00:00 2001
From: Agata Momot <agata.momot at intel.com>
Date: Thu, 6 Aug 2026 13:39:13 +0200
Subject: [PATCH 07/10] remove propertiesTypes

---
 .../OffloadAPI/common/Properties.hpp          | 25 +++----------------
 .../OffloadAPI/device/olGetDeviceInfo.cpp     |  4 +--
 2 files changed, 6 insertions(+), 23 deletions(-)

diff --git a/offload/unittests/OffloadAPI/common/Properties.hpp b/offload/unittests/OffloadAPI/common/Properties.hpp
index 0d47079addd3a..b1e3645836d78 100644
--- a/offload/unittests/OffloadAPI/common/Properties.hpp
+++ b/offload/unittests/OffloadAPI/common/Properties.hpp
@@ -27,8 +27,6 @@ template <typename T> using PropertiesContainer = std::set<T>;
 // that require them
 template <typename T>
 using PropertiesWithSizeContainer = std::vector<SizedProperty<T>>;
-template <typename T>
-using PropertiesTypes = std::unordered_map<T, SizedProperty<T>>;
 
 template <typename T>
 auto createPropertiesWithSizeContainer(
@@ -68,24 +66,9 @@ removeIrrelevantProperties(PropertiesContainer<T> Base,
   return Res;
 }
 
-template <typename T>
-PropertiesTypes<T> inline createTypesMap(
-    std::initializer_list<PropertiesWithSizeContainer<T>> Properties) {
-  PropertiesTypes<T> Res;
-
-  for (auto Container : Properties) {
-    for (auto Prop : Container) {
-      Res.insert({Prop.Property, Prop});
-    }
-  }
-
-  return Res;
-}
-
 // ol_device_info_t
 using DeviceInfoProp = PropertiesContainer<ol_device_info_t>;
 using DeviceInfoProperties = PropertiesWithSizeContainer<ol_device_info_t>;
-using DeviceInfoPropertiesTypes = PropertiesTypes<ol_device_info_t>;
 
 inline const DeviceInfoProp PropBool{OL_DEVICE_INFO_SINGLE_FP_SUPPORT,
                                      OL_DEVICE_INFO_DOUBLE_FP_SUPPORT,
@@ -128,6 +111,8 @@ inline const DeviceInfoProperties CapabilitesFlagsProperties =
 
 inline const DeviceInfoProp PropIrrelevantGTCapabilities = {
     OL_DEVICE_INFO_HALF_FP_CONFIG};
+inline const DeviceInfoProperties IrrelevantGTCapabilitiesProperties = createPropertiesWithSizeContainer(sizeof(ol_device_fp_capability_flags_t), PropIrrelevantGTCapabilities);
+
 inline const DeviceInfoProp Prop_RelevantGTCapabilites =
     removeIrrelevantProperties(PropCapabilitiesFlags,
                                PropIrrelevantGTCapabilities);
@@ -137,6 +122,8 @@ inline const DeviceInfoProperties RelevantGTCapabilitiesProperties =
 
 inline const DeviceInfoProp PropIrrelevantGTUint32 = {
     OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF};
+inline const DeviceInfoProperties IrrelevantGTUint32Properties = createPropertiesWithSizeContainer(sizeof(uint32_t), PropIrrelevantGTUint32);
+
 inline const DeviceInfoProp Prop_RelevantGTUint32 =
     removeIrrelevantProperties(PropUint32, PropIrrelevantGTUint32);
 inline const DeviceInfoProperties RelevantGTUint32Properties =
@@ -163,10 +150,6 @@ inline const DeviceInfoProp PropDimensions{
 inline const DeviceInfoProperties DimensionsProperties =
     createPropertiesWithSizeContainer(sizeof(ol_dimensions_t), PropDimensions);
 
-inline const DeviceInfoPropertiesTypes propertiesTypes =
-    createTypesMap({BoolProperties, Uint32Properties, Uint64Properties,
-                    CapabilitesFlagsProperties});
-
 inline bool defaultCheckIsNonZero(char *Buffer) {
   return memcmp(Buffer, ZeroArray, MAX_DEVICE_INFO_BYTES) != 0;
 }
diff --git a/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp b/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp
index 9e810ececab53..21212ea1b8045 100644
--- a/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp
+++ b/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp
@@ -12,8 +12,8 @@
 
 DeviceInfoProperties JustSupportedProperties = mergeProperties(
     {BoolProperties,
-     {propertiesTypes.at(OL_DEVICE_INFO_HALF_FP_CONFIG),
-      propertiesTypes.at(OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF)}});
+     IrrelevantGTCapabilitiesProperties,
+      IrrelevantGTUint32Properties});
 
 DeviceInfoProperties NonZeroProperties =
     mergeProperties({RelevantGTCapabilitiesProperties,

>From c7a8d179c6c32ef2095376268462dbb5797fa32e Mon Sep 17 00:00:00 2001
From: Agata Momot <agata.momot at intel.com>
Date: Thu, 6 Aug 2026 13:48:17 +0200
Subject: [PATCH 08/10] rename to irrelevant for host

---
 offload/unittests/OffloadAPI/common/Properties.hpp | 14 +++++++-------
 .../OffloadAPI/device/olGetDeviceInfo.cpp          |  4 ++--
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/offload/unittests/OffloadAPI/common/Properties.hpp b/offload/unittests/OffloadAPI/common/Properties.hpp
index b1e3645836d78..21f7a968a73b6 100644
--- a/offload/unittests/OffloadAPI/common/Properties.hpp
+++ b/offload/unittests/OffloadAPI/common/Properties.hpp
@@ -10,7 +10,7 @@
 // bound - only relevant host properties are added to the container with
 // properties passed to the fixture during instantiation. The selection of
 // relevant properties is achieved by merging or removing selected properties,
-// marked as "Relevant" or "Irrelevant" in their names.
+// marked as "Relevant" or "IrrelevantForHost" in their names.
 
 inline constexpr size_t MAX_DEVICE_INFO_BYTES = 8;
 
@@ -109,23 +109,23 @@ inline const DeviceInfoProperties CapabilitesFlagsProperties =
     createPropertiesWithSizeContainer(sizeof(ol_device_fp_capability_flags_t),
                                       PropCapabilitiesFlags);
 
-inline const DeviceInfoProp PropIrrelevantGTCapabilities = {
+inline const DeviceInfoProp PropIrrelevantForHostGTCapabilities = {
     OL_DEVICE_INFO_HALF_FP_CONFIG};
-inline const DeviceInfoProperties IrrelevantGTCapabilitiesProperties = createPropertiesWithSizeContainer(sizeof(ol_device_fp_capability_flags_t), PropIrrelevantGTCapabilities);
+inline const DeviceInfoProperties IrrelevantForHostGTCapabilitiesProperties = createPropertiesWithSizeContainer(sizeof(ol_device_fp_capability_flags_t), PropIrrelevantForHostGTCapabilities);
 
 inline const DeviceInfoProp Prop_RelevantGTCapabilites =
     removeIrrelevantProperties(PropCapabilitiesFlags,
-                               PropIrrelevantGTCapabilities);
+                               PropIrrelevantForHostGTCapabilities);
 inline const DeviceInfoProperties RelevantGTCapabilitiesProperties =
     createPropertiesWithSizeContainer(sizeof(ol_device_fp_capability_flags_t),
                                       Prop_RelevantGTCapabilites);
 
-inline const DeviceInfoProp PropIrrelevantGTUint32 = {
+inline const DeviceInfoProp PropIrrelevantForHostGTUint32 = {
     OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF};
-inline const DeviceInfoProperties IrrelevantGTUint32Properties = createPropertiesWithSizeContainer(sizeof(uint32_t), PropIrrelevantGTUint32);
+inline const DeviceInfoProperties IrrelevantForHostGTUint32Properties = createPropertiesWithSizeContainer(sizeof(uint32_t), PropIrrelevantForHostGTUint32);
 
 inline const DeviceInfoProp Prop_RelevantGTUint32 =
-    removeIrrelevantProperties(PropUint32, PropIrrelevantGTUint32);
+    removeIrrelevantProperties(PropUint32, PropIrrelevantForHostGTUint32);
 inline const DeviceInfoProperties RelevantGTUint32Properties =
     createPropertiesWithSizeContainer(sizeof(uint32_t), Prop_RelevantGTUint32);
 
diff --git a/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp b/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp
index 21212ea1b8045..cbda698b9f635 100644
--- a/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp
+++ b/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp
@@ -12,8 +12,8 @@
 
 DeviceInfoProperties JustSupportedProperties = mergeProperties(
     {BoolProperties,
-     IrrelevantGTCapabilitiesProperties,
-      IrrelevantGTUint32Properties});
+     IrrelevantForHostGTCapabilitiesProperties,
+      IrrelevantForHostGTUint32Properties});
 
 DeviceInfoProperties NonZeroProperties =
     mergeProperties({RelevantGTCapabilitiesProperties,

>From bc32ab262da9a18388716ebbb2f9fd2056582908 Mon Sep 17 00:00:00 2001
From: Agata Momot <agata.momot at intel.com>
Date: Thu, 6 Aug 2026 14:37:43 +0200
Subject: [PATCH 09/10] improve the introduction

---
 .../OffloadAPI/common/Properties.hpp          | 19 +++++++++++--------
 1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/offload/unittests/OffloadAPI/common/Properties.hpp b/offload/unittests/OffloadAPI/common/Properties.hpp
index 21f7a968a73b6..b51477f0d5a65 100644
--- a/offload/unittests/OffloadAPI/common/Properties.hpp
+++ b/offload/unittests/OffloadAPI/common/Properties.hpp
@@ -3,14 +3,17 @@
 
 // Properties are grouped by the data type that stores the information. As
 // queries for selected properties might have different results for either the
-// device or the host, or might be even unsupported for the host, some of the
-// tests verify only whether the function that queried the host returned success
-// rather than checking the exact value. For tests analyzing the exact value -
-// for example, verifying whether the value is greater than the given lower
-// bound - only relevant host properties are added to the container with
-// properties passed to the fixture during instantiation. The selection of
-// relevant properties is achieved by merging or removing selected properties,
-// marked as "Relevant" or "IrrelevantForHost" in their names.
+// device or the host, or might even be unsupported for the host, the properties
+// are also grouped within the data type according to the expected query results
+// for the host. If the given property is not applicable for the host, the tests
+// check only whether the function that queries the host has returned success.
+// In the case where the tests analyze the exact value - such as the tests
+// verifying whether the value is greater than the given lower bound - only
+// relevant host properties are added to the container with properties; the
+// aforementioned container is later passed to the fixture during instantiation.
+// The filtering of relevant properties is achieved by merging or removing
+// selected properties, marked as "Relevant" or "IrrelevantForHost" in their
+// names.
 
 inline constexpr size_t MAX_DEVICE_INFO_BYTES = 8;
 

>From af11c9296b4fd07835dde6443be478a1c0def91f Mon Sep 17 00:00:00 2001
From: Agata Momot <agata.momot at intel.com>
Date: Thu, 6 Aug 2026 15:06:45 +0200
Subject: [PATCH 10/10] formatter

---
 offload/unittests/OffloadAPI/common/Properties.hpp  | 13 ++++++++-----
 .../unittests/OffloadAPI/device/olGetDeviceInfo.cpp |  7 +++----
 2 files changed, 11 insertions(+), 9 deletions(-)

diff --git a/offload/unittests/OffloadAPI/common/Properties.hpp b/offload/unittests/OffloadAPI/common/Properties.hpp
index b51477f0d5a65..fef793f0e9fe7 100644
--- a/offload/unittests/OffloadAPI/common/Properties.hpp
+++ b/offload/unittests/OffloadAPI/common/Properties.hpp
@@ -44,9 +44,8 @@ auto createPropertiesWithSizeContainer(
 }
 
 template <typename T>
-auto mergeProperties(
-    std::initializer_list<PropertiesWithSizeContainer<T>> Properties)
-    -> PropertiesWithSizeContainer<T> {
+auto mergeProperties(std::initializer_list<PropertiesWithSizeContainer<T>>
+                         Properties) -> PropertiesWithSizeContainer<T> {
   PropertiesWithSizeContainer<T> FinalProperties;
 
   for (auto Prop : Properties) {
@@ -114,7 +113,9 @@ inline const DeviceInfoProperties CapabilitesFlagsProperties =
 
 inline const DeviceInfoProp PropIrrelevantForHostGTCapabilities = {
     OL_DEVICE_INFO_HALF_FP_CONFIG};
-inline const DeviceInfoProperties IrrelevantForHostGTCapabilitiesProperties = createPropertiesWithSizeContainer(sizeof(ol_device_fp_capability_flags_t), PropIrrelevantForHostGTCapabilities);
+inline const DeviceInfoProperties IrrelevantForHostGTCapabilitiesProperties =
+    createPropertiesWithSizeContainer(sizeof(ol_device_fp_capability_flags_t),
+                                      PropIrrelevantForHostGTCapabilities);
 
 inline const DeviceInfoProp Prop_RelevantGTCapabilites =
     removeIrrelevantProperties(PropCapabilitiesFlags,
@@ -125,7 +126,9 @@ inline const DeviceInfoProperties RelevantGTCapabilitiesProperties =
 
 inline const DeviceInfoProp PropIrrelevantForHostGTUint32 = {
     OL_DEVICE_INFO_NATIVE_VECTOR_WIDTH_HALF};
-inline const DeviceInfoProperties IrrelevantForHostGTUint32Properties = createPropertiesWithSizeContainer(sizeof(uint32_t), PropIrrelevantForHostGTUint32);
+inline const DeviceInfoProperties IrrelevantForHostGTUint32Properties =
+    createPropertiesWithSizeContainer(sizeof(uint32_t),
+                                      PropIrrelevantForHostGTUint32);
 
 inline const DeviceInfoProp Prop_RelevantGTUint32 =
     removeIrrelevantProperties(PropUint32, PropIrrelevantForHostGTUint32);
diff --git a/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp b/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp
index cbda698b9f635..18882c5af4818 100644
--- a/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp
+++ b/offload/unittests/OffloadAPI/device/olGetDeviceInfo.cpp
@@ -10,10 +10,9 @@
 #include <OffloadAPI.h>
 #include <gtest/gtest.h>
 
-DeviceInfoProperties JustSupportedProperties = mergeProperties(
-    {BoolProperties,
-     IrrelevantForHostGTCapabilitiesProperties,
-      IrrelevantForHostGTUint32Properties});
+DeviceInfoProperties JustSupportedProperties =
+    mergeProperties({BoolProperties, IrrelevantForHostGTCapabilitiesProperties,
+                     IrrelevantForHostGTUint32Properties});
 
 DeviceInfoProperties NonZeroProperties =
     mergeProperties({RelevantGTCapabilitiesProperties,



More information about the llvm-commits mailing list