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

remove duplicate testcases #8

Closed
wants to merge 1 commit into from

Conversation

sjaeckel
Copy link

while working on libtom/libtomcrypt#319 I've realized that your collection contains a bunch of dupes which are removed here

```
csplit -n4 testcases.txt '/---$/' '{*}' > /dev/null
sed -i '/---/d' xx*
fdupes -Nd . > /dev/null
find . -empty -type f -delete
for i in {0000..9000}; do if [ -f xx$i ]; then cat xx$i >> clean_testcases.txt; echo --- >> clean_testcases.txt; fi; done
rm xx*
mv clean_testcases.txt testcases.txt
```
@CLAassistant
Copy link

CLAassistant commented Mar 26, 2018

CLA assistant check
All committers have signed the CLA.

@overheadhunter
Copy link
Member

These test cases are generated by this go program. Removing them for test efficiency is possible, of course. I am just wondering if it makes sense to dedup in the go program.

@timmclean You wrote it in the first place. Any thoughts on this?

@timmclean
Copy link
Contributor

Yeah, it seems like it'd tidier to modify the test case generator to avoid producing the duplicates in the first place. It's a 40 KB improvement on 17 MB though, right?

@sjaeckel
Copy link
Author

If I had searched a bit harder and found the generator myself I would've fixed it there as well :)

IMO it can be left as it is now, because this testset is static ... and as soon as someone has the need to change it and touches the generator it'd probably make sense to fix it there...

@overheadhunter overheadhunter self-requested a review March 30, 2018 08:49
Copy link
Member

@overheadhunter overheadhunter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The modified file is a generated one. While there might be duplicates in it, it makes more sense to fix it in the generator.

Discussion of this PR shows, that it doesn't make too much sense to merge this, since it merely saves us a few kB.

@overheadhunter
Copy link
Member

I'll reject this PR as discussed above. Thanks for thinking about providing your changes back upstream, anyway! ❤️

@sjaeckel sjaeckel deleted the cleanup-testcases branch March 30, 2018 09:13
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.

4 participants