Skip to content

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 <tom.hromatka@oracle.com>
Reviewed-by: George Kennedy <george.kennedy@oracle.com>
Acked-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
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 <tom.hromatka@oracle.com>
Reviewed-by: George Kennedy <george.kennedy@oracle.com>
Acked-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
Signed-off-by: Tom Hromatka <tom.hromatka@oracle.com>
Reviewed-by: George Kennedy <george.kennedy@oracle.com>
Acked-by: Sidhartha Kumar <sidhartha.kumar@oracle.com>
@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