ltp icon indicating copy to clipboard operation
ltp copied to clipboard

Fix: handle filenames with spaces in kernbench script

Open kumarsgoyal opened this issue 8 months ago • 1 comments

Fix: handle filenames with spaces/newlines in kernbench source caching

This patch updates the loop used to cache the kernel source into RAM to handle filenames with spaces, newlines, and other special characters correctly.

Previously, the script used a for loop over backtick-evaluated find, which would break on filenames with spaces or unusual characters. This caused warnings like:

cat: ./tools/testing/selftests/devices/probe/boards/Dell: No such file or directory
cat: Inc.,XPS: No such file or directory

This patch replaces the loop with a more robust find . -type f -print0 | while IFS= read -r -d '' structure, which safely handles all valid filenames.

Signed-off-by: Sahil Kumar [email protected]

kumarsgoyal avatar Apr 07 '25 06:04 kumarsgoyal

Hi! The change looks fine however there are spaces before tabs that should be fixed and the commit is missing signed-off-by line, see https://gerrit-review.googlesource.com/Documentation/user-signedoffby.html

metan-ucw avatar May 14 '25 15:05 metan-ucw