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

Add testing whitelist #143

Merged
merged 1 commit into from Aug 27, 2018
Merged

Add testing whitelist #143

merged 1 commit into from Aug 27, 2018

Conversation

jeremylt
Copy link
Member

This adds a testing whitelist to make backend developers explicitly list which tests they will not support

@jeremylt jeremylt requested a review from jedbrown August 26, 2018 21:12
@jeremylt jeremylt force-pushed the test-whitelist branch 2 times, most recently from a012494 to 4cdcc9e Compare August 26, 2018 21:20
@jeremylt
Copy link
Member Author

jeremylt commented Aug 26, 2018

@dmed256 @camierjs This branch is failing the OCCA tests on travis but passing on my local machine. I suspect that something changed in OCCA, as this branch did not change any OCCA files and the OCCA backend was passing tests last night on Travis.

tests/tap.sh Outdated
${output}.err; then
# grep to skip test if backend chooses to whitelist test
if grep -F -q -e 'Backend does not support' ${output}.err \
&& grep -F -q -e "$1 $backend" tests/whitelist ; then
Copy link
Member Author

Choose a reason for hiding this comment

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

I think it is a safer policy to force backends to explicitly list what functions they do not support so we don't get false passes from the test suite

Copy link
Member

Choose a reason for hiding this comment

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

Could we make this something that a backend implements instead of residing in a common whitelist (that will need to be edited and merged)? One solution would be for the backend to implement the function that it "does not support", but raise an error with a different syntax to indicate that it is intentional.

Copy link
Member Author

Choose a reason for hiding this comment

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

How about this change, backends add "backend does not implement..."? If we like it I can squash the two commits.

tests/whitelist Outdated
t202-elemrestriction-f /gpu/occa
t202-elemrestriction-f /omp/occa
t202-elemrestriction-f /ocl/occa
t202-elemrestriction-f /gpu/magma
Copy link
Member Author

Choose a reason for hiding this comment

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

I am listing the Fortran and C tests separately. I did it this way because we have had trouble with the Fortran tests not being the same as the C tests and certain backends not playing nice over Fortran.

tests/tap.sh Outdated
@@ -53,15 +53,15 @@ for ((i=0;i<${#backends[@]}; ++i)); do

# grep to pass test t103 on error
if grep -F -q -e 'Cannot grant CeedVector array access, the access lock is already in use' \
${output}.err; then
${output}.err && [[ "$1" = "t103"* ]] ; then
Copy link
Member Author

Choose a reason for hiding this comment

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

I explicitly added this check so we don't get false positives on other tests.

@jeremylt
Copy link
Member Author

This fails in Travis but passes with OCCA libocca/occa@527494c

Copy link
Member

@jedbrown jedbrown left a comment

Choose a reason for hiding this comment

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

I assume we want SKIPs to be tallied.

CeedMemType mtype,
CeedCopyMode cmode,
const CeedInt *indices) {
return CeedError(r->ceed, 1, "Backend does not impliment blocked restrictions");
Copy link
Member

Choose a reason for hiding this comment

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

spelling

tests/tap.sh Outdated
printf "ok $i0 # SKIP $1 $backend\n"
printf "ok $i1 # SKIP $1 $backend stdout\n"
printf "ok $i2 # SKIP $1 $backend stderr\n"
printf "ok $i0 # OCCA SKIP $1 $backend\n"
Copy link
Member

Choose a reason for hiding this comment

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

I believe TAP says the SKIP must come first.

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct, fixed

@jeremylt
Copy link
Member Author

Huh, I had thought TAP already tallied skips, but I guess not

@jeremylt
Copy link
Member Author

jeremylt commented Aug 27, 2018

Perl might have intentionally moved away from explicitly listing the number of skipped tests in the summary result:
https://grokbase.com/t/perl/qa/092jekprma/test-skip-ing-weirdness

Currently, Perl will output the number of TODO tests, but not the number of SKIP tests. I changed the directives of the tests where functions are intentionally not enabled to TODO. I am not wild about the label TODO as some backends may intentionally never implement a function, but I think it is important to differentiate between an 'OCCA backend not supported' skip and a 'functionality not implemented' skip.

tests/tap.sh Outdated
if grep -F -q -e 'Backend does not implement' \
${output}.err ; then
printf "ok $i0 # TODO - not implemented $1 $backend\n"
printf "ok $i1 # TODO - not implemented $1 $backend stdout\n"
Copy link
Member

Choose a reason for hiding this comment

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

Specification says TODO should be marked not ok. I don't have a problem with prove's behavior, but I think we should try to follow the standard when using directives. There are other TAP consumers including Jenkins, which we might use to get CI on GPU or other DOE hardware/software stacks.

Copy link
Member Author

Choose a reason for hiding this comment

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

I mixed it up; I thought TODO was another type of conditional pass. Fixed now.

Explicitly check for t103 or t104 for expected fail
@codecov
Copy link

codecov bot commented Aug 27, 2018

Codecov Report

Merging #143 into master will decrease coverage by 0.04%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #143      +/-   ##
==========================================
- Coverage   90.68%   90.64%   -0.05%     
==========================================
  Files          77       77              
  Lines        3931     3934       +3     
==========================================
+ Hits         3565     3566       +1     
- Misses        366      368       +2
Flag Coverage Δ
#backends 88.11% <33.33%> (-0.09%) ⬇️
#examples 87.69% <ø> (ø) ⬆️
#interface 89.78% <ø> (ø) ⬆️
#tests 96.64% <ø> (ø) ⬆️
Impacted Files Coverage Δ
backends/occa/ceed-occa-restrict.c 91.73% <0%> (-1.55%) ⬇️
backends/occa/ceed-occa.c 71.27% <100%> (+0.3%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 269c27c...4cc6aec. Read the comment docs.

@jeremylt
Copy link
Member Author

jeremylt commented Aug 27, 2018

Code coverage went down because lines that return an error code that gets the test listed as skipped are not counted as covered. Otherwise this build passes.

@jedbrown
Copy link
Member

We aren't slaves to the coverage overlords.

@jeremylt
Copy link
Member Author

I wanted to at least set as a norm that we acknowledge and understand why coverage goes down and then we can overrule the codecov check if it makes sense.

@jeremylt jeremylt merged commit 5726b88 into master Aug 27, 2018
@jeremylt jeremylt deleted the test-whitelist branch August 28, 2018 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants