dreport: fix procfd missing

During the execution of 'ls -Al /proc/*/fd/ 2> /dev/null', some
processes may stop, like `while true; do echo "Hello" > /dev/null; done`

Causing the ls cmd to fail, and as a result, the procfs.log will not be
collected in the dump log.

So ensure ls procfd returns success.

Tested:
1. Run `while true; do echo "Hello" > /dev/null; done` in the
background.

2. Run `set -e; while true; do ls -Al /proc/*/fd/ 2> /dev/null
|| true; done`, the command will not stop
(before the fix, the command will stop quickly).

Change-Id: I1f4e8fda000f303fd579825e0a94efdba5a097eb
Signed-off-by: Jian Zhang <zhangjian.3032@bytedance.com>
1 file changed
tree: bf4b91f7ef77fe9182733ba104eb6f4b3eb416d7
  1. dump-extensions/
  2. host-transport-extensions/
  3. subprojects/
  4. test/
  5. tools/
  6. .clang-format
  7. .clang-tidy
  8. .gitignore
  9. .shellcheck-ignore
  10. bmc_dump_entry.cpp
  11. bmc_dump_entry.hpp
  12. core_manager.cpp
  13. core_manager.hpp
  14. core_manager_main.cpp
  15. dump-extensions.hpp
  16. dump_entry.cpp
  17. dump_entry.hpp
  18. dump_manager.cpp
  19. dump_manager.hpp
  20. dump_manager_bmc.cpp
  21. dump_manager_bmc.hpp
  22. dump_manager_faultlog.cpp
  23. dump_manager_faultlog.hpp
  24. dump_manager_main.cpp
  25. dump_offload.cpp
  26. dump_offload.hpp
  27. dump_serialize.cpp
  28. dump_serialize.hpp
  29. dump_types.cpp.mako
  30. dump_types.hpp.mako
  31. dump_utils.cpp
  32. dump_utils.hpp
  33. elog_watch.cpp
  34. elog_watch.hpp
  35. example_dump_types.yaml
  36. example_errors_watch.yaml
  37. faultlog_dump_entry.cpp
  38. faultlog_dump_entry.hpp
  39. ffdc
  40. host_transport_exts.hpp
  41. LICENSE
  42. map_gen.py
  43. meson.build
  44. meson.options
  45. OWNERS
  46. ramoops_manager.cpp
  47. ramoops_manager.hpp
  48. ramoops_manager_main.cpp
  49. README.md
  50. watch.cpp
  51. watch.hpp
README.md

phosphor-debug-collector

Phosphor Debug Collector provides mechanisms to collect various log files and system parameters. Used to troubleshoot problems in OpenBMC based systems.

One such mechanism is dreport, a script that collects debug data and packages it into an archive file.

To Build

To build this package with meson, do the following steps:

    1. meson builddir
    2. ninja -C builddir

To clean the built files run ninja -C builddir clean.

To run unit tests

Tests can be run in the CI docker container, refer local-ci-build

or with an OpenBMC x86 sdk(see below for x86 steps).

meson -Dtests=enabled build
ninja -C build test