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

1.5 breaks fuzzing package main #86

Closed
dgryski opened this issue Aug 21, 2015 · 7 comments
Closed

1.5 breaks fuzzing package main #86

dgryski opened this issue Aug 21, 2015 · 7 comments

Comments

@dgryski
Copy link
Contributor

dgryski commented Aug 21, 2015

golang/go#4210

With 1.4, you could still import a main package which meant testing commands was easy.

With 1.5, your parsing code has to be moved to its own package.

Probably worth mentioning in the README, even if there's no workaround.

@dvyukov
Copy link
Owner

dvyukov commented Aug 21, 2015

Hi Damian,

Feel free to send a pull request.

@dvyukov
Copy link
Owner

dvyukov commented Sep 9, 2016

1.4 is too old to care

@dgryski
Copy link
Contributor Author

dgryski commented Sep 9, 2016

Can the fix you applied to be able to fuzz internal packages be used in a similar manner to fuzz a main too?

@dvyukov
Copy link
Owner

dvyukov commented Sep 9, 2016

Dunno. I guess no, because I still need to be able to import it.
But you can't even write unit tests for main. If you want it be tested, you need to move logic out.

@dgryski
Copy link
Contributor Author

dgryski commented Sep 9, 2016

??? Of course you can write tests in the main package. Testing the main function can be tricky.

@dvyukov
Copy link
Owner

dvyukov commented Sep 9, 2016

How does it work?

@dgryski
Copy link
Contributor Author

dgryski commented Sep 9, 2016

Whatever magic go test does. I've never looked into it.

AlekSi pushed a commit to AlekSi/go-fuzz that referenced this issue Feb 6, 2018
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

2 participants