Skip to content

Fix an adaptived bug where multiple rules weren't properly loaded #36

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

Merged
merged 3 commits into from
Feb 13, 2025

Conversation

drakenclimber
Copy link
Member

Fix a bug where only up to two rules could be added. The linked list
->next pointer was being mismanaged when more than 2 rules were present
in the JSON config file.

@drakenclimber drakenclimber added the bug Something isn't working label Jan 30, 2025
@drakenclimber drakenclimber self-assigned this Jan 30, 2025
@drakenclimber drakenclimber added this to the Adaptived v1.0.1 milestone Jan 30, 2025
@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Jan 30, 2025
@drakenclimber drakenclimber requested review from sidkumar99 and removed request for sidkumar99 January 30, 2025 17:26
@gkennedy12
Copy link
Contributor

LGTM. Just a question.

Fix a bug where only up to two rules could be added.  The linked list
->next pointer was being mismanaged when more than 2 rules were present
in the JSON config file.

Signed-off-by: Tom Hromatka <[email protected]>
Reviewed-by: George Kennedy <[email protected]>
Acked-by: Sidhartha Kumar <[email protected]>
Add a test to verify that multiple (more than 2) rules are properly
added.

$ ./test070 ./
Initializing cause always
Initializing effect print
Initializing cause always
Initializing effect print
Initializing cause always
Initializing effect print
Initializing cause always
Initializing effect print
Initializing cause always
Initializing effect print
Rule "1" loaded
Rule "2" loaded
Rule "3" loaded
Rule "4" loaded
Rule "5" loaded
...
Cleaning up rule 3
Cleaning up cause always
Cleaning up effect print
Cleaning up rule 4
Cleaning up cause always
Cleaning up effect print
Cleaning up rule 5
Cleaning up cause always
Cleaning up effect print

Signed-off-by: Tom Hromatka <[email protected]>
Reviewed-by: George Kennedy <[email protected]>
Acked-by: Sidhartha Kumar <[email protected]>
Signed-off-by: Tom Hromatka <[email protected]>
Reviewed-by: George Kennedy <[email protected]>
Acked-by: Sidhartha Kumar <[email protected]>
@drakenclimber drakenclimber merged commit cb8f68c into oracle:master Feb 13, 2025
6 checks passed
@drakenclimber drakenclimber deleted the multiple_rules branch February 13, 2025 17:18
@drakenclimber
Copy link
Member Author

Also pushed to adaptived-release-1.0 branch in commits 1887d34 and 24e89fc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants