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

Some more tests for the kernel #2502

Merged
merged 7 commits into from
Jun 1, 2018
Merged

Conversation

fingolfin
Copy link
Member

No description provided.

@fingolfin fingolfin added topic: tests issues or PRs related to tests topic: kernel release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes labels May 30, 2018
@codecov
Copy link

codecov bot commented May 31, 2018

Codecov Report

Merging #2502 into master will increase coverage by 0.03%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master    #2502      +/-   ##
==========================================
+ Coverage   74.25%   74.29%   +0.03%     
==========================================
  Files         482      482              
  Lines      245204   245181      -23     
==========================================
+ Hits       182082   182162      +80     
+ Misses      63122    63019     -103
Impacted Files Coverage Δ
src/stringobj.h 100% <ø> (ø) ⬆️
src/stringobj.c 92.94% <100%> (+9.59%) ⬆️
src/stats.c 89.6% <0%> (+0.19%) ⬆️
src/streams.c 77.02% <0%> (+0.25%) ⬆️
hpcgap/lib/hpc/stdtasks.g 64.96% <0%> (+0.76%) ⬆️
src/sysfiles.c 39.39% <0%> (+1.21%) ⬆️

*/
Obj FuncEmptyString( Obj self, Obj len )
{
Obj new;
while ( ! IS_INTOBJ(len) ) {
while ( ! IS_NONNEG_INTOBJ(len) ) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strictly speaking this is a bug fix preventing OOB access. Perhaps should be mentioned in the commit message. Not sure if we care about it for release notes - perhaps a generic entry "improved input validation for several kernel functions"?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some generic comment like that would be useful.

@fingolfin fingolfin removed the release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes label Jun 1, 2018
src/stringobj.c Outdated
"you can replace <trans> via 'return <trans>;'" );
}

if ( GET_LEN_STRING( trans ) < 256 ) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops, this must be changed to ˋelse ifˋ (user might have returned e.g. a boolean)

2
gap> POSITION_SUBSTRING("abc","b",3);
fail
gap> POSITION_SUBSTRING("abc","x",3);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That should be 0 not 3

@fingolfin fingolfin force-pushed the mh/tests branch 2 times, most recently from e1dedcc to da22cf8 Compare June 1, 2018 11:16
@fingolfin
Copy link
Member Author

@ChrisJefferson FYI I dropped the tabs->spaces changes.

*/
Obj FuncEmptyString( Obj self, Obj len )
{
Obj new;
while ( ! IS_INTOBJ(len) ) {
while ( ! IS_NONNEG_INTOBJ(len) ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think some generic comment like that would be useful.

@fingolfin fingolfin added the release notes: added PRs introducing changes that have since been mentioned in the release notes label Jun 1, 2018
@fingolfin fingolfin merged commit 7bf31f4 into gap-system:master Jun 1, 2018
@fingolfin fingolfin deleted the mh/tests branch June 1, 2018 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release notes: added PRs introducing changes that have since been mentioned in the release notes topic: kernel topic: tests issues or PRs related to tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants