History log of /openbmc/phosphor-ipmi-flash/tools/test/tools_updater_unittest.cpp (Results 1 – 19 of 19)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 42a44c28 16-Aug-2024 Patrick Williams <patrick@stwcx.xyz>

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda forma

clang-format: re-format for clang-18

clang-format-18 isn't compatible with the clang-format-17 output, so we
need to reformat the code with the latest version. The way clang-18
handles lambda formatting also changed, so we have made changes to the
organization default style format to better handle lambda formatting.

See I5e08687e696dd240402a2780158664b7113def0e for updated style.
See Iea0776aaa7edd483fa395e23de25ebf5a6288f71 for clang-18 enablement.

Change-Id: I09e19a126d456dc184fd70e82d4e4e4217fa8ee7
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 3f596287 12-Apr-2024 Willy Tu <wltu@google.com>

handler: Support more retry logic

Add retry logic for more methods that may fail due to unstable
ipmi interfaces. Also added one seconds sleep in between retries to
allow some time for the interface

handler: Support more retry logic

Add retry logic for more methods that may fail due to unstable
ipmi interfaces. Also added one seconds sleep in between retries to
allow some time for the interface to be initialized.

Tested: Updated BMC firmware with the new tool and didn't have any
regression.

Change-Id: Ifc4155dd895f1a654da9e03f17e4c1e8613c9133
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 1038836c 10-May-2023 Patrick Williams <patrick@stwcx.xyz>

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest

clang-format: copy latest and re-format

clang-format-16 has some backwards incompatible changes that require
additional settings for best compatibility and re-running the formatter.
Copy the latest .clang-format from the docs repository and reformat the
repository.

Change-Id: I2ee8cbc4581d0c3ccdc130b646357c45fa0373db
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>

show more ...


# 1b23b772 15-Mar-2023 Willy Tu <wltu@google.com>

Add retry to sendFile handler

In cases where the ipmi interface is interrupted, we want to be able to
recover automatically without having to retrigger it again. For example,
this may happen if the

Add retry to sendFile handler

In cases where the ipmi interface is interrupted, we want to be able to
recover automatically without having to retrigger it again. For example,
this may happen if the ipminet interface gets reconfigure in the middle
of transfering an image.

The inital goal was to have the retry for ipminet only with and restart
at the remaining data instead of from the beginning. The issue there is
that we needed to restart the ipmi blob session to write again and doing
so will clear out the existing written data. When trying to write to
existing session will caused the update to be stalled and required a
ipmi restart to recover.

Tested:
images is able to be tranfered fully and validated after we interrupted
the ipminet interface in the middle.

Change-Id: Id734f6a92625bc6a1256fea010fb4b068f7bf1d5
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 99d292a3 08-Feb-2022 Willy Tu <wltu@google.com>

phosphor-ipmi-flash: Code Health Cleanup

Removed the following warning.
- using decl '*' is unused
- 'push_back' is called inside a loop; consider pre-allocating the
container capacity before th

phosphor-ipmi-flash: Code Health Cleanup

Removed the following warning.
- using decl '*' is unused
- 'push_back' is called inside a loop; consider pre-allocating the
container capacity before the loop
- function '*' defined in a header file; function
definitions in header files can lead to ODR violations

Change-Id: I44e4b0f8056a853fb45b690394be1a8ebec45b20
Signed-off-by: Willy Tu <wltu@google.com>

show more ...


# 2862421c 09-Nov-2021 Patrick Venture <venture@google.com>

tools/test: delete now returns a boolean

Updates the test mock expectation to return a boolean.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I8f10a1b561900295b2613317c09de688a4d9d

tools/test: delete now returns a boolean

Updates the test mock expectation to return a boolean.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I8f10a1b561900295b2613317c09de688a4d9d944

show more ...


# f88bcf3b 14-Oct-2021 William A. Kennington III <wak@google.com>

tools/helper: Streamline return types

These functions can already return exceptions, so make better use of
them for reporting failures.

Change-Id: I572e9e3ee44bbd5add601f3246bb4f95cb9308bf
Signed-o

tools/helper: Streamline return types

These functions can already return exceptions, so make better use of
them for reporting failures.

Change-Id: I572e9e3ee44bbd5add601f3246bb4f95cb9308bf
Signed-off-by: William A. Kennington III <wak@google.com>

show more ...


# 203ad804 09-Sep-2021 Willy Tu <wltu@google.com>

updater: Cleanup Active blob to support multiple stages

