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

tbv: Cleanup test_1 to make sure the bit vectors are deleted. #453

Closed
wants to merge 2 commits into from

Conversation

schwehr
Copy link
Collaborator

@schwehr schwehr commented Sep 28, 2023

  • Use different variable names for each sub test
  • Combine definition and initialization
  • Localize variables
  • Make a request_size variable to avoid repeating the size of 80000
CID 1546559 (https://github.com/HDFGroup/hdf4/issues/1-4 of 4): Resource leak (RESOURCE_LEAK)
19. leaked_storage: Variable b going out of scope leaks the storage it points to.

schwehr and others added 2 commits September 28, 2023 16:48
- Use different variable names for each sub test
- Combine definition and initialization
- Localize variables
- Make a `request_size` variable to avoid repeating the size of 80000

```
CID 1546559 (HDFGroup#1-4 of 4): Resource leak (RESOURCE_LEAK)
19. leaked_storage: Variable b going out of scope leaks the storage it points to.
```
@vchoi-hdfgroup vchoi-hdfgroup added Component - Testing Test code, GitHub workflows Priority - 3. Low 🔽 Code cleanup, small feature change requests, etc. labels Sep 29, 2023
@schwehr
Copy link
Collaborator Author

schwehr commented Sep 29, 2023

As discussed out-of-band, this PR does not match the style the HDF4 team wants, so I'm closing the PR. Feel free to rewrite this fix to the HDF4/HDF5 style if you'd like.

Also, this test would be better if it was split into two, either as two test functions or two scopes inside a single test function. That would be a better way of showing that the two checks are supposed to be completely independent. They should not use the same variables to make that independence blatantly obvious.

@schwehr schwehr closed this Sep 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component - Testing Test code, GitHub workflows Priority - 3. Low 🔽 Code cleanup, small feature change requests, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants