@@ -161,7 +161,8 @@ TEST_F(
161161 zes_power_sustained_limit_t pSustained = {};
162162 zes_power_burst_limit_t pBurst = {};
163163 zes_power_peak_limit_t pPeak = {};
164- auto status = lzt::get_power_limits (p_power_handle, &pSustained, &pBurst, &pPeak);
164+ auto status =
165+ lzt::get_power_limits (p_power_handle, &pSustained, &pBurst, &pPeak);
165166 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
166167 continue ;
167168 }
@@ -198,17 +199,17 @@ TEST_F(
198199 zes_power_sustained_limit_t pSustainedInitial = {};
199200 zes_power_burst_limit_t pBurstInitial = {};
200201 zes_power_peak_limit_t pPeakInitial = {};
201- auto status = lzt::get_power_limits (p_power_handle, &pSustainedInitial, &pBurstInitial,
202- &pPeakInitial);
202+ auto status = lzt::get_power_limits (p_power_handle, &pSustainedInitial,
203+ &pBurstInitial, &pPeakInitial);
203204 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
204205 continue ;
205206 }
206207 EXPECT_EQ (status, ZE_RESULT_SUCCESS);
207208 zes_power_sustained_limit_t pSustainedLater = {};
208209 zes_power_burst_limit_t pBurstLater = {};
209210 zes_power_peak_limit_t pPeakLater = {};
210- status = lzt::get_power_limits (p_power_handle, &pSustainedLater, &pBurstLater,
211- &pPeakLater);
211+ status = lzt::get_power_limits (p_power_handle, &pSustainedLater,
212+ &pBurstLater, &pPeakLater);
212213 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
213214 continue ;
214215 }
@@ -239,8 +240,9 @@ TEST_F(
239240 zes_power_sustained_limit_t pSustainedInitial = {};
240241 zes_power_burst_limit_t pBurstInitial = {};
241242 zes_power_peak_limit_t pPeakInitial = {};
242- auto status = lzt::get_power_limits (p_power_handle, &pSustainedInitial, &pBurstInitial,
243- &pPeakInitial); // get default power values
243+ auto status = lzt::get_power_limits (
244+ p_power_handle, &pSustainedInitial, &pBurstInitial,
245+ &pPeakInitial); // get default power values
244246 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
245247 continue ;
246248 }
@@ -268,17 +270,19 @@ TEST_F(
268270 }
269271 pPeakSet.powerDC = pPeakInitial.powerDC ;
270272 if (pBurstSet.enabled && pSustainedSet.enabled ) {
271- status = lzt::set_power_limits (p_power_handle, &pSustainedSet, &pBurstSet,
272- &pPeakSet); // Set power values
273+ status =
274+ lzt::set_power_limits (p_power_handle, &pSustainedSet, &pBurstSet,
275+ &pPeakSet); // Set power values
273276 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
274277 continue ;
275278 }
276279 EXPECT_EQ (status, ZE_RESULT_SUCCESS);
277280 zes_power_sustained_limit_t pSustainedGet = {};
278281 zes_power_burst_limit_t pBurstGet = {};
279282 zes_power_peak_limit_t pPeakGet = {};
280- status = lzt::get_power_limits (p_power_handle, &pSustainedGet, &pBurstGet,
281- &pPeakGet); // Get power values
283+ status =
284+ lzt::get_power_limits (p_power_handle, &pSustainedGet, &pBurstGet,
285+ &pPeakGet); // Get power values
282286 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
283287 continue ;
284288 }
@@ -296,8 +300,8 @@ TEST_F(
296300 pPeakSet.powerDC ); // Verify whether values match or not
297301 }
298302 status = lzt::set_power_limits (p_power_handle, &pSustainedInitial,
299- &pBurstInitial,
300- &pPeakInitial); // Set values to default
303+ &pBurstInitial,
304+ &pPeakInitial); // Set values to default
301305 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
302306 continue ;
303307 }
@@ -352,7 +356,7 @@ TEST_F(
352356 auto status =
353357 lzt::get_power_energy_threshold (p_power_handle, &pThreshold);
354358 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
355- continue ;
359+ continue ;
356360 }
357361 EXPECT_EQ (status, ZE_RESULT_SUCCESS);
358362 ASSERT_GE (pThreshold.threshold , 0 );
@@ -420,8 +424,9 @@ TEST_F(
420424 lzt::set_power_energy_threshold (p_power_handle, threshold); // set test
421425 // value
422426 zes_energy_threshold_t pThresholdGet = {};
423- status = lzt::get_power_energy_threshold (p_power_handle,
424- &pThresholdGet); // get test value
427+ status =
428+ lzt::get_power_energy_threshold (p_power_handle,
429+ &pThresholdGet); // get test value
425430 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
426431 continue ;
427432 }
@@ -565,7 +570,8 @@ TEST_F(
565570 if (power_sustained_set.limitValueLocked == false ) {
566571 status = lzt::set_power_limits_ext (
567572 p_power_handle, &count_power,
568- power_limits_descriptors.data ()); // set power limits for all descriptors
573+ power_limits_descriptors
574+ .data ()); // set power limits for all descriptors
569575
570576 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
571577 continue ;
@@ -580,7 +586,7 @@ TEST_F(
580586 continue ;
581587 }
582588 EXPECT_EQ (status, ZE_RESULT_SUCCESS);
583- for (const auto & p_power_limits_descriptor_get :
589+ for (const auto & p_power_limits_descriptor_get :
584590 power_limits_descriptors_get) {
585591 if (p_power_limits_descriptor_get.level ==
586592 ZES_POWER_LEVEL_SUSTAINED) {
@@ -593,9 +599,10 @@ TEST_F(
593599 EXPECT_EQ (power_sustained_get.interval , power_sustained_set.interval );
594600 EXPECT_EQ (power_sustained_get.limit , power_sustained_set.limit );
595601
596- status = lzt::set_power_limits_ext (p_power_handle, &count_power,
597- power_limits_descriptors_initial
598- .data ()); // restore initial limits
602+ status =
603+ lzt::set_power_limits_ext (p_power_handle, &count_power,
604+ power_limits_descriptors_initial
605+ .data ()); // restore initial limits
599606 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
600607 continue ;
601608 }
@@ -653,7 +660,8 @@ TEST_F(
653660 if (power_peak_set.limitValueLocked == false ) {
654661 status = lzt::set_power_limits_ext (
655662 p_power_handle, &count_power,
656- power_limits_descriptors.data ()); // set power limits for all descriptors
663+ power_limits_descriptors
664+ .data ()); // set power limits for all descriptors
657665
658666 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
659667 continue ;
@@ -668,7 +676,7 @@ TEST_F(
668676 continue ;
669677 }
670678 EXPECT_EQ (status, ZE_RESULT_SUCCESS);
671- for (const auto & p_power_limits_descriptor_get :
679+ for (const auto & p_power_limits_descriptor_get :
672680 power_limits_descriptors_get) {
673681 if (p_power_limits_descriptor_get.level == ZES_POWER_LEVEL_PEAK) {
674682 power_peak_get = p_power_limits_descriptor_get;
@@ -711,7 +719,7 @@ TEST_F(
711719
712720 zes_power_limit_ext_desc_t power_burst_set = {};
713721
714- std::vector<zes_power_limit_ext_desc_t > power_limits_descriptors;
722+ std::vector<zes_power_limit_ext_desc_t > power_limits_descriptors;
715723 auto status = lzt::get_power_limits_ext (
716724 p_power_handle, &count_power,
717725 power_limits_descriptors); // get power limits for all descriptors
@@ -737,7 +745,8 @@ TEST_F(
737745 if (power_burst_set.limitValueLocked == false ) {
738746 status = lzt::set_power_limits_ext (
739747 p_power_handle, &count_power,
740- power_limits_descriptors.data ()); // set power limits for all descriptors
748+ power_limits_descriptors
749+ .data ()); // set power limits for all descriptors
741750
742751 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
743752 continue ;
@@ -752,7 +761,7 @@ TEST_F(
752761 continue ;
753762 }
754763 EXPECT_EQ (status, ZE_RESULT_SUCCESS);
755- for (const auto & p_power_limits_descriptor_get :
764+ for (const auto & p_power_limits_descriptor_get :
756765 power_limits_descriptors_get) {
757766 if (p_power_limits_descriptor_get.level == ZES_POWER_LEVEL_BURST) {
758767 power_burst_get = p_power_limits_descriptor_get;
@@ -823,7 +832,8 @@ TEST_F(
823832 if (power_instantaneous_set.limitValueLocked == false ) {
824833 status = lzt::set_power_limits_ext (
825834 p_power_handle, &count_power,
826- power_limits_descriptors.data ()); // set power limits for all descriptors
835+ power_limits_descriptors
836+ .data ()); // set power limits for all descriptors
827837
828838 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
829839 continue ;
@@ -832,12 +842,13 @@ TEST_F(
832842 zes_power_limit_ext_desc_t power_instantaneous_get = {};
833843
834844 std::vector<zes_power_limit_ext_desc_t > power_limits_descriptors_get;
835- status = lzt::get_power_limits_ext (p_power_handle, &count_power, power_limits_descriptors_get);
845+ status = lzt::get_power_limits_ext (p_power_handle, &count_power,
846+ power_limits_descriptors_get);
836847 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
837848 continue ;
838849 }
839850 EXPECT_EQ (status, ZE_RESULT_SUCCESS);
840- for (const auto & p_power_limits_descriptor_get :
851+ for (const auto & p_power_limits_descriptor_get :
841852 power_limits_descriptors_get) {
842853 if (p_power_limits_descriptor_get.level ==
843854 ZES_POWER_LEVEL_INSTANTANEOUS) {
@@ -1012,27 +1023,28 @@ TEST_F(
10121023
10131024 if (power_sustained_Max.limitValueLocked == false ) {
10141025 status = lzt::set_power_limits_ext (power_card_handle, &count_power,
1015- &power_sustained_Max);
1026+ &power_sustained_Max);
10161027 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
10171028 continue ;
10181029 }
10191030 EXPECT_EQ (status, ZE_RESULT_SUCCESS);
1020- std::vector<zes_power_limit_ext_desc_t > power_limits_descriptors_getMax;
1031+ std::vector<zes_power_limit_ext_desc_t >
1032+ power_limits_descriptors_getMax;
10211033 status = lzt::get_power_limits_ext (power_card_handle, &count_power,
10221034 power_limits_descriptors_getMax);
10231035 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
10241036 continue ;
10251037 }
10261038 EXPECT_EQ (status, ZE_RESULT_SUCCESS);
1027- for (const auto & p_power_limits_descriptor_get :
1039+ for (const auto & p_power_limits_descriptor_get :
10281040 power_limits_descriptors_getMax) {
10291041 if (p_power_limits_descriptor_get.level ==
10301042 ZES_POWER_LEVEL_SUSTAINED) {
10311043 power_sustained_getMax = p_power_limits_descriptor_get;
10321044 }
10331045 }
10341046 status = lzt::set_power_limits_ext (power_card_handle, &count_power,
1035- &power_sustained_Initial);
1047+ &power_sustained_Initial);
10361048 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
10371049 continue ;
10381050 }
@@ -1044,7 +1056,7 @@ TEST_F(
10441056 continue ;
10451057 }
10461058 EXPECT_EQ (status, ZE_RESULT_SUCCESS);
1047- for (const auto & p_power_limits_descriptor_get :
1059+ for (const auto & p_power_limits_descriptor_get :
10481060 power_limits_descriptors_get) {
10491061 if (p_power_limits_descriptor_get.level ==
10501062 ZES_POWER_LEVEL_SUSTAINED) {
@@ -1075,10 +1087,10 @@ TEST_F(
10751087 uint32_t count_power = 0 ;
10761088 uint32_t single_count = 1 ;
10771089 bool peak_limit_available = false ;
1078-
1090+
10791091 std::vector<zes_power_limit_ext_desc_t > power_limits_descriptors;
10801092 auto status = lzt::get_power_limits_ext (power_card_handle, &count_power,
1081- power_limits_descriptors);
1093+ power_limits_descriptors);
10821094 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
10831095 continue ;
10841096 }
@@ -1098,7 +1110,7 @@ TEST_F(
10981110
10991111 if (power_limits_descriptors[i].limitValueLocked == false ) {
11001112 status = lzt::set_power_limits_ext (power_card_handle, &single_count,
1101- &power_peak_Max);
1113+ &power_peak_Max);
11021114 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
11031115 continue ;
11041116 }
@@ -1111,15 +1123,15 @@ TEST_F(
11111123 continue ;
11121124 }
11131125 EXPECT_EQ (status, ZE_RESULT_SUCCESS);
1114- for (const auto & p_power_limits_descriptor_get :
1126+ for (const auto & p_power_limits_descriptor_get :
11151127 power_limits_descriptors_getMax) {
11161128 if (p_power_limits_descriptor_get.level == ZES_POWER_LEVEL_PEAK &&
11171129 p_power_limits_descriptor_get.source == power_source) {
11181130 power_peak_getMax = p_power_limits_descriptor_get;
11191131 }
11201132 }
11211133 status = lzt::set_power_limits_ext (power_card_handle, &single_count,
1122- &power_peak_initial);
1134+ &power_peak_initial);
11231135 if (status == ZE_RESULT_ERROR_UNSUPPORTED_FEATURE) {
11241136 continue ;
11251137 }
@@ -1131,7 +1143,7 @@ TEST_F(
11311143 continue ;
11321144 }
11331145 EXPECT_EQ (status, ZE_RESULT_SUCCESS);
1134- for (const auto & p_power_limits_descriptor_get :
1146+ for (const auto & p_power_limits_descriptor_get :
11351147 power_limits_descriptors_get) {
11361148 if (p_power_limits_descriptor_get.level == ZES_POWER_LEVEL_PEAK &&
11371149 p_power_limits_descriptor_get.source == power_source) {
0 commit comments