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

Action's comments #6

Merged
merged 10 commits into from Jul 28, 2022
Merged

Action's comments #6

merged 10 commits into from Jul 28, 2022

Conversation

FabrizioSandri
Copy link
Owner

This pull request aims to enhance the action's commenting system.

@FabrizioSandri FabrizioSandri changed the title Action comment Action's comments Jul 27, 2022
@github-actions
Copy link

No error has been reported by RcppDeepState

Analyzed functions summary

function_name tested_inputs
difference 3
multiplication 3
sum 3

@FabrizioSandri
Copy link
Owner Author

In the last few commits I've made improvements to the case where RcppDeepState finds no errors. I've temporarily turned off the workflow that tests testSAN in favor of checking TestPackage, a package that is known to be error-free.

As can be seen from the most recent gtihub-actions comment, a table showing the summary of each examined function with the number of tests run has been included with the message "No error has been reported by RcppDeepState".

@FabrizioSandri
Copy link
Owner Author

@tdhock In this pull request I also managed to add a third option for the comment argument. There are three choices:

  • true: if set to true the GitHub action adds a comment to the pull request whether or not RcppDeepState finds any errors;
  • failure: adds a comment to the pull request only when RcppDeepState finds at least one error;
  • false: the action simply runs in background without actually bothering the user with comments.

This has been tested in the last action execution triggered by the commit f7c351c. The action has been run on the bug-free package with the comment parameter set to failure. We can see from the analysis that the package contains no errors, hence no comments have been added.

@FabrizioSandri
Copy link
Owner Author

To recap the changes made in this pull request, I implemented the following features:

  • additional information about which functions were tested, and with how many random inputs when no error is found.
    Test: this comment;
  • third option for the comment parameter; the failure value. This tells the action to comment only when there is a failure.
    Test: workflow triggered in the commit f7c351c.

@tdhock
Copy link
Collaborator

tdhock commented Jul 27, 2022

that "Analyzed functions summary" looks good!

@github-actions
Copy link

github-actions bot commented Jul 28, 2022

RcppDeepState Report

function_name inputs message file_line address_trace R_code
rcpp_read_out_of_bound
rbound18370691
Invalid read of size 4 read_out_of_bound.cpp:7 No Address Trace found
Test code
testlist <- list(rbound = 18370691L)
result <- do.call(testSAN::rcpp_read_out_of_bound, testlist)
rcpp_use_after_deallocate
array_size1435512533
Invalid read of size 1 use_after_deallocate.cpp:8 use_after_deallocate.cpp:6
Test code
testlist <- list(array_size = 1435512533L)
result <- do.call(testSAN::rcpp_use_after_deallocate, testlist)
rcpp_use_after_free
alloc_size563418074
Argument 'size' of function malloc has a fishy (possibly negative) value: -6446060184 use_after_free.cpp:6 No Address Trace found
Test code
testlist <- list(alloc_size = 563418074L)
result <- do.call(testSAN::rcpp_use_after_free, testlist)
rcpp_write_index_outofbound
wbound-307888286
Invalid write of size 4 write_index_outofbound.cpp:8 No Address Trace found
Test code
testlist <- list(wbound = -307888286L)
result <- do.call(testSAN::rcpp_write_index_outofbound, testlist)
rcpp_zero_sized_array
value-1466872237
Invalid write of size 4 zero_sized_array.cpp:8 zero_sized_array.cpp:7
Test code
testlist <- list(value = -1466872237L)
result <- do.call(testSAN::rcpp_zero_sized_array, testlist)

@FabrizioSandri
Copy link
Owner Author

@tdhock I changed the action such that it adds the comment once in a pull request and updates it in subsequent runs.

Running twice the action on the testSAN package allowed me to test this functionality. The final comment illustrates the result: the comment has been created on the first run of job and then updated on the second run.

@FabrizioSandri
Copy link
Owner Author

I noticed that although the comment option in tdhock/binsegRcpp#13 was set to true, no comment had been included.
I discovered that the issue was caused by the fail ci if error option being set to true, which prevented the execution of the subsequent steps. To solve this, I modified the conditions that are applied when the step that adds a comment runs.

@FabrizioSandri
Copy link
Owner Author

FabrizioSandri commented Jul 28, 2022

that "Analyzed functions summary" looks good!

@tdhock Does it make sense to include the "Analyzed functions summary" even if RcppDeepState discovers errors? For now that summary is printed only in the case RcppDeepState finds no error.

@FabrizioSandri FabrizioSandri merged commit 062eb6f into main Jul 28, 2022
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.

None yet

2 participants