Without the change, the update will fail due to existing active blob.
```
./burn_my_bmc --command update --interface ipmipci \
--image test

updater: Cleanup Active blob to support multiple stages

Without the change, the update will fail due to existing active blob.
```
./burn_my_bmc --command update --interface ipmipci \
--image test.txt --sig test.txt --type bios
Sending over the firmware image.
sendFile with /flash/bios and test.txt
Opening the cleanup blob
Committing to the cleanup blob
Closing cleanup blob
Exception received: blob exception received: Received IPMI_CC: 255
```

With the Change, it will delete the active blob to continue the update.
```
./burn_my_bmc --command update --interface ipmipci \
--image test.txt --sig test.txt --type bios
Found an active blob, deleting /flash/active/image
Opening the cleanup blob
Committing to the cleanup blob
Closing cleanup blob
Committing to the cleanup blob
Closing cleanup blob
Sending over the firmware image.
sendFile with /flash/bios and test.txt
000Find [0x1050 0x750]
bar0[0x90100000]
Progress: 100.00%
001Sending over the hash file.
sendFile with /flash/hash and test.txt
000Find [0x1050 0x750]
bar0[0x90100000]
Progress: 100.00%
001Opening the verification file
Committing to /flash/verify to trigger service
Calling stat on /flash/verify session to check status
running
running
failed
Returned non-success (could still be running (unlikely))
failed
Opening the cleanup blob
Committing to the cleanup blob
Closing cleanup blob
Exception received: Verification failed
```

Signed-off-by: Willy Tu <wltu@google.com>
Change-Id: I46a802c7faece60a9b5354db47860e796af99107

show more ...


# 328f520f 16-Mar-2021 Jie Yang <jjy@google.com>

tools/handler: Read the running version

A host tool would read the running firmware version through polling the
version blob state.

Signed-off-by: Jie Yang <jjy@google.com>
Change-Id: I0d68fff6527c

tools/handler: Read the running version

A host tool would read the running firmware version through polling the
version blob state.

Signed-off-by: Jie Yang <jjy@google.com>
Change-Id: I0d68fff6527cd52360abee1cb225a8f228d68392

show more ...


# 8cdf964d 30-Sep-2020 Patrick Venture <venture@google.com>

tools/test: add updater tests to increase coverage

Add missing unit-tests for the updater.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ieb668561e6cc7285549406d830f1295039dec4c0


# 9b37b095 28-May-2020 Patrick Venture <venture@google.com>

update gcc10 and clang-format10

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I72239b884615d26b2c4311c49a26e2eced0a1fb0


# 060be01f 14-Nov-2019 Benjamin Fair <benjaminfair@google.com>

tools: remove stat() check for supported interface

If an unsupported interface is requested, the open() call will simply
fail.

Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Change-Id: Iefd

tools: remove stat() check for supported interface

If an unsupported interface is requested, the open() call will simply
fail.

Signed-off-by: Benjamin Fair <benjaminfair@google.com>
Change-Id: Iefd11657d957931873a4d20246d9ccdd791ba0e5

show more ...


# 6749ba1c 19-Sep-2019 Brandon Kim <brandonkim@google.com>

tools: Add ignoreUpdate parameter

Adds ignoreUpdate flag to skip checking the update status and always
return success instead. This is needed for platforms that use the reboot
json and encounters an

tools: Add ignoreUpdate parameter

Adds ignoreUpdate flag to skip checking the update status and always
return success instead. This is needed for platforms that use the reboot
json and encounters an update failure due to IPMI going down during
shutdown.

Tested: Tried out an update with and without --ignore-update to verify
that the flag ignores the update status and returns success.

Signed-off-by: Brandon Kim <brandonkim@google.com>
Change-Id: Ie20774f997229cd5ff8ae9082dc8a747079f9a2c

show more ...


Revision tags: v1.0
# 84778b8d 26-Jun-2019 Patrick Venture <venture@google.com>

tools: remove phosphor-ipmi-blobs dependency

The host tool depended on the BMC header: firmware_handler.hpp because
it defined the flags. This header depends on phosphor-ipmi-blobs,
therefore the h

tools: remove phosphor-ipmi-blobs dependency

The host tool depended on the BMC header: firmware_handler.hpp because
it defined the flags. This header depends on phosphor-ipmi-blobs,
therefore the host-tool depends on this. Move the flags into a separate
common header file and snip this dependency.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Id2ad33a1611c02605a1ed5c695429d0451eb98d4

show more ...


# 9f937c45 21-Jun-2019 Patrick Venture <venture@google.com>

tools: add support for ubi tarball from host

Add a parameter that specifies the layout type, static or ubitar.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I86c09d8ffeb55ba789279d

tools: add support for ubi tarball from host

Add a parameter that specifies the layout type, static or ubitar.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I86c09d8ffeb55ba789279d2568b579a44b3923d7

show more ...


# 01123b2a 20-Jun-2019 Patrick Venture <venture@google.com>

tools: split out the update handler

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I367ea961c98ec822d3200d101c4f5977d77e7402


# 5f2fcc4e 20-Jun-2019 Patrick Venture <venture@google.com>

tools: add cleanup blob on failure

If the update process fails, call the cleanup blob and try to cleanup
artifacts automatically.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ib57

tools: add cleanup blob on failure

If the update process fails, call the cleanup blob and try to cleanup
artifacts automatically.

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: Ib57e5cc7f13b73e2d7371116058469a4d4bfd0c4

show more ...


# 1f09d414 19-Jun-2019 Patrick Venture <venture@google.com>

tool: continue the unit-tests of the host tool

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I51349fc103af2a55f1b83830bf8e74407fc15b9e


# 380832cc 19-Jun-2019 Patrick Venture <venture@google.com>

test: cleanup by moving tool tests into subfolder

Signed-off-by: Patrick Venture <venture@google.com>
Change-Id: I15b3514d095d9fc770a1b0fe125eb48d96ada2c8