none
VS2012 SDV command line build from ClearCase view doesn't run full SDV checks. RRS feed

  • Question

  • I have a WDM driver project in a ClearCase (source control/versioning file system) view(volume) that needs to run on a build server using the same view(volume).  When I run the msbuild SDV command, it runs to completion on my desktop system, but seems to not really run on the build server system.  I conclude this is because it takes 13hr 28min to run on my desktop but only 13min4sec to run on the build server.  The SDV summary is also very different in the two cases.  I deleted the driver local "sdv" directory to try and force a full SDV run, but it still only took the 13minutes to run.  I suspect that there are "view private files", i.e files that are only visible to my desktop system that SDV needs that accounts for this behavior.  There are a number of SDV files and I need to only add the files to source control that are only read by SDV. (Note that when I copy the entire volume to a server system SDV does a full run as expected.  So there must be some additional "sdv-needed" files.  The possible files Isee are:

    runsdvui.cmd
    sdv-user.sdv

    I expect that I should not add these files as they seem user/logon specific.

    A  "staticdv.exe /clean" is done first in both desktop and build server cases.  The summary of the command output from the server build is:

    -------------- Build Server Outout ----------------
      SDV checked 26 properties(s).
      SDV performed 156 check(s) with:
       138 Not Applicable
       44 Other
      Run this command to view the results:msbuild <driver project file> /p:configuration="<release configuration>" /p:platform=<Win32|x64|arm> /t:Sdv /p:inputs="/view"
     
    EXEC : warning : 44 check(s) did not produce result(s). [p:\h_w2k_platform\driver\ipmi\build_ipmi.vcxproj]
      Merging results
      Nothing to merge for p:\h_w2k_platform\driver\ipmi
      SDV exit code: 0
    Done Building Project "p:\h_w2k_platform\driver\ipmi\build_ipmi.vcxproj" (sdv target(s)).

    Build succeeded.

    "p:\h_w2k_platform\driver\ipmi\build_ipmi.vcxproj" (sdv target) (1) ->
    (Sdv target) ->
      EXEC : warning : 44 check(s) did not produce result(s). [p:\h_w2k_platform\driver\ipmi\build_ipmi.vcxproj]

        1 Warning(s)
        0 Error(s)

    Time Elapsed 00:13:14.72
    -------------- End Build Server Outout ----------------


    A summary of the build from a desktop build is:

    --------------- Desktop Build Output ----------------
      Check     'ipmi' for 'forwardedatbadirql'  ...Done
      SDV checked 26 properties(s).
      SDV performed 156 check(s) with:
            1  Defect(s)
            2 Warning(s)
            48 Rule Passes
            80 Not Applicable
            24 Timeout
            1 Other
      Run this command to view the results:msbuild <driver project file> /p:configu
      ration="<release configuration>" /p:platform=<Win32|x64|arm> /t:Sdv /p:inputs
      ="/view"

    EXEC : warning : 25 check(s) did not produce result(s). [I:\h_w2k_platform\driv
    er\ipmi\build_ipmi.vcxproj]
    EXEC : warning : 13 check(s) should use the following workaround. [I:\h_w2k_pla
    tform\driver\ipmi\build_ipmi.vcxproj]
      Workaround: msbuild <driver project file> /p:configuration="<release configur
      ation>" /p:platform=<Win32|x64|arm> /t:Sdv /p:inputs="/refine"
      Merging results
      Nothing to merge for I:\h_w2k_platform\driver\ipmi
      SDV exit code: 0
    Done Building Project "I:\h_w2k_platform\driver\ipmi\build_ipmi.vcxproj" (sdv t
    arget(s)).


    Build succeeded.

    "I:\h_w2k_platform\driver\ipmi\build_ipmi.vcxproj" (sdv target) (1) ->
    (Sdv target) ->
      EXEC : warning : 25 check(s) did not produce result(s). [I:\h_w2k_platform\dr
    iver\ipmi\build_ipmi.vcxproj]
      EXEC : warning : 13 check(s) should use the following workaround. [I:\h_w2k_p
    latform\driver\ipmi\build_ipmi.vcxproj]

        2 Warning(s)
        0 Error(s)

    Time Elapsed 13:27:51.50
    --------------- End Desktop Build Output ----------------

    Any idea why these two builds are behaving differently?

    Thanks,  Jim

    Sunday, June 9, 2013 6:21 PM

Answers

  • Yes if you are missing libraries this will most definitely will cause more Not Applicable results.

    Yes the SDV Controller in VS 2012 will try to write to this file. If you make your file writable then the controller will overwrite the thread property which you have set to 0 and thus you will not be able to share this file on machines with a different number of logical processors.

    For a workaround I would suggest having a script that copies the sdv-default.xml file from a share not the driver folder and then runs StaticDV on the command line. 

    We will investigate this issue in the Windows Next timeframe.

    Thanks for the feedback.

    Con.

    Wednesday, June 12, 2013 4:48 PM

All replies

  • In WDK 8, the only supported scenario to make your server machine be able to build driver projects and use SDV is to install Visual Studio 2012 (for compilers + MSBuild files) and WDK 8 (for driver MSBuild files and SDV) on the server machine. WDK 8 does not support copying over directories from a machine to a target machine, as this will lead to a partially broken WDK install because a few registry keys will be missing (mainly WDKContentRoot and KitsRoot, if I remember correctly).

    In your case, it is not clear to me exactly how you've set up your server machine. If you simply tried to copy over a bunch of directories from your desktop system to your server system, then this is likely to fail (or give partial failures) for the reason stated above.

    I hope this helps!


    Max -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Monday, June 10, 2013 5:04 PM
  • There are two build servers.  Each build server system was properly set up by installing VS2012 and then WDK 8.  On "build server A" the sources directories for the driver build with all the files that had been created by a previous build where copied.  Only the sources directories were copied , not the build tools.  The SDV run on "build server A" runs fine.

    "build server B" uses the source control Clear Case to access the driver sources directory for the build.  Files in Clear Case are read only for the build process, so files that are modified by the build process can not be under source control (i.e. in Clear Case).  Since the two SDV run behaviors differ, I think that there are some additional file(s) that need to be added to Clearcase, but SDV has lots of files and with a SDV run taking 6hours it isn't easy to narrow this down.  Any SDV file I add to Clear case that needs to be modified will break the build.

    How does SDV determin "Not Applicable" for the checks?

    Note the Clear Case server B, has 138  "Not Applicable" verses only 80 for what seems to be the working case.

    Thanks,  Jim

    Monday, June 10, 2013 6:37 PM
  • Hi Jim you asked

    How does SDV determin "Not Applicable" for the checks?

    It determines this by running precondition rules and based on the results of these preconditions it applies a rule or reports a "Not Applicable".

    So if a precondition rule reports a "other" result such as a tool error then the dependent verification rule will result in a "Not Applicable".

    Is the folder that contains the driver code under "Clear Case" source control read only?

    Can you successfully run the StaticDV clean command documented here http://msdn.microsoft.com/en-us/library/windows/hardware/hh466459(v=vs.85).aspx ?

    Monday, June 10, 2013 7:04 PM
  • The folder with the driver code is writeable.  The Win8Release\x64 folders are created during the build process, so we know it is writable.

    The clean command is run in all build environments first.  Build output files are not under source control.

    Thanks,  Jim

    Monday, June 10, 2013 7:34 PM
  • Jim please also verify that the following files are not read only and under source control"

    runsdvui.cmd
    sdv-user.sdv

    refine.sdv

    Thanks Con.

    Monday, June 10, 2013 7:46 PM
  • Those files are not under source control.  Those files are not visible on the Clear Case "build server B".

    I assume they are created during the build.

    Thanks,  Jim

    Monday, June 10, 2013 8:10 PM
  • Thanks for trying this. We will need to investigate this further from our side.

    Thanks Conal.

    Monday, June 10, 2013 8:16 PM
  • I have found a difference that might be significant.

    For the desktop and "Server A" build, the SDV output for three of the 4 libraries is present.

    For "build server B" (with Clear Case) the SDV processing for the 3 libraries is not present.  This is because I haven't integrated the processing of th libraris into the batch build yet. 

    This results in significantly different SDV output.  The working desktop build shows:

      Compile   'ipmi' for [sdv_flat_harness] ...Done
      Link      'ipmi' for [utillib.lib,ttxddk.lib,ttxlinklib.lib] ...Done
      Compile   'ipmi' for [sdv_flat_harness] ...Done
      Link      'ipmi' for [utillib.lib,ttxddk.lib,ttxlinklib.lib] ...Done

    ...

    While the failing case looks like:

        Compile   'ipmi' for [sdv_flat_harness] ...Done
      Link      'ipmi'  ...Done
      Compile   'ipmi' for [sdv_flat_harness] ...Done
      Link      'ipmi'  ...Done

    Could the lack of having the SDV processed libraries cause the checks to become "Not Applicable"?

    Thanks,  Jim

    Monday, June 10, 2013 8:36 PM
  • Another possible contributing factor:

    SDV-default.xml is read only in the Clear Case build server.  This is needed to set the thread count to 0, so it will use all possible threads, and to increase the timeout and memory contraints.  When I just tried running SDV via VS2012 with a readonly SDV-defaults.xml it gave an error:  "There was an error saving the configuration to the driver directory. ..." .  This may have only occured because I changed the rules from default to "Custome selection", but wanted to mention it.

    Could a read-only  SDV-default.xml be causing a problem on the Clear Case build server?

    Thanks,  Jim

    Tuesday, June 11, 2013 3:15 PM
  • Yes if you are missing libraries this will most definitely will cause more Not Applicable results.

    Yes the SDV Controller in VS 2012 will try to write to this file. If you make your file writable then the controller will overwrite the thread property which you have set to 0 and thus you will not be able to share this file on machines with a different number of logical processors.

    For a workaround I would suggest having a script that copies the sdv-default.xml file from a share not the driver folder and then runs StaticDV on the command line. 

    We will investigate this issue in the Windows Next timeframe.

    Thanks for the feedback.

    Con.

    Wednesday, June 12, 2013 4:48 PM