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

check for errors while writing to disk #856

Merged
merged 3 commits into from
Apr 14, 2015
Merged

Conversation

mr-c
Copy link
Contributor

@mr-c mr-c commented Feb 26, 2015

Will fix #443

@mr-c
Copy link
Contributor Author

mr-c commented Mar 30, 2015

  • Is it mergeable?
  • Did it pass the tests?
  • If it introduces new functionality in scripts/ is it tested?
    Check for code coverage with make clean diff-cover
  • Is it well formatted? Look at make pep8, make diff_pylint_report,
    make cppcheck, and make doc output. Use make format and manual
    fixing as needed.
  • Did it change the command-line interface? Only additions are allowed
    without a major version increment. Changing file formats also requires a
    major version number increment.
  • Is it documented in the ChangeLog?
    http://en.wikipedia.org/wiki/Changelog#Format
  • Was a spellchecker run on the source code and documentation after
    changes were made?

@mr-c mr-c force-pushed the fix/write_exceptions branch from 014021c to 817192b Compare March 30, 2015 14:11
@mr-c
Copy link
Contributor Author

mr-c commented Mar 30, 2015

This PR lowers coverage due to extra IO error checking code and how hard it is to test that.

@mr-c
Copy link
Contributor Author

mr-c commented Mar 30, 2015

Jenkins, please retest this

@mr-c mr-c force-pushed the fix/write_exceptions branch from 3c0062d to 4124cfc Compare April 3, 2015 11:35
@mr-c
Copy link
Contributor Author

mr-c commented Apr 3, 2015

@luizirber @camillescott @ctb ready for review and merge

@mr-c mr-c force-pushed the fix/write_exceptions branch from 4124cfc to fd93397 Compare April 4, 2015 16:12
@mr-c mr-c mentioned this pull request Apr 4, 2015
6 tasks
ksize, = unpack('I', countinghash.read(uint_size))
n_tables, = unpack('B', countinghash.read(1))
table_size, = unpack('Q', countinghash.read(ulonglong_size))
except:
Copy link
Member

Choose a reason for hiding this comment

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

Can this check be used on extract_hashbits_info too?

(at first I thought this could be more strict and catch only struct.error, but there might be IOError too and in the end they are all a kind of corrupted input, so I think that's fine)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done, thanks for the suggestion.

@luizirber
Copy link
Member

It would be good to open an issue to add tests for these extra IO error checking code (per #856 (comment) )

@mr-c mr-c force-pushed the fix/write_exceptions branch from fd93397 to 3881bad Compare April 6, 2015 10:10
@mr-c
Copy link
Contributor Author

mr-c commented Apr 6, 2015

Jenkins, retest this please

@mr-c mr-c force-pushed the fix/write_exceptions branch from 3881bad to 1c7b728 Compare April 14, 2015 13:26
luizirber added a commit that referenced this pull request Apr 14, 2015
check for errors while writing to disk
@luizirber luizirber merged commit e099926 into master Apr 14, 2015
@mr-c mr-c deleted the fix/write_exceptions branch April 14, 2015 13:32
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.

Update C++ writing code to handle write exceptions properly.
2 participants