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

libdnf: small test fixes #3381

Merged
merged 2 commits into from
Feb 22, 2024
Merged

libdnf: small test fixes #3381

merged 2 commits into from
Feb 22, 2024

Conversation

ptoscano
Copy link
Contributor

  • do not build a test source in the libdnf plugin itself
  • use g_clear_error() instead of g_error_free() in tests, in case a GError* is reused for more calls

Card IDs: CCT-367 CCT-368

test-product-id.c is a test, so there is no need to build it in the
libdnf plugin itself.

Card ID: CCT-367
@cnsnyder cnsnyder requested review from a team and jirihnidek and removed request for a team February 22, 2024 12:17
Copy link

github-actions bot commented Feb 22, 2024

Coverage

Coverage (computed on Fedora latest) •
FileStmtsMissCoverMissing
TOTAL18385468774% 
report-only-changed-files is enabled. No files were changed during this commit :)

Tests Skipped Failures Errors Time
2647 14 💤 0 ❌ 0 🔥 40.690s ⏱️

Use g_clear_error() so the pointer is also reset to NULL; this avoids
potential wrong non-null checks and double frees.

Card ID: CCT-368
@ptoscano ptoscano force-pushed the ptoscano/libdnf-test-fixes branch from 81a7a05 to 1eaefef Compare February 22, 2024 12:22
Copy link
Contributor

@jirihnidek jirihnidek left a comment

Choose a reason for hiding this comment

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

LGTM

@jirihnidek jirihnidek merged commit 9d3f9e9 into main Feb 22, 2024
15 of 16 checks passed
@jirihnidek jirihnidek deleted the ptoscano/libdnf-test-fixes branch February 22, 2024 13:30
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