aboutsummaryrefslogtreecommitdiff
path: root/src/burn/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/burn/test')
-rw-r--r--src/burn/test/BurnUnitTest/ElevationTest.cpp18
-rw-r--r--src/burn/test/BurnUnitTest/EmbeddedTest.cpp10
-rw-r--r--src/burn/test/BurnUnitTest/ExitCodeTest.cpp10
3 files changed, 19 insertions, 19 deletions
diff --git a/src/burn/test/BurnUnitTest/ElevationTest.cpp b/src/burn/test/BurnUnitTest/ElevationTest.cpp
index 857873b6..77aac423 100644
--- a/src/burn/test/BurnUnitTest/ElevationTest.cpp
+++ b/src/burn/test/BurnUnitTest/ElevationTest.cpp
@@ -63,7 +63,7 @@ namespace Bootstrapper
63 ShelFunctionOverride(ElevateTest_ShellExecuteExW); 63 ShelFunctionOverride(ElevateTest_ShellExecuteExW);
64 CoreFunctionOverride(NULL, ThrdWaitForCompletion); 64 CoreFunctionOverride(NULL, ThrdWaitForCompletion);
65 65
66 PipeConnectionInitialize(pConnection); 66 BurnPipeConnectionInitialize(pConnection);
67 67
68 // 68 //
69 // per-user side setup 69 // per-user side setup
@@ -72,13 +72,13 @@ namespace Bootstrapper
72 TestThrowOnFailure(hr, L"Failed to elevate."); 72 TestThrowOnFailure(hr, L"Failed to elevate.");
73 73
74 // post execute message 74 // post execute message
75 hr = PipeSendMessage(pConnection->hPipe, TEST_PARENT_SENT_MESSAGE_ID, NULL, 0, ProcessParentMessages, NULL, &dwResult); 75 hr = BurnPipeSendMessage(pConnection->hPipe, TEST_PARENT_SENT_MESSAGE_ID, NULL, 0, ProcessParentMessages, NULL, &dwResult);
76 TestThrowOnFailure(hr, "Failed to post execute message to per-machine process."); 76 TestThrowOnFailure(hr, "Failed to post execute message to per-machine process.");
77 77
78 // 78 //
79 // initiate termination 79 // initiate termination
80 // 80 //
81 hr = PipeTerminateChildProcess(pConnection, 666, FALSE); 81 hr = BurnPipeTerminateChildProcess(pConnection, 666, FALSE);
82 TestThrowOnFailure(hr, L"Failed to terminate elevated process."); 82 TestThrowOnFailure(hr, L"Failed to terminate elevated process.");
83 83
84 // check flags 84 // check flags
@@ -86,7 +86,7 @@ namespace Bootstrapper
86 } 86 }
87 finally 87 finally
88 { 88 {
89 PipeConnectionUninitialize(pConnection); 89 BurnPipeConnectionUninitialize(pConnection);
90 } 90 }
91 } 91 }
92 }; 92 };
@@ -127,7 +127,7 @@ static DWORD CALLBACK ElevateTest_ThreadProc(
127 BURN_PIPE_CONNECTION connection = { }; 127 BURN_PIPE_CONNECTION connection = { };
128 BURN_PIPE_RESULT result = { }; 128 BURN_PIPE_RESULT result = { };
129 129
130 PipeConnectionInitialize(&connection); 130 BurnPipeConnectionInitialize(&connection);
131 131
132 StrAlloc(&connection.sczName, MAX_PATH); 132 StrAlloc(&connection.sczName, MAX_PATH);
133 StrAlloc(&connection.sczSecret, MAX_PATH); 133 StrAlloc(&connection.sczSecret, MAX_PATH);
@@ -140,15 +140,15 @@ static DWORD CALLBACK ElevateTest_ThreadProc(
140 } 140 }
141 141
142 // set up connection with per-user process 142 // set up connection with per-user process
143 hr = PipeChildConnect(&connection, TRUE); 143 hr = BurnPipeChildConnect(&connection, TRUE);
144 ExitOnFailure(hr, "Failed to connect to per-user process."); 144 ExitOnFailure(hr, "Failed to connect to per-user process.");
145 145
146 // pump messages 146 // pump messages
147 hr = PipePumpMessages(connection.hPipe, ProcessChildMessages, static_cast<LPVOID>(connection.hPipe), &result); 147 hr = BurnPipePumpMessages(connection.hPipe, ProcessChildMessages, static_cast<LPVOID>(connection.hPipe), &result);
148 ExitOnFailure(hr, "Failed while pumping messages in child 'process'."); 148 ExitOnFailure(hr, "Failed while pumping messages in child 'process'.");
149 149
150LExit: 150LExit:
151 PipeConnectionUninitialize(&connection); 151 BurnPipeConnectionUninitialize(&connection);
152 ReleaseStr(sczArguments); 152 ReleaseStr(sczArguments);
153 153
154 return FAILED(hr) ? (DWORD)hr : result.dwResult; 154 return FAILED(hr) ? (DWORD)hr : result.dwResult;
@@ -199,7 +199,7 @@ static HRESULT ProcessChildMessages(
199 { 199 {
200 case TEST_PARENT_SENT_MESSAGE_ID: 200 case TEST_PARENT_SENT_MESSAGE_ID:
201 // send test message 201 // send test message
202 hr = PipeSendMessage(hPipe, TEST_CHILD_SENT_MESSAGE_ID, (LPVOID)TEST_MESSAGE_DATA, sizeof(TEST_MESSAGE_DATA), NULL, NULL, &dwResult); 202 hr = BurnPipeSendMessage(hPipe, TEST_CHILD_SENT_MESSAGE_ID, (LPVOID)TEST_MESSAGE_DATA, sizeof(TEST_MESSAGE_DATA), NULL, NULL, &dwResult);
203 ExitOnFailure(hr, "Failed to send message to per-machine process."); 203 ExitOnFailure(hr, "Failed to send message to per-machine process.");
204 break; 204 break;
205 205
diff --git a/src/burn/test/BurnUnitTest/EmbeddedTest.cpp b/src/burn/test/BurnUnitTest/EmbeddedTest.cpp
index 7560fe25..8d70cbab 100644
--- a/src/burn/test/BurnUnitTest/EmbeddedTest.cpp
+++ b/src/burn/test/BurnUnitTest/EmbeddedTest.cpp
@@ -133,7 +133,7 @@ static DWORD CALLBACK EmbeddedTest_ThreadProc(
133 133
134 engineState.internalCommand.mode = BURN_MODE_EMBEDDED; 134 engineState.internalCommand.mode = BURN_MODE_EMBEDDED;
135 135
136 PipeConnectionInitialize(pConnection); 136 BurnPipeConnectionInitialize(pConnection);
137 137
138 StrAlloc(&pConnection->sczName, MAX_PATH); 138 StrAlloc(&pConnection->sczName, MAX_PATH);
139 StrAlloc(&pConnection->sczSecret, MAX_PATH); 139 StrAlloc(&pConnection->sczSecret, MAX_PATH);
@@ -145,11 +145,11 @@ static DWORD CALLBACK EmbeddedTest_ThreadProc(
145 } 145 }
146 146
147 // set up connection with parent bundle runner 147 // set up connection with parent bundle runner
148 hr = PipeChildConnect(pConnection, FALSE); 148 hr = BurnPipeChildConnect(pConnection, FALSE);
149 ExitOnFailure(hr, "Failed to connect to parent bundle runner."); 149 ExitOnFailure(hr, "Failed to connect to parent bundle runner.");
150 150
151 // post unknown message 151 // post unknown message
152 hr = PipeSendMessage(pConnection->hPipe, TEST_UNKNOWN_MESSAGE_ID, NULL, 0, NULL, NULL, &dwResult); 152 hr = BurnPipeSendMessage(pConnection->hPipe, TEST_UNKNOWN_MESSAGE_ID, NULL, 0, NULL, NULL, &dwResult);
153 ExitOnFailure(hr, "Failed to post unknown message to parent bundle runner."); 153 ExitOnFailure(hr, "Failed to post unknown message to parent bundle runner.");
154 154
155 if (E_NOTIMPL != dwResult) 155 if (E_NOTIMPL != dwResult)
@@ -162,7 +162,7 @@ static DWORD CALLBACK EmbeddedTest_ThreadProc(
162 ExitOnFailure(hr, "Failed to post known message to parent bundle runner."); 162 ExitOnFailure(hr, "Failed to post known message to parent bundle runner.");
163 163
164LExit: 164LExit:
165 PipeConnectionUninitialize(pConnection); 165 BurnPipeConnectionUninitialize(pConnection);
166 ReleaseStr(sczArguments); 166 ReleaseStr(sczArguments);
167 167
168 return FAILED(hr) ? (DWORD)hr : dwResult; 168 return FAILED(hr) ? (DWORD)hr : dwResult;
@@ -179,7 +179,7 @@ static int EmbeddedTest_GenericMessageHandler(
179 if (GENERIC_EXECUTE_MESSAGE_ERROR == pMessage->type) 179 if (GENERIC_EXECUTE_MESSAGE_ERROR == pMessage->type)
180 { 180 {
181 // post unknown message 181 // post unknown message
182 HRESULT hr = PipeSendMessage(pContext->connection.hPipe, TEST_UNKNOWN_MESSAGE_ID, NULL, 0, NULL, NULL, &dwResult); 182 HRESULT hr = BurnPipeSendMessage(pContext->connection.hPipe, TEST_UNKNOWN_MESSAGE_ID, NULL, 0, NULL, NULL, &dwResult);
183 ExitOnFailure(hr, "Failed to post unknown message to embedded bundle."); 183 ExitOnFailure(hr, "Failed to post unknown message to embedded bundle.");
184 184
185 if (E_NOTIMPL != dwResult) 185 if (E_NOTIMPL != dwResult)
diff --git a/src/burn/test/BurnUnitTest/ExitCodeTest.cpp b/src/burn/test/BurnUnitTest/ExitCodeTest.cpp
index 465ee04b..4ff78c5a 100644
--- a/src/burn/test/BurnUnitTest/ExitCodeTest.cpp
+++ b/src/burn/test/BurnUnitTest/ExitCodeTest.cpp
@@ -130,7 +130,7 @@ static void LoadEngineState(
130 // 130 //
131 // initiate termination 131 // initiate termination
132 // 132 //
133 hr = PipeTerminateChildProcess(pConnection, 0, FALSE); 133 hr = BurnPipeTerminateChildProcess(pConnection, 0, FALSE);
134 TestThrowOnFailure(hr, L"Failed to terminate elevated process."); 134 TestThrowOnFailure(hr, L"Failed to terminate elevated process.");
135 135
136 // check results 136 // check results
@@ -150,7 +150,7 @@ static void LoadEngineState(
150 finally 150 finally
151 { 151 {
152 VariablesUninitialize(&engineState.variables); 152 VariablesUninitialize(&engineState.variables);
153 PipeConnectionUninitialize(pConnection); 153 BurnPipeConnectionUninitialize(pConnection);
154 } 154 }
155 } 155 }
156 156
@@ -241,14 +241,14 @@ static DWORD CALLBACK ExitCodeTest_ElevationThreadProc(
241 } 241 }
242 242
243 // set up connection with per-user process 243 // set up connection with per-user process
244 hr = PipeChildConnect(pConnection, TRUE); 244 hr = BurnPipeChildConnect(pConnection, TRUE);
245 ExitOnFailure(hr, "Failed to connect to per-user process."); 245 ExitOnFailure(hr, "Failed to connect to per-user process.");
246 246
247 hr = ElevationChildPumpMessages(pConnection->hPipe, pConnection->hCachePipe, &engineState.approvedExes, &engineState.cache, &engineState.containers, &engineState.packages, &engineState.payloads, &engineState.variables, &engineState.registration, &engineState.userExperience, &hLock, &dwChildExitCode, &fRestart, &fApplying); 247 hr = ElevationChildPumpMessages(pConnection->hPipe, pConnection->hCachePipe, &engineState.approvedExes, &engineState.cache, &engineState.containers, &engineState.packages, &engineState.payloads, &engineState.variables, &engineState.registration, &engineState.userExperience, &hLock, &dwChildExitCode, &fRestart, &fApplying);
248 ExitOnFailure(hr, "Failed while pumping messages in child 'process'."); 248 ExitOnFailure(hr, "Failed while pumping messages in child 'process'.");
249 249
250LExit: 250LExit:
251 PipeConnectionUninitialize(pConnection); 251 BurnPipeConnectionUninitialize(pConnection);
252 VariablesUninitialize(&engineState.variables); 252 VariablesUninitialize(&engineState.variables);
253 ReleaseStr(sczArguments); 253 ReleaseStr(sczArguments);
254 254
@@ -358,7 +358,7 @@ static void LoadEngineState(
358 358
359 VariableInitialize(&pEngineState->variables); 359 VariableInitialize(&pEngineState->variables);
360 360
361 PipeConnectionInitialize(&pEngineState->companionConnection); 361 BurnPipeConnectionInitialize(&pEngineState->companionConnection);
362 362
363 hr = CacheInitialize(&pEngineState->cache, &pEngineState->internalCommand); 363 hr = CacheInitialize(&pEngineState->cache, &pEngineState->internalCommand);
364 TestThrowOnFailure(hr, "CacheInitialize failed."); 364 TestThrowOnFailure(hr, "CacheInitialize failed.");