Debian Codegraph @

tests/src/test_pmoverdrive.cpp

raw symbols SCIP
1 // SPDX-License-Identifier: GPL-3.0-or-latercxx . . $ `<file>/tests/src/test_pmoverdrive.cpp`/
2 // Copyright 2019 Juan Palacios <[email protected]>
3
4 #include <catch2/catch_all.hpp>
5
6 #include "common/commandqueuestub.h"cxx . . $ `<file>/tests/src/common/commandqueuestub.h`/
7 #include "common/controlmock.h"cxx . . $ `<file>/tests/src/common/controlmock.h`/
8 #include "common/stringdatasourcestub.h"cxx . . $ `<file>/tests/src/common/stringdatasourcestub.h`/
9 #include "common/vectorstringdatasourcestub.h"cxx . . $ `<file>/tests/src/common/vectorstringdatasourcestub.h`/
10 #include "core/components/controls/amd/pm/advanced/overdrive/pmoverdrive.h"cxx . . $ `<file>/src/core/components/controls/amd/pm/advanced/overdrive/pmoverdrive.h`/
11
12 namespace Testscxx . . $ Tests/::AMDcxx . . $ Tests/AMD/::PMOverdrivecxx . . $ Tests/AMD/PMOverdrive/ {
13
14 class PMOverdriveTestAdaptercxx . . $ Tests/AMD/PMOverdrive/PMOverdriveTestAdapter# : public ::AMDcxx . . $ AMD/::PMOverdrivecxx . . $ AMD/PMOverdrive#
15 {
16 public:
17 using ::AMDcxx . . $ AMD/::PMOverdrivecxx . . $ AMD/PMOverdrive#::PMOverdrivecxx . . $ Tests/AMD/PMOverdrive/PMOverdriveTestAdapter#PMOverdriveTestAdapter(d1bcf891d8f65519).;
18
19 using ::AMDcxx . . $ AMD/::PMOverdrivecxx . . $ AMD/PMOverdrive#::cleanControlcxx . . $ Tests/AMD/PMOverdrive/PMOverdriveTestAdapter#cleanControl(151e9138769f295e).;
20 using ::AMDcxx . . $ AMD/::PMOverdrivecxx . . $ AMD/PMOverdrive#::perfLevelPreInitValuecxx . . $ Tests/AMD/PMOverdrive/PMOverdriveTestAdapter#perfLevelPreInitValue(f4fff0029955a25f).;
21 using ::AMDcxx . . $ AMD/::PMOverdrivecxx . . $ AMD/PMOverdrive#::syncControlcxx . . $ Tests/AMD/PMOverdrive/PMOverdriveTestAdapter#syncControl(151e9138769f295e).;
22 };
23
24 TEST_CASEcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:144:11`!("AMD PMOverdrive tests", "[GPU][AMD][PM][PMOverdrive]")
25 {
26 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::unique_ptrcxx . . $ std/unique_ptr#<IControlcxx . . $ IControl#>> controlMockscxx . . $ std/vector#vector(49f6e7a06ebc5aa8).;
27
28 SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Has PMOverdrive ID")
29 {
30 ::AMDcxx . . $ AMD/::PMOverdrivecxx . . $ AMD/PMOverdrive# tscxx . . $ AMD/PMOverdrive#PMOverdrive(e58ec8c414cd88db).(stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<StringDataSourceStubcxx . . $ StringDataSourceStub#>(),
31 stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<VectorStringDataSourceStubcxx . . $ VectorStringDataSourceStub#>(),
32 stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(controlMocks));
33 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ts.ID() == ::AMD::PMOverdrive::ItemID);
34 }
35
36 SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Is not active by default")
37 {
38 ::AMDcxx . . $ AMD/::PMOverdrivecxx . . $ AMD/PMOverdrive# tscxx . . $ AMD/PMOverdrive#PMOverdrive(e58ec8c414cd88db).(stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<StringDataSourceStubcxx . . $ StringDataSourceStub#>(),
39 stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<VectorStringDataSourceStubcxx . . $ VectorStringDataSourceStub#>(),
40 stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(controlMocks));
41 REQUIRE_FALSEcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:128:11`!(ts.active());
42 }
43
44 SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Pre-init its controls, generating pre-init overdrive commands...")
45 {
46 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> ppOdClkVoltageDatacxx . . $ std/vector#vector(9619226211e5a241).{"..."};
47
48 controlMocks.emplace_backcxx . . $ std/vector#emplace_back(a1bcdfdabc3a37df).(stdcxx . . $ std/::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<ControlMockcxx . . $ ControlMock#>());
49 ControlMockcxx . . $ ControlMock# *controlMock = static_cast<ControlMockcxx . . $ ControlMock# *>(controlMocks[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0].getcxx . . $ std/unique_ptr#get(ea7391e9eeeaf20e).());
50 REQUIRE_CALLcxx . . $ `<external>/1068432606165018960/mock.hpp:4335:9`!(*controlMock, preInit(trompeloeil::_));
51
52 SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Including performance level command when its value is not manual")
53 {
54 PMOverdriveTestAdaptercxx . . $ Tests/AMD/PMOverdrive/PMOverdriveTestAdapter# ts(
55 stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<StringDataSourceStubcxx . . $ StringDataSourceStub#>(
56 "power_dpm_force_performance_level", "auto"),
57 stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<VectorStringDataSourceStubcxx . . $ VectorStringDataSourceStub#>("pp_od_clk_voltage",
58 ppOdClkVoltageData),
59 stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(controlMocks));
60
61 CommandQueueStubcxx . . $ CommandQueueStub# ctlCmds;
62 ts.preInitcxx . . $ AMD/PMOverdrive#preInit(151e9138769f295e).(ctlCmds);
63
64 auto perfLevelEntry = tscxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5)..perfLevelPreInitValuecxx . . $ AMD/PMOverdrive#perfLevelPreInitValue(f4fff0029955a25f).();
65 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(perfLevelEntry == "auto");
66
67 auto &commands = ctlCmds.commandscxx . . $ CommandQueueStub#commands(f070559094366392).();
68 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(commands.size() == 3);
69
70 auto &[cmd0Path, cmd0Value] = commands.atcxx . . $ std/vector#at(b61e45a10b63f40a).(0);
71 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd0Path == "power_dpm_force_performance_level");
72 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd0Value == "manual");
73
74 auto &[cmd1Path, cmd1Value] = commands.atcxx . . $ std/vector#at(b61e45a10b63f40a).(1);
75 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd1Path == "pp_od_clk_voltage");
76 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd1Value == "r");
77
78 auto &[cmd2Path, cmd2Value] = commands.atcxx . . $ std/vector#at(b61e45a10b63f40a).(2);
79 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd2Path == "pp_od_clk_voltage");
80 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd2Value == "c");
81 }
82
83 SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Excluding performance level command when its value is manual")
84 {
85 PMOverdriveTestAdaptercxx . . $ Tests/AMD/PMOverdrive/PMOverdriveTestAdapter# ts(
86 stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<StringDataSourceStubcxx . . $ StringDataSourceStub#>(
87 "power_dpm_force_performance_level", "manual"),
88 stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<VectorStringDataSourceStubcxx . . $ VectorStringDataSourceStub#>("pp_od_clk_voltage",
89 ppOdClkVoltageData),
90 stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(controlMocks));
91
92 CommandQueueStubcxx . . $ CommandQueueStub# ctlCmds;
93 ts.preInitcxx . . $ AMD/PMOverdrive#preInit(151e9138769f295e).(ctlCmds);
94
95 auto perfLevelEntry = tscxx . . $ std/__cxx11/basic_string#basic_string(a47f53d4115f6ce5)..perfLevelPreInitValuecxx . . $ AMD/PMOverdrive#perfLevelPreInitValue(f4fff0029955a25f).();
96 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(perfLevelEntry == "manual");
97
98 auto &commands = ctlCmds.commandscxx . . $ CommandQueueStub#commands(f070559094366392).();
99 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(commands.size() == 2);
100
101 auto &[cmd0Path, cmd0Value] = commands.atcxx . . $ std/vector#at(b61e45a10b63f40a).(0);
102 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd0Path == "pp_od_clk_voltage");
103 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd0Value == "r");
104
105 auto &[cmd1Path, cmd1Value] = commands.atcxx . . $ std/vector#at(b61e45a10b63f40a).(1);
106 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd1Path == "pp_od_clk_voltage");
107 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd1Value == "c");
108 }
109 }
110
111 SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Post-init its controls and generate post-init overdrive commands")
112 {
113 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> ppOdClkVoltageDatacxx . . $ std/vector#vector(9619226211e5a241).{"..."};
114
115 controlMocks.emplace_backcxx . . $ std/vector#emplace_back(a1bcdfdabc3a37df).(stdcxx . . $ std/::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<ControlMockcxx . . $ ControlMock#>());
116 ControlMockcxx . . $ ControlMock# *controlMock = static_cast<ControlMockcxx . . $ ControlMock# *>(controlMocks[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0].getcxx . . $ std/unique_ptr#get(ea7391e9eeeaf20e).());
117 ALLOW_CALLcxx . . $ `<external>/1068432606165018960/mock.hpp:4337:9`!(*controlMock, preInit(trompeloeil::_));
118 REQUIRE_CALLcxx . . $ `<external>/1068432606165018960/mock.hpp:4335:9`!(*controlMock, postInit(trompeloeil::_));
119
120 PMOverdriveTestAdaptercxx . . $ Tests/AMD/PMOverdrive/PMOverdriveTestAdapter# ts(stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<StringDataSourceStubcxx . . $ StringDataSourceStub#>(
121 "power_dpm_force_performance_level", "auto"),
122 stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<VectorStringDataSourceStubcxx . . $ VectorStringDataSourceStub#>(
123 "pp_od_clk_voltage", ppOdClkVoltageData),
124 stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(controlMocks));
125
126 CommandQueueStubcxx . . $ CommandQueueStub# ctlCmds;
127 ts.preInitcxx . . $ AMD/PMOverdrive#preInit(151e9138769f295e).(ctlCmds);
128 ctlCmds.clearcxx . . $ CommandQueueStub#clear(49f6e7a06ebc5aa8).();
129 ts.postInitcxx . . $ AMD/PMOverdrive#postInit(151e9138769f295e).(ctlCmds);
130
131 auto &commands = ctlCmds.commandscxx . . $ CommandQueueStub#commands(f070559094366392).();
132 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(commands.size() == 2);
133
134 auto &[cmd0Path, cmd0Value] = commands.atcxx . . $ std/vector#at(b61e45a10b63f40a).(0);
135 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd0Path == "pp_od_clk_voltage");
136 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd0Value == "c");
137
138 auto &[cmd1Path, cmd1Value] = commands.atcxx . . $ std/vector#at(b61e45a10b63f40a).(1);
139 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd1Path == "power_dpm_force_performance_level");
140 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd1Value == "auto");
141 }
142
143 SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Generate overdrive clean controls commands...")
144 {
145 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> ppOdClkVoltageDatacxx . . $ std/vector#vector(9619226211e5a241).{"..."};
146
147 controlMocks.emplace_backcxx . . $ std/vector#emplace_back(a1bcdfdabc3a37df).(stdcxx . . $ std/::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<ControlMockcxx . . $ ControlMock#>());
148 ControlMockcxx . . $ ControlMock# *controlMock = static_cast<ControlMockcxx . . $ ControlMock# *>(controlMocks[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0].getcxx . . $ std/unique_ptr#get(ea7391e9eeeaf20e).());
149 REQUIRE_CALLcxx . . $ `<external>/1068432606165018960/mock.hpp:4335:9`!(*controlMock, clean(trompeloeil::_));
150
151 SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Including performance level command when its value is not manual")
152 {
153 PMOverdriveTestAdaptercxx . . $ Tests/AMD/PMOverdrive/PMOverdriveTestAdapter# ts(
154 stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<StringDataSourceStubcxx . . $ StringDataSourceStub#>(
155 "power_dpm_force_performance_level", "auto"),
156 stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<VectorStringDataSourceStubcxx . . $ VectorStringDataSourceStub#>("pp_od_clk_voltage",
157 ppOdClkVoltageData),
158 stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(controlMocks));
159
160 CommandQueueStubcxx . . $ CommandQueueStub# ctlCmds;
161 ts.cleanControlcxx . . $ AMD/PMOverdrive#cleanControl(151e9138769f295e).(ctlCmds);
162
163 auto &commands = ctlCmds.commandscxx . . $ CommandQueueStub#commands(f070559094366392).();
164 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(commands.size() == 3);
165
166 auto &[cmd0Path, cmd0Value] = commands.atcxx . . $ std/vector#at(b61e45a10b63f40a).(0);
167 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd0Path == "power_dpm_force_performance_level");
168 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd0Value == "manual");
169
170 auto &[cmd1Path, cmd1Value] = commands.atcxx . . $ std/vector#at(b61e45a10b63f40a).(1);
171 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd1Path == "pp_od_clk_voltage");
172 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd1Value == "r");
173
174 auto &[cmd2Path, cmd2Value] = commands.atcxx . . $ std/vector#at(b61e45a10b63f40a).(2);
175 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd2Path == "pp_od_clk_voltage");
176 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd2Value == "c");
177 }
178
179 SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Excluding performance level command when its value is manual")
180 {
181 PMOverdriveTestAdaptercxx . . $ Tests/AMD/PMOverdrive/PMOverdriveTestAdapter# ts(
182 stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<StringDataSourceStubcxx . . $ StringDataSourceStub#>(
183 "power_dpm_force_performance_level", "manual"),
184 stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<VectorStringDataSourceStubcxx . . $ VectorStringDataSourceStub#>("pp_od_clk_voltage",
185 ppOdClkVoltageData),
186 stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(controlMocks));
187
188 CommandQueueStubcxx . . $ CommandQueueStub# ctlCmds;
189 ts.cleanControlcxx . . $ AMD/PMOverdrive#cleanControl(151e9138769f295e).(ctlCmds);
190
191 auto &commands = ctlCmds.commandscxx . . $ CommandQueueStub#commands(f070559094366392).();
192 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(commands.size() == 2);
193
194 auto &[cmd0Path, cmd0Value] = commands.atcxx . . $ std/vector#at(b61e45a10b63f40a).(0);
195 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd0Path == "pp_od_clk_voltage");
196 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd0Value == "r");
197
198 auto &[cmd1Path, cmd1Value] = commands.atcxx . . $ std/vector#at(b61e45a10b63f40a).(1);
199 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd1Path == "pp_od_clk_voltage");
200 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd1Value == "c");
201 }
202 }
203
204 SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Sync its controls, generating sync control commands when is out of "
205 "sync...")
206 {
207 stdcxx . . $ std/::vectorcxx . . $ std/vector#<stdcxx . . $ std/::stringcxx . . $ std/string#> ppOdClkVoltageDatacxx . . $ std/vector#vector(9619226211e5a241).{"..."};
208
209 SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Including performance level command when its value is not manual")
210 {
211 controlMocks.emplace_backcxx . . $ std/vector#emplace_back(a1bcdfdabc3a37df).(stdcxx . . $ std/::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<ControlMockcxx . . $ ControlMock#>());
212 ControlMockcxx . . $ ControlMock# *controlMock =
213 static_cast<ControlMockcxx . . $ ControlMock# *>(controlMocks[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0].getcxx . . $ std/unique_ptr#get(ea7391e9eeeaf20e).());
214 REQUIRE_CALLcxx . . $ `<external>/1068432606165018960/mock.hpp:4335:9`!(*controlMock, sync(trompeloeil::_));
215
216 PMOverdriveTestAdaptercxx . . $ Tests/AMD/PMOverdrive/PMOverdriveTestAdapter# ts(
217 stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<StringDataSourceStubcxx . . $ StringDataSourceStub#>(
218 "power_dpm_force_performance_level", "auto"),
219 stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<VectorStringDataSourceStubcxx . . $ VectorStringDataSourceStub#>("pp_od_clk_voltage",
220 ppOdClkVoltageData),
221 stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(controlMocks));
222
223 CommandQueueStubcxx . . $ CommandQueueStub# ctlCmds;
224 ts.syncControlcxx . . $ AMD/PMOverdrive#syncControl(151e9138769f295e).(ctlCmds);
225
226 auto &commands = ctlCmds.commandscxx . . $ CommandQueueStub#commands(f070559094366392).();
227 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(commands.size() == 1);
228
229 auto &[cmd0Path, cmd0Value] = commands.atcxx . . $ std/vector#at(b61e45a10b63f40a).(0);
230 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd0Path == "power_dpm_force_performance_level");
231 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(cmd0Value == "manual");
232 }
233
234 SECTIONcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:149:11`!("Excluding performance level command when its value is manual")
235 {
236 controlMocks.emplace_backcxx . . $ std/vector#emplace_back(a1bcdfdabc3a37df).(stdcxx . . $ std/::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<ControlMockcxx . . $ ControlMock#>());
237 ControlMockcxx . . $ ControlMock# *controlMock =
238 static_cast<ControlMockcxx . . $ ControlMock# *>(controlMocks[cxx . . $ std/vector#`operator[]`(81207c53da4b73ce).0].getcxx . . $ std/unique_ptr#get(ea7391e9eeeaf20e).());
239 REQUIRE_CALLcxx . . $ `<external>/1068432606165018960/mock.hpp:4335:9`!(*controlMock, sync(trompeloeil::_));
240
241 PMOverdriveTestAdaptercxx . . $ Tests/AMD/PMOverdrive/PMOverdriveTestAdapter# ts(
242 stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<StringDataSourceStubcxx . . $ StringDataSourceStub#>(
243 "power_dpm_force_performance_level", "manual"),
244 stdcxx . . $ std/unique_ptr#unique_ptr(8bcafd3b0b660df8).::make_uniquecxx . . $ std/make_unique(5cd499e8540a10bb).<VectorStringDataSourceStubcxx . . $ VectorStringDataSourceStub#>("pp_od_clk_voltage",
245 ppOdClkVoltageData),
246 stdcxx . . $ std/::movecxx . . $ std/move(e35c19a1ba7baa26).(controlMocks));
247
248 CommandQueueStubcxx . . $ CommandQueueStub# ctlCmds;
249 ts.syncControlcxx . . $ AMD/PMOverdrive#syncControl(151e9138769f295e).(ctlCmds);
250
251 REQUIREcxx . . $ `<external>/1821973855936310166/catch_test_macros.hpp:127:11`!(ctlCmds.commands().empty());
252 }
253 }
254 }
255
256 } // namespace Tests::AMD::PMOverdrive