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

prefer assert(0) to exit(1) #2

Merged
merged 5 commits into from Dec 16, 2014
Merged

prefer assert(0) to exit(1) #2

merged 5 commits into from Dec 16, 2014

Conversation

ghost
Copy link

@ghost ghost commented Dec 15, 2014

and a few minor cleanups (compilation warnings, make check tests)

When a fatal error (unaligned memory etc.) is detected, jerasure
should assert(3) instead of exit(3) to give a chance to the calling
program to catch the exception and display a stack trace. Although it is
possible for gdb to display the stack trace and break on exit, libraries
are not usually expected to terminate the calling program in this way.

Signed-off-by: Loic Dachary <loic@dachary.org>
It's not that uncommon to have path longer than 100 characters.

Signed-off-by: Loic Dachary <loic@dachary.org>
Resolve compilation warnings about unused variables and function return
values being ignored.

Signed-off-by: Loic Dachary <loic@dachary.org>
@ghost ghost assigned kmgreen2 Dec 15, 2014
If the gf_methods was not found, the test would silently succeed doing
nothing. Check for existence and fail if it is not in the path.

Signed-off-by: Loic Dachary <loic@dachary.org>
Add a test to run with make check to run encoder and decoder to make
sure they work at least in one simple case. It is also useful as a
documentation about how to use them.

Signed-off-by: Loic Dachary <loic@dachary.org>
@ghost
Copy link
Author

ghost commented Dec 15, 2014

-x ${GF_METHODS} is more robust than which, indeed ;-) repushed.

@kmgreen2
Copy link
Contributor

lgtm!

kmgreen2 added a commit that referenced this pull request Dec 16, 2014
Merging a set of commits from Loic: Use assert(0) to exit(1) and clean-up some of the test code.
@kmgreen2 kmgreen2 merged commit 8685797 into ceph:master Dec 16, 2014
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