Skip to content
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

reproduce: Test for a directory exists instead of a regular file #12070

Closed
wants to merge 1 commit into from

Conversation

armfazh
Copy link
Contributor

@armfazh armfazh commented Jun 12, 2024

The -f flag checks for a file exists and is a regular file, while the -d checks for a directory exists.

Doc: https://www.gnu.org/software/coreutils/manual/html_node/File-type-tests.html

@jonathanmetzman
Copy link
Contributor

Did this cause a problem for you? i think the testcase should be a file not a dir.

@armfazh
Copy link
Contributor Author

armfazh commented Jun 14, 2024

I raised this issue as I found it while I'm try to running in my setup.
Note that the documentation mentions that the command expects a PATH instead of a single file.

@jonathanmetzman
Copy link
Contributor

I raised this issue as I found it while I'm try to running in my setup. Note that the documentation mentions that the command expects a PATH instead of a single file.

I think it means a path to a single testcase, not a directory.

@armfazh
Copy link
Contributor Author

armfazh commented Jun 14, 2024

When I specify the path of one single file I got as a result the following message:

***
*** NOTE: fuzzing was not performed, you have only
***       executed the target code on a fixed set of inputs.
***

does that means the fuzzer didn't run? or which flag should I enable to forze the fuzzer to run with one single test case?

@jonathanmetzman
Copy link
Contributor

When I specify the path of one single file I got as a result the following message:

***
*** NOTE: fuzzing was not performed, you have only
***       executed the target code on a fixed set of inputs.
***

does that means the fuzzer didn't run? or which flag should I enable to forze the fuzzer to run with one single test case?

I think it did run because libfuzzer will run testcases in a directory or a single one in a file, but when users want to reproduce a tetcase, they almost always mean a file.

@armfazh
Copy link
Contributor Author

armfazh commented Jun 14, 2024

I see thanks for clarifying. The warning message make me think that argument is a directory instead of a file. Closing this, code is right.

@armfazh armfazh closed this Jun 14, 2024
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.

2 participants