History log of /openbmc/phosphor-user-manager/test/json_serializer_test.cpp (Results 1 – 2 of 2)
Revision Date Author Comments
# f2196659 02-Jul-2025 Patrick Williams <patrick@stwcx.xyz>

json_serializer: handled corrupted files

When the `/var/lib/usr_mgr.conf` file is either empty or corrupted
JSON, the daemon will crash and not recover. Handle this by catching
JSON load exceptions

json_serializer: handled corrupted files

When the `/var/lib/usr_mgr.conf` file is either empty or corrupted
JSON, the daemon will crash and not recover. Handle this by catching
JSON load exceptions and deleting the corrupted file.

Fixes openbmc/phosphor-user-manager#19.

Tested: Added additional test cases to cover the corruption case and
update the test case to cover the non-throwing behavior.

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

show more ...


# 5cf5ddf3 02-Jul-2025 Patrick Williams <patrick@stwcx.xyz>

json_serializer: add tests

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