Skip to content

Fix: handle filenames with spaces in kernbench script #1230

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kumarsgoyal
Copy link

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 kumar.sgoyal@gmail.com

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant