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

Issue293 tempfile error checks #304

Merged
merged 8 commits into from
Dec 12, 2019
Merged

Conversation

mikebentley15
Copy link
Collaborator

Fixes #293

Description:
The original intent of issue #293 was to add error checking for mkstemp() and mkdtemp(). For that, it necessitated better testing for regression. Along with this change, I did the following:

  • Add gcov usage for tests/flit_src to show line coverage
  • Update tinydir.h to the latest version to better handle symbolic links
  • Add functions rstrip(), lstrip(), strip(), basename(), and dirname() to FLiT's source
  • Use the TH_TEST() macro instead of TH_REGISTER(). The former is easier and less error-prone.
  • Have test coverage on every line I can (without stubbing) for fsutil.cpp

Documentation:

  • Fixed documentation at the top of test_harness.h to describe the new way of creating a test
  • Document the five new functions

Tests:

  • Added tests for each of the new functions
  • Added tests to cover uncovered lines in fsutil.h

@mikebentley15 mikebentley15 added bug c++ Involves touching c++ code make Involves touching GNU Makefiles documentation Involves touching documentation tests Involves touching tests labels Dec 11, 2019
@mikebentley15 mikebentley15 merged commit 15ead85 into devel Dec 12, 2019
@mikebentley15 mikebentley15 deleted the issue293-tempfile-error-checks branch December 12, 2019 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug c++ Involves touching c++ code documentation Involves touching documentation make Involves touching GNU Makefiles tests Involves touching tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error-prone use of mkstemp() and mkdtemp() in fsutil.cpp
2 participants