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

Implement DQLITE_VISIBLE_TO_TESTS properly, or get rid of it #513

Open
cole-miller opened this issue May 5, 2023 · 1 comment
Open

Implement DQLITE_VISIBLE_TO_TESTS properly, or get rid of it #513

cole-miller opened this issue May 5, 2023 · 1 comment
Labels
Feature New feature, not a bug

Comments

@cole-miller
Copy link
Contributor

In #511 I added the DQLITE_VISIBLE_TO_TESTS attribute to functions and globals that are not part of our public API but are currently used by integration tests. It currently expands to __attribute__((visibility("default"))), so other consumers of libdqlite can also see those symbols. It would be good to figure out a way of arranging that those symbols are visible only when building our integration tests, or alternatively to fix the integration tests so that they don't use non-public stuff (for example, by moving some things to a static library that's built into both libdqlite and integration-test).

@MathieuBordere MathieuBordere added the Feature New feature, not a bug label Jun 12, 2023
@freeekanayaka
Copy link
Contributor

It seems that the DQLITE_VISIBLE_TO_TESTS is used to expose mostly internal functions around client functionality. Once the public C client has been put in place, I think we should be able to use that instead, and get rid of the majority of DQLITE_VISIBLE_TO_TESTS instances. The few other DQLITE_VISIBLE_TO_TESTS uses seem to tweak internal state and can probably be accomplished by introducing a dqlite_server_test_control() function similar to sqlite3_test_control().

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature, not a bug
Projects
None yet
Development

No branches or pull requests

3 participants