#
60618a73 |
| 13-May-2025 |
Amithash Prasad <amithash@meta.com> |
probe: Change FoundProbeTypeT to point to the optional enum
`findProbeType` return is only ever used for the returned enumeration rather than the iterator. Having it return the iterator has addition
probe: Change FoundProbeTypeT to point to the optional enum
`findProbeType` return is only ever used for the returned enumeration rather than the iterator. Having it return the iterator has additional complications since the original code had the map be a local variable and we were playing with undefined behavior. Looking further, none of the callers seem to want the iterator and the return type is making them perform more work.
Change-Id: I81b73d5b1555abfbe07569bcf0fcdd14b031704d Signed-off-by: Amithash Prasad <amithash@meta.com>
show more ...
|
#
2ae2b818 |
| 08-May-2025 |
Peter Yin <peter.yin@quantatw.com> |
entity_manager: perform_probe: fixed findProbeType return issue
Returning an iterator to a locally scoped flat_map led to undefined behavior, as the map is destroyed when the function exits, leavi
entity_manager: perform_probe: fixed findProbeType return issue
Returning an iterator to a locally scoped flat_map led to undefined behavior, as the map is destroyed when the function exits, leaving the iterator dangling. This change makes the map static const to ensure that the iterator remains valid after the function returns.
Tested: The issue was observed when evaluating compound probes such as AND. Previously, the string matched, but due to dangling pointer,the wrong enum was returned.
Before: - ProbeType matched: [empty string], enum = invalid value (e.g., 408617467) - lastCommand = UNKNOWN
Loop Start DEBUG: evaluating probe = xyz.openbmc_project.FruDevice({'BOARD_PRODUCT_NAME': 'MB'}) No matched probeType for probe = xyz.openbmc_project.FruDevice({'BOARD_PRODUCT_NAME': 'MB'}) <7> Found probe match on /xyz/openbmc_project/FruDevice/ Minerva_Harma_MB_DVT2 xyz.openbmc_project.FruDevice DEBUG: ret(before) = false, cur = true DEBUG: ret(after) = true DEBUG: lastCommand = type=0 FALSE_T DEBUG: evaluating probe = AND Matched probeType: , enum = 408617467 DEBUG: ret(before) = true, cur = true DEBUG: ret(after) = true DEBUG: lastCommand = type=408617467 UNKNOWN DEBUG: evaluating probe = FOUND('Mt.Mitchell_DCSCM_BMC') Matched probeType: FOUND, enum = 4 DEBUG: ret(before) = true, cur = false DEBUG: ret(after) = true DEBUG: lastCommand = type=4 FOUND Loop End
After: - ProbeType matched: "AND", enum = 2 - lastCommand = AND
Loop Start DEBUG: evaluating probe = xyz.openbmc_project.FruDevice({'BOARD_PRODUCT_NAME': 'MB'}) <7> Found probe match on /xyz/openbmc_project/FruDevice/ Minerva_Harma_MB_DVT2 xyz.openbmc_project.FruDevice DEBUG: ret(before) = false, cur = true DEBUG: ret(after) = true DEBUG: lastCommand = type=0 FALSE_T DEBUG: evaluating probe = AND DEBUG: ret(before) = true, cur = true DEBUG: ret(after) = true DEBUG: lastCommand = type=2 AND DEBUG: evaluating probe = FOUND('Mt.Mitchell_DCSCM_BMC') DEBUG: ret(before) = true, cur = false lastcommand = AND DEBUG: ret(after) = false DEBUG: lastCommand = type=4 FOUND Loop End
Change-Id: Ia620d4373e5a0c41db19f21d825d17dd8318c37c Signed-off-by: Peter Yin <peter.yin@quantatw.com>
show more ...
|
#
59ef1e72 |
| 16-Apr-2025 |
Christopher Meis <christopher.meis@9elements.com> |
cleanup: Move em only utils code into em directory
More separation of code for improvement of repository maintainability.
Change-Id: I4e77b472355066483cf646cdcd29e7ed660294a3 Signed-off-by: Christo
cleanup: Move em only utils code into em directory
More separation of code for improvement of repository maintainability.
Change-Id: I4e77b472355066483cf646cdcd29e7ed660294a3 Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
show more ...
|
#
fc9e7fda |
| 03-Apr-2025 |
Christopher Meis <christopher.meis@9elements.com> |
cleanup: move EM service code in EM directory
Improving repository structure increases maintainability.
Change-Id: I7f746a5d491dda256a06143f516e7d078a761c14 Signed-off-by: Christopher Meis <christo
cleanup: move EM service code in EM directory
Improving repository structure increases maintainability.
Change-Id: I7f746a5d491dda256a06143f516e7d078a761c14 Signed-off-by: Christopher Meis <christopher.meis@9elements.com>
show more ...
|