[Bug 1627] Coverage Improvement: devFS routines

bugzilla-daemon at rtems.org bugzilla-daemon at rtems.org
Fri Jul 23 00:03:23 UTC 2010


https://www.rtems.org/bugzilla/show_bug.cgi?id=1627

--- Comment #7 from Joel Sherrill <joel.sherrill at oarcorp.com> 2010-07-22 19:03:23 CDT ---
(In reply to comment #6)
> Test committed.  I am starting a coverage run.
> 
> (In reply to comment #5)
> 
> > devFS_stat has one uncovered range, which I am not sure, if is reachable. 
> > 
> > devFS_stat checks for the device name table and returns an error if not found.
> > 
> > But, before this, the stat() calls the devFS_evaluate_path which would have
> > done this check. So, if there is no device table, the stat does reach the point
> > where it calls the devFS_stat().
> 
> I will have to get Jennifer to go over this with me.  It sounds tricky.

I concur the code is unreachable.  Turning the check into this and committing:

  /*
   *  stat() invokes devFS_evaluate_path() which checks that node_access
   *  is not NULL.  So this should NEVER be NULL unless someone breaks
   *  other code in this filesystem.
   */
  #if defined(RTEMS_DEBUG)
    if (!the_dev)
      rtems_set_errno_and_return_minus_one( EFAULT );
  #endif 

If you update and are happy, we can close the PR. :)

-- 
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.



More information about the bugs mailing list