commit | 48fe64e92ce0ea218e6c628657e98b2c16fe8b46 | [log] [tgz] |
---|---|---|
author | Willy Tu <wltu@google.com> | Mon Aug 01 23:23:46 2022 +0000 |
committer | Willy Tu <wltu@google.com> | Tue Aug 09 06:53:43 2022 +0000 |
tree | 4e27e3ac4bdb5720af211b1747a63614744eb801 | |
parent | b53049e86f90a7d0bbe2044922f1a50fe47ad548 [diff] |
dbus-sdr: Fixed race condition in fruRead Return the actual fru data in getFru and not rely on the fruCach wherever possible to make sure the the fru data is still avaliable even if the fruCache get's updated. Added writeFru to take in a fru vector to make sure that the fruWrite with ipmi handler don't use the cache directly. Only use the fruCache in writeFruIfRunning. Tested: Ran the two while loops in different terminal and check the size written. ``` while [ true ] do ipmitool fru read 27 /tmp/fru27.bin done while [ true ] do ipmitool fru read 95 /tmp/fru95.bin done ``` No issue of running into the race condition issue of the fru being cleared and writing Fru Size of 0. FruWrite seems to still work. Signed-off-by: Willy Tu <wltu@google.com> Change-Id: I48704fef362e4fbdf0c39e545c63872002534cdb
meson builddir ninja -C builddir
meson builddir -Dbuildtype=minsize -Db_lto=true -Dtests=disabled ninja -C builddir
If any of the dependencies are not found on the host system during configuration, meson automatically gets them via its wrap dependencies mentioned in ipmid/subprojects
.
meson builddir -Dwrap_mode=nofallback ninja -C builddir
meson builddir -Dbuildtype=debug ninja -C builddir
meson builddir -Db_coverage=true -Dtests=enabled ninja -C builddir test ninja -C builddir coverage