Menu

Coverage feature causes "File is in use" errors

Anonymous
2015-01-08
2015-01-26
  • Anonymous

    Anonymous - 2015-01-08

    Hello,

    I have been using SasUnit for a few months and am finding it to be a fantastic tool. Thanks for creating it!

    I would like to use the coverage feature, but whenever I set SASUNIT_COVERAGEASSESSMENT=1 in the cmd file, I get "File is in use" errors in the test case logs. The errors have to do with files with names like "001.tcg" and "002.tcg".

    Here are two examples of the error messages from a recent test run:

    ERROR: File is in use, C:\Users\dhopkins\Documents\CVSWorkspace\Projects\Project1\TestReport\log\001.tcg.
    WARNING: Generation of coverage data has been suspended and OPTION NOCOVERAGE has been set.
    To generate coverage data again, set OPTIONS MCOVERAGE.

    ERROR: File is in use, C:\Users\dhopkins\Documents\CVSWorkspace\Projects\Project1\TestReport\log\002.tcg.
    WARNING: Generation of coverage data has been suspended and OPTION NOCOVERAGE has been set.

    Is there something I can to do in the SasUnit configuration to fix this problem? I am using SasUnit version 1.3, with SAS 9.3 (on Windows).

    Thank you,
    Don Hopkins


    Don Hopkins
    Senior Consultant

    d-Wise, 1500 Perimeter Park Dr., Suite 150, Morrisville, NC 27560
    Office: 919-334-6085 | Mobile: 919-724-9845 | Don.Hopkins@d-wise.comDon.Hopkins@d-wise.com | www.d-wise.comhttp://www.d-wise.com/
    Systems Integration/Implementationhttp://www.d-wise.com/systems-implementation/ | Clinical Standardshttp://www.d-wise.com/standards-implementation/ | Data Warehousinghttp://www.d-wise.com/data-warehouses | Process Optimizationhttp://www.d-wise.com/process-optimization
    [logo] http://www.d-wise.com/ [linkedin] http://www.linkedin.com/company/d-wise-technologies-inc. [twitter] https://twitter.com/dWiseTech [facebook] http://www.facebook.com/pages/d-Wise/192271367572620 [gplus] https://plus.google.com/110677134153265651960/posts [myprofile] http://www.linkedin.com/in/hopkinsdon

     
    • Klaus Landwich

      Klaus Landwich - 2015-01-12

      Hello Don Hopkins,

      if You are using PROC FCMP functions that include a call to the run_macro funtions in your progams, then we have already a solution for this error. See the discussion in ticket 152 [bugs:#152].

      When a macro is called from an FCMP function this error occurs. PROC FCMP is run in a parallel process and tries to write into the same coverage log file as the originating process. So the solution is to stop mcoverage prior to FCMP run_macro. And to revoke it afterwards.

      %let mcoverage=%sysfunc(getoption(mcoverage));
      options nomcoverage;
      Call to FCMP run_macro
      options &mcoverage.;

      If this doesn't help please post a more detailed error message from the log file.

      Kind regards
      Klaus Landwich

       

      Related

      Tickets: #152

  • Anonymous

    Anonymous - 2015-01-26

    Thanks for the response.

    You were correct, I am using PROC FCMP. I applied your solution, and that got rid of the "File is in use" errors.

    However, I have two remaining problems.

    1. I am now getting a new error. Several times while SASUnit is running, a SAS Message Log appears with the message "ERROR: Generic critical error". I close each of these windows, and SASUnit runs to completion.

    2. The SASUnit output looks correct, except that on the "Units under Test" tab, the cells in the "Test Coverage [%]" column are all blank. Shouldn't there be values there, now that the coverage feature is turned on?

    I haven't had time to do any troubleshooting of these new problems. If you happen to have any further hints to resolve them, I would love to hear them.

    Thanks again for your help.

    Don Hopkins

     

Anonymous
Anonymous

Add attachments
Cancel





Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.