Menu

#298 covered complaining about uncoverable equations.

0.7.x
closed
5
2012-09-15
2010-01-07
Cary R.
No

Attached is an example that contains code where covered is complaining about missing coverage, because of the equation the missing coverage can not be created. It would be nice if covered could figure this out and automatically exclude the cases like this . You can likely have a similar issue with the left shift.

I have been trying to figure out how to exclude just this missing case, but the gui does not run on my system and the documentation on how to add this by hand is a bit too cryptic for me. What I'm missing is how do you determine the ID? Using -d v on the report does not add anything that I recognize as an ID. When I try top stat the gui I get:

ERROR! TCL/TK: Success

For now I'll live with the missing coverage, but would really like to figure out how to exclude just the one missing case (not the whole expression).

Discussion

  • Cary R.

    Cary R. - 2010-01-07

    example file and run script

     
  • Trevor Williams

    Trevor Williams - 2010-01-07

    Cary,

    Use the -x option to the report command to emit these exclusion IDs. I do have longer range plans to make Covered a bit smarter when it comes to detecting false positives, but that is a decent amount of work to add and I'm not currently in a state to do it.

    Thanks,
    Trevor

     
  • Cary R.

    Cary R. - 2010-01-07

    Thanks Trevor,

    I added the -x flag and got an expression id of E115. I then tried to add the following before the report generation, but it crashed:

    covered exclude E115 file.cdd.

    It crashed with the following message:

    covered: instance.c:466: instance_find_expression_by_exclusion_id: Assertion 'root->funit != ((void *)0)' failed.

    One question. When working does this exclude the entire expression or just the failing part of the expression?

    I completely understand about the enhancements and finding the time required to add them!

    Cary

     
  • Trevor Williams

    Trevor Williams - 2010-01-07

    The assertion is bad. Could you provide a stack trace of the assertion error? This needs to be fixed.

    This excludes the entire subexpression at the moment. I'll look into adding the ability to exclude individual expression cases, however. Seems like a valid thing to do.

     
  • Cary R.

    Cary R. - 2010-01-07

    Here's the trace back:

    (gdb) where

    0 0xffffe410 in __kernel_vsyscall ()

    1 0x47cd37a5 in raise () from /lib/tls/libc.so.6

    2 0x47cd5209 in abort () from /lib/tls/libc.so.6

    3 0x47cccd91 in __assert_fail () from /lib/tls/libc.so.6

    4 0x0809550f in instance_find_expression_by_exclusion_id (root=0x8160368, id=115, found_funit=0xbfeb088c)

    at instance.c:466
    

    5 0x0807d9c2 in exclude_find_expression (id=115, found_funit=0xbfeb088c) at exclude.c:1233

    6 0x0807e62f in exclude_expr_from_id (id=0x8160008 "E115") at exclude.c:1661

    7 0x0807ebbd in exclude_apply_exclusions () at exclude.c:1852

    8 0x0807ee05 in command_exclude (argc=4, last_arg=1, argv=0xbfeb0b24) at exclude.c:1908

    9 0x080a9537 in main (argc=4, argv=0xbfeb0b24) at main.c:209

    Let me know if there is anything else I can do to help figure this out.

     
  • Trevor Williams

    Trevor Williams - 2010-01-07

    I have attached a bug fix patch that should fix the issue with the assertion. This fix will be generally available in the next version of Covered.

     
  • Trevor Williams

    Trevor Williams - 2010-01-07

    Bug fix patch

     
  • Trevor Williams

    Trevor Williams - 2010-01-07

    I have attached a second patch that also fixes an issue with FSM exclusion (similar type of issue).

     
  • Trevor Williams

    Trevor Williams - 2010-01-07

    Secondary bug patch

     
  • Cary R.

    Cary R. - 2010-01-07

    The patch got the exclusion working correctly. I'm not certain I would mark this request fixed since what I originally asked for was to make covered smarter about recognizing cases that can never exist.

     
  • Trevor Williams

    Trevor Williams - 2010-01-07

    I changed the resolution to "Fixed" because the "bug" portion of this request should be taken care of. The "feature" portion of this bug report already exists in the Feature tracker (#2129624).

     
  • Cary R.

    Cary R. - 2010-01-08

    And so it is! I'll change the status back to pending.

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

Log in to post a comment.

MongoDB Logo MongoDB