dsp: firmware_update: Initialize msgbuf after argument tests
The msgbuf APIs are being reworked to improve soundness and error
reporting. Prior to introducing some new requirements on its users,
ensure its init/destroy sequences have minimal code spans.
This effort surfaced a problem with a test configuration for
encode_get_downstream_firmware_parameters_req() which was passing
an invalid transfer operation flag. Previously this was masked by a
buffer-length validation failure.
Change-Id: I7259ac86d696da425ac9d919e6864dfb238d8996
Signed-off-by: Andrew Jeffery <andrew@codeconstruct.com.au>
diff --git a/tests/dsp/firmware_update.cpp b/tests/dsp/firmware_update.cpp
index 78f81db..7c406aa 100644
--- a/tests/dsp/firmware_update.cpp
+++ b/tests/dsp/firmware_update.cpp
@@ -2284,7 +2284,7 @@
constexpr uint8_t instanceId = 1;
// Setup invalid transfer operation flag
constexpr pldm_get_downstream_firmware_parameters_req params_req{
- 0x0, PLDM_ACKNOWLEDGEMENT_ONLY};
+ 0x0, PLDM_GET_FIRSTPART};
constexpr size_t payload_length =
PLDM_GET_DOWNSTREAM_FIRMWARE_PARAMETERS_REQ_BYTES -
1 /* inject erro length*/;