<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Oct 10, 2017, at 10:41 AM, Jose Fonseca <<a href="mailto:jfonseca@vmware.com" class="">jfonseca@vmware.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">On 10/10/17 16:31, Kyriazis, George wrote:<br class="">
<blockquote type="cite" class="">Hello…<br class="">
Piglit on windows prints out a message saying “Timeout are not implemented on Windows.”.  These timeouts are the test timeouts in case a test hangs.<br class="">
What do people do when running piglit on windows and they hit a timeout?  I would imagine there would be a non-zero number of people running piglit on windows on a regular basis, as a regression tool...<br class="">
Thank you!<br class="">
George<br class="">
</blockquote>
<br class="">
I haven't been involved into piglit Windows testing lately, so my understanding might be dated.<br class="">
<br class="">
I believe that we have timeouts when we test piglit on Windows. It's not implemented on piglit python framework itself, but rather on VMware testing framework (that driver piglit, and a bunch of other tests.)<br class="">
<br class="">
That said, I believe it would be better long term if piglit framework had timeouts on Windows, as it can probably track that with finer granularity than we do now by putting a timeout on whole piglit or subsets of piglit tests.<br class="">
<br class="">
</div>
</div>
</blockquote>
<div>Yes, definitely, that’s the way to go.</div>
<div><br class="">
</div>
<div>The code that I see in framework/test/base.py says:</div>
<div><br class="">
</div>
<div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(21, 26, 147);" class="">
<span style="font-variant-ligatures: no-common-ligatures" class="">    </span><span style="font-variant-ligatures: no-common-ligatures; color: #e48d38" class="">if</span><span style="font-variant-ligatures: no-common-ligatures" class=""> sys.platform ==
</span><span style="font-variant-ligatures: no-common-ligatures; color: #e35437" class="">'win32'</span><span style="font-variant-ligatures: no-common-ligatures" class="">:</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(121, 78, 255); background-color: rgb(21, 26, 147);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #ffffff" class="">       
</span><span style="font-variant-ligatures: no-common-ligatures" class=""># There is no implementation in piglit to make timeouts work in</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(121, 78, 255); background-color: rgb(21, 26, 147);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #ffffff" class="">       
</span><span style="font-variant-ligatures: no-common-ligatures" class=""># windows, this uses the same Popen snippet as python 2 without</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(121, 78, 255); background-color: rgb(21, 26, 147);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #ffffff" class="">       
</span><span style="font-variant-ligatures: no-common-ligatures" class=""># subprocess32 to mask it. Patches are welcome.</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(121, 78, 255); background-color: rgb(21, 26, 147);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #ffffff" class="">       
</span><span style="font-variant-ligatures: no-common-ligatures" class=""># </span>
<span style="font-variant-ligatures: no-common-ligatures; color: #000000; background-color: #e6e600" class="">XXX</span><span style="font-variant-ligatures: no-common-ligatures" class="">: Should this also include cygwin?</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(227, 84, 55); background-color: rgb(21, 26, 147);" class="">
<span style="font-variant-ligatures: no-common-ligatures; color: #ffffff" class="">        warnings.warn(</span><span style="font-variant-ligatures: no-common-ligatures" class="">'Timeouts are not implemented on Windows.'</span><span style="font-variant-ligatures: no-common-ligatures; color: #ffffff" class="">)</span></div>
<div style="margin: 0px; font-size: 11px; line-height: normal; font-family: Menlo; color: rgb(255, 255, 255); background-color: rgb(21, 26, 147); min-height: 13px;" class="">
<span style="font-variant-ligatures: no-common-ligatures" class=""></span><br class="">
</div>
</div>
<div><br class="">
</div>
<div><br class="">
</div>
<blockquote type="cite" class="">
<div class="">
<div class="">python3's subprocess module has timeout options, so it should be relatively easy to implement on top of it, in a cross-platform manner.<br class="">
<br class="">
</div>
</div>
</blockquote>
<div>Not being a python expert it looks like subprocess does not work on windows.</div>
<div><br class="">
</div>
<div>George </div>
<div class=""><br class="">
</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div class="">Jose<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>