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

Error Handling and Coverage Improvement of the Framework Library #686

Open
PengZheng opened this issue Nov 14, 2023 · 0 comments
Open

Error Handling and Coverage Improvement of the Framework Library #686

PengZheng opened this issue Nov 14, 2023 · 0 comments
Labels
component/framework Categorizes an issue or PR relevant to the framework. kind/improvement Categorizes issue or PR as related to improvements.
Milestone

Comments

@PengZheng
Copy link
Contributor

Currently, the overall coverage of the framework library is around 85%.
Utilizing error injector, we shall try to increase the code coverage to 90% or more.
This should happen after deprecated APIs have been removed.

I believe by increasing the overall coverage, we can eliminate many corner case bugs like the following:

/**
 * @brief Register a service to the Celix framework.
 *
 * Note: Please use the celix_bundleContext_registerServiceAsync instead.
 *
 * @param ctx The bundle context
 * @param svc the service object. Normally a pointer to a service struct (i.e. a struct with function pointers)
 * @param serviceName the service name, cannot be NULL
 * @param properties The meta properties associated with the service. The service registration will take ownership of the properties (i.e. no destroy needed)
 * @return The serviceId (>=0) or -1 if the registration was unsuccessful.
 */
CELIX_FRAMEWORK_EXPORT long celix_bundleContext_registerService(celix_bundle_context_t *ctx, void *svc, const char* serviceName, celix_properties_t *properties);

celix_bundleContext_registerService will leak properties when serviceName == NULL.

@PengZheng PengZheng added this to the 3.0.0 milestone Nov 14, 2023
@PengZheng PengZheng added component/framework Categorizes an issue or PR relevant to the framework. kind/improvement Categorizes issue or PR as related to improvements. labels Nov 16, 2023
@PengZheng PengZheng changed the title Coverage improvement of the framework library Error Handling and Coverage Improvement of the Framework Library Dec 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/framework Categorizes an issue or PR relevant to the framework. kind/improvement Categorizes issue or PR as related to improvements.
Projects
None yet
Development

No branches or pull requests

1 participant