Closed giulianobelinassi closed 2 years ago
I think the non-verbose default output should contain only the successful applications, not any of the SKIPPED ones. One line per patched process, like so:
$ ulp trigger *.so
12345 (bash) buildid THE_BUILD_ID_OF_12345 applied cve-2022-0778_livepatch1-1.1.1l-150400.3.4.so
34567 (firefox) buildid THE_BUILD_ID_OF_34567 applied cve-2022-0778_livepatch1-1.1.1l-150400.2.1.so
(note how the fantasy output lists two different live patches being applied, presumably because firefox and that bash were started at different points in time when different on-disk variants of glibc)
This PR now includes summarization.
If possible to one-line and summarize the result of process application, then do it. For instance:
$ ulp trigger 'tests/.libs/*_livepatch1.so'
sleep (pid: 8253): SKIPPED Target library not loaded
sleep (pid: 8252): SKIPPED Target library not loaded
sleep (pid: 8251): SKIPPED Target library not loaded
sleep (pid: 8250): SKIPPED Target library not loaded
manyprocesses (pid: 8214): SUCCESS tests/.libs/libmanyprocesses_livepatch1.so
Instead of specifying all patches that were skipped on 8253, just show that all patches were skipped because of reason X. Only show every patch result if summarization failed or verbose mode is enabled.
Trigger messages can be quite complicated to understand because of the huge amount of information displayed on screen.
We now refactor this to provide more simplified messages:
For instance, when triggering all processes with the patches in current directory:
Or when asking to revert all patches to libcrypto.so to all processes:
Or when a trigger to a single process fails with build id mismatch:
This should improve readability all across the board.
Signed-off-by: Giuliano Belinassi gbelinassi@suse.de