CHROMIUM: bindings/rust/libflashrom: Replace rusty-fork with alternatives

The `rusty-fork` crate, used for isolating tests in separate processes,
is no longer actively maintained. This commit replaces it with a
combination of modern, well-maintained crates to achieve the same goal
while improving the project's long-term health.

The key changes are:
- Replaced `rusty-fork` with `fork`
- Refactored the test suite to use a `run_in_fork` helper function,
  which encapsulates the process forking logic.
- Removed an unsafe `static mut` in the logging test in favor of a
  safe, thread-local implementation.

This change resolves the dependency on an unmaintained crate and brings
the test suite inline with modern Rust practices without altering the
core test logic.

BUG=b:426471570
TEST=`cargo test` in bindings/rust/libflashrom

Change-Id: I1d8c53d8aec3d08684aedcb14874035c464ee167
Signed-off-by: Hsuan Ting Chen <roccochen@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/flashrom/+/6671390
Reviewed-by: Jian-Jia Su <jjsu@chromium.org>
2 files changed
tree: 8d97ff996cf11d9db51d849cc19fad306a5111ac
  1. .github/
  2. bindings/
  3. doc/
  4. flashchips/
  5. include/
  6. meson_cross/
  7. platform/
  8. scripts/
  9. subprojects/
  10. tests/
  11. util/
  12. .gitattributes
  13. .gitignore
  14. 82802ab.c
  15. action_descriptor.c
  16. action_descriptor.h
  17. amd_imc.c
  18. asm106x.c
  19. at45db.c
  20. atahpt.c
  21. atapromise.c
  22. atavia.c
  23. big_lock.c
  24. big_lock.h
  25. bitbang_spi.c
  26. board_enable.c
  27. buspirate_spi.c
  28. cbtable.c
  29. ch341a_spi.c
  30. ch347_spi.c
  31. chipset_enable.c
  32. cli_classic.c
  33. cli_common.c
  34. cli_getopt.c
  35. cli_output.c
  36. COPYING
  37. cros_ec.c
  38. cros_ec_commands.h
  39. custom_baud.c
  40. custom_baud_darwin.c
  41. custom_baud_linux.c
  42. dediprog.c
  43. developerbox_spi.c
  44. digilent_spi.c
  45. DIR_METADATA
  46. dirtyjtag_spi.c
  47. dmi.c
  48. Doxyfile
  49. drkaiser.c
  50. dummyflasher.c
  51. edi.c
  52. en29lv640b.c
  53. erasure_layout.c
  54. file_lock.c
  55. flashchips.c
  56. flashchips_crosbl.c
  57. flashrom.c
  58. fmap.c
  59. ft2232_spi.c
  60. gfxnvidia.c
  61. helpers.c
  62. helpers_fileio.c
  63. hwaccess_physmap.c
  64. hwaccess_x86_io.c
  65. hwaccess_x86_msr.c
  66. i2c_helper_linux.c
  67. ich_descriptors.c
  68. ichspi.c
  69. internal.c
  70. internal_par.c
  71. ipc_lock.h
  72. it8212.c
  73. it87spi.c
  74. jedec.c
  75. jlink_spi.c
  76. known_boards.c
  77. layout.c
  78. libflashrom.c
  79. libflashrom.map
  80. linux_mtd.c
  81. linux_spi.c
  82. MAINTAINERS
  83. mcp6x_spi.c
  84. mediatek_i2c_spi.c
  85. meson.build
  86. meson_options.txt
  87. mstarddc_spi.c
  88. ni845x_spi.c
  89. nic3com.c
  90. nicintel.c
  91. nicintel_eeprom.c
  92. nicintel_spi.c
  93. nicnatsemi.c
  94. nicrealtek.c
  95. ogp_spi.c
  96. opaque.c
  97. OWNERS
  98. parade_lspcon.c
  99. parallel.c
  100. pcidev.c
  101. pickit2_spi.c
  102. pony_spi.c
  103. power.c
  104. power.h
  105. PRESUBMIT.cfg
  106. print.c
  107. printlock.c
  108. processor_enable.c
  109. programmer.c
  110. programmer_table.c
  111. raiden_debug_spi.c
  112. rayer_spi.c
  113. README.chromiumos
  114. README.rst
  115. realtek_mst_i2c_spi.c
  116. s25f.c
  117. satamv.c
  118. satasii.c
  119. sb600spi.c
  120. serial.c
  121. serprog.c
  122. sfdp.c
  123. spi.c
  124. spi25.c
  125. spi25_statusreg.c
  126. spi95.c
  127. sst28sf040.c
  128. sst49lfxxxc.c
  129. sst_fwhub.c
  130. stlinkv3_spi.c
  131. stm50.c
  132. superio.c
  133. test_build.sh
  134. udelay.c
  135. udelay_dos.c
  136. unblocked_terms.txt
  137. usb_device.c
  138. usbblaster_spi.c
  139. usbdev.c
  140. VERSION
  141. w29ee011.c
  142. w39.c
  143. wbsio_spi.c
  144. writeprotect.c
  145. writeprotect_ranges.c