History log of /openbmc/phosphor-psu-code-mgmt/test/test_version.cpp (Results 1 – 4 of 4)
Revision Date Author Comments
# 4ba2edcc 06-Jan-2023 Chicago Duan <duanzhijia01@inspur.com>

Fix bug: Fix spelling errors

Fix spelling errors.

Signed-off-by: Chicago Duan <duanzhijia01@inspur.com>
Change-Id: Ibf7c6598be90d6a19d4a39adef0dee2202d9f0a6


# d0f8bbb3 18-Oct-2019 Lei YU <mine260309@gmail.com>

Version: support CRLF line feed in MANIFEST

When a MANIFEST is generated from Windows and it contains CRLF as line
feed, the code was getting each line with '\r' at the end, and thus the
parsed stri

Version: support CRLF line feed in MANIFEST

When a MANIFEST is generated from Windows and it contains CRLF as line
feed, the code was getting each line with '\r' at the end, and thus the
parsed string contains '\r' and it incorrectly parses the string.

Add a piece of code to support CRLF line feed so support such MANIFEST
files.

Tested: Added a unit test case to verify CRLF is correctly handled.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I99e146717b815e3e40c232376555b2b48d77bc56

show more ...


# 9edb7330 19-Sep-2019 Lei YU <mine260309@gmail.com>

Activation: check compatiblity of uploaded software

Before activation, check if the PSU inventory's manufacturer and model
matches the uploaded software, to make sure the software is not updated
to

Activation: check compatiblity of uploaded software

Before activation, check if the PSU inventory's manufacturer and model
matches the uploaded software, to make sure the software is not updated
to a incompatible PSU.

The model check is mandatory, and if the PSU manufacturer is empty,
ignore the manufacturer check.

Tested: Upload a dummy tarball with incompatible model, verify the
activation fails;
Upload a dummy tarball with compatible model, verify the
activation succeeds with a dummy update service.
Also added unit tests for several cases:
* Update on a PSU that model is incompatible;
* Update on a PSU that the manufacture is incompatible;
* Update on a PSU that the menufacture is empty;
* Update on 4 PSUs that the second one is incompatible.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Ia1b6a3fa6c98cdea1ea93c917c0938d4a60f0911

show more ...


# fda15a33 19-Sep-2019 Lei YU <mine260309@gmail.com>

Refactor Version::getValue()

Rename the function to getValues() and change the parameter and return
value types, and add a test case for it.
It will be used in future commits.

Tested: Verify the un

Refactor Version::getValue()

Rename the function to getValues() and change the parameter and return
value types, and add a test case for it.
It will be used in future commits.

Tested: Verify the unit test case passes.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: I57ccf857737ef13f4e2f27c5f2fb7400a2170e91

show more ...