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

Integrate python json parser as a service for testing #46

Merged
merged 2 commits into from
Jun 13, 2024

Conversation

moticless
Copy link
Collaborator

@moticless moticless commented Jun 13, 2024

  • One of the outputs of librdb is JSON. Until now there was a naive testing code that compared two json files, attempting to ignore JSON elements ordering. This PR replaces it with a python service, run in the background, read JSON filename from its STDIN, generates its signature by ignoring JSON elements order, and prints SHA256 signature to its STDOUT. test_common.c will fork this service. The reason it is running as a service is to avoid the overhead of starting a new process for each evaluation and the intensive use of it.

  • In addition the optional json fields will be now in the form:

__aux__ : { …. }
__slotinfo__ : { …. }
__dbsize__ : { …. }
  • In JSON, the value “-0.0” is a valid double, but we want to output it as 0.

  • Modified librdb tests to run with -O0 optimization instead of -O3

tezc
tezc previously approved these changes Jun 13, 2024
@tezc
Copy link
Collaborator

tezc commented Jun 13, 2024

LGTM. Just added minor comments.

@moticless moticless merged commit 46049a1 into redis:main Jun 13, 2024
2 checks passed
@moticless moticless deleted the refine-json-parsing branch June 13, 2024 12:51
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