Skip to content

kernbench fails on filenames with spaces or newlines #1231

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
kumarsgoyal opened this issue Apr 7, 2025 · 0 comments
Open

kernbench fails on filenames with spaces or newlines #1231

kumarsgoyal opened this issue Apr 7, 2025 · 0 comments

Comments

@kumarsgoyal
Copy link

When running kernbench on a source tree that contains files with spaces or special characters in their paths, the script prints errors like:

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

This happens due to the unsafe use of:

for i in `find -type f`; do
    cat $i > /dev/null
done

which breaks on such filenames.

🛠️ A fix has been proposed in PR #1230, replacing the loop with a find . -print0 | while read -d '' construct that correctly handles all valid filenames.

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

No branches or pull requests

1 participant