[PATCH] SoC 2024: clarify `test_path_is_*` conversion microproject

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



One of our proposed microprojects is to convert instances of `test -e`
and related functions to instead use `test_path_exists` or similar. This
conversion is only feasible when `test -e` is not used as part of a
control statement, as the replacement is used to _assert_ a condition
instead of merely testing for it.

Clarify the microproject's description accordingly.

Signed-off-by: Patrick Steinhardt <ps@xxxxxx>
---
 SoC-2024-Microprojects.md | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/SoC-2024-Microprojects.md b/SoC-2024-Microprojects.md
index 644c0a6..782441f 100644
--- a/SoC-2024-Microprojects.md
+++ b/SoC-2024-Microprojects.md
@@ -41,7 +41,10 @@ to search, so that we can remove this microproject idea.
 Find one test script that verifies the presence/absence of
 files/directories with 'test -(e|f|d|...)' and replace them with the
 appropriate `test_path_is_file`, `test_path_is_dir`, etc. helper
-functions.
+functions. Note that this conversion does not directly apply to control
+flow constructs like `if test -e ./path; then ...; fi` because the
+replacements are intended to assert the condition instead of merely
+testing for it.
 
 If you can't find one please tell us, along with the command you used
 to search, so that we can remove this microproject idea.
-- 
2.44.0

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux