Module: tools
Branch: master
Commit: 551a16bd22932087c13106e884f6e5a2f7eec6d9
URL: https://source.winehq.org/git/tools.git/?a=commit;h=551a16bd22932087c13106e…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Feb 11 13:58:59 2021 +0100
testbot/LogUtils: Improve handling of child process crashes.
The "unhandled exception in child process" line also tells us the pid
of the child process so we can add it to the list of pids for the
current test unit.
ParseWineTestReport() should also count at least one failure for the
child process (in case the regular "unhandled exception" line got
lost).
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/lib/WineTestBot/LogUtils.pm | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
diff --git a/testbot/lib/WineTestBot/LogUtils.pm b/testbot/lib/WineTestBot/LogUtils.pm
index 9164b47..7a72958 100644
--- a/testbot/lib/WineTestBot/LogUtils.pm
+++ b/testbot/lib/WineTestBot/LogUtils.pm
@@ -639,10 +639,17 @@ sub ParseWineTestReport($$$)
$Cur->{LineFailures}++;
}
elsif (($Cur->{Unit} ne "" and
- $Line =~ /($Cur->{UnitsRE}):\d+: unhandled exception [0-9a-fA-F]{8} in child process /) or
- $Line =~ /^([_.a-z0-9]+):\d+: unhandled exception [0-9a-fA-F]{8} in child process /)
+ $Line =~ /($Cur->{UnitsRE}):\d+: unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]+)/) or
+ $Line =~ /^([_.a-z0-9]+):\d+: unhandled exception [0-9a-fA-F]{8} in child process ([0-9a-f]+)/)
{
- _CheckUnit($LogInfo, $Cur, $1, "child exception");
+ my ($Unit, $Pid) = ($1, $2);
+ if ($Cur->{Units}->{$Unit})
+ {
+ # This also replaces a test summary line.
+ $Cur->{Pids}->{$Pid || 0} = 1;
+ $Cur->{SummaryFailures}++;
+ }
+ _CheckUnit($LogInfo, $Cur, $Unit, "child exception");
$Cur->{LineFailures}++;
}
elsif (($Cur->{Unit} ne "" and
Module: tools
Branch: master
Commit: cd1765fd1cd78f1abe85d1341dea51d3e727e084
URL: https://source.winehq.org/git/tools.git/?a=commit;h=cd1765fd1cd78f1abe85d13…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Feb 11 13:58:36 2021 +0100
testbot/reporttest: Add tests for child processes.
Test the failure propagation and crash handling.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/src/reporttest/report.template | 28 ++++++++++++++++++++++++++--
testbot/src/reporttest/report.testwtbs | 8 +++++++-
2 files changed, 33 insertions(+), 3 deletions(-)
diff --git a/testbot/src/reporttest/report.template b/testbot/src/reporttest/report.template
index 8ff6e14..da4ce50 100644
--- a/testbot/src/reporttest/report.template
+++ b/testbot/src/reporttest/report.template
@@ -320,7 +320,22 @@ advpack:install start dlls/advpack/tests/install.c -
advpack:install:07b0 done (-1073741819) in 0s
stub amstream:amstream
-stub apphelp:apphelp
+
+apphelp:apphelp start dlls/apphelp/tests/apphelp.c -
+----- WTBS Failure propagation from child processes
+----- A test unit with a subprocess and failed, todo and skipped tests in the
+----- child process.
+----- Expected assessement: 1 todo, 1 skip, 3 failures
+----- (2 failures + the non-zero child process exit code)
+apphelp.c:40: Test failed: A failure in the child process
+apphelp.c:41: Test succeeded inside todo block: Success in the child process
+apphelp.c:42: Test marked todo: Fixme in the child process
+apphelp.c:43: Tests skipped: Skipped in the child process
+4321:apphelp: 116 tests executed (1 marked as todo, 2 failures), 1 skipped.
+timer:44: 2 failures in child process
+0c9c:apphelp: 116 tests executed (0 marked as todo, 3 failures), 0 skipped.
+apphelp:apphelp:0c9c done (3) in 0s
+
stub atl:atl_ax
stub atl:module
@@ -522,7 +537,16 @@ comctl32:tab start dlls/comctl32/tests/tab.c -
Unhandled exception: page fault on write access to 0x00000000 in 32-bit code (0x0054376d).
comctl32:tab:07b0 done (-1073741819) in 0s
-stub comctl32:taskdialog
+comctl32:taskdialog start dlls/comctl32/tests/taskdialog.c -
+----- WTBS Crash in a child process
+----- A test unit with a proper subprocess crash reported by the framework
+----- Ignore the wine/test.h vs. winedbg difference here. What matters is the
+----- "in child process" line. See also comctl32:rebar.
+----- Expected assessement: 1 failure
+1234:taskdialog: unhandled exception c0000005 at 0040167C
+taskdialog:33: unhandled exception c0000005 in child process 1234
+07b0:taskdialog: 3 tests executed (0 marked as todo, 1 failures), 0 skipped.
+comctl32:taskdialog:07b0 done (1) in 0s
comctl32:toolbar start dlls/comctl32/tests/toolbar.c -
----- A test unit crash with no unhandled exception line
diff --git a/testbot/src/reporttest/report.testwtbs b/testbot/src/reporttest/report.testwtbs
index b444b69..64057bc 100644
--- a/testbot/src/reporttest/report.testwtbs
+++ b/testbot/src/reporttest/report.testwtbs
@@ -13,7 +13,7 @@ with:
----- TestWTBS -----
-p tests.TestFailures 41
+p tests.TestFailures 45
p build.HasTask 0
a wine.log.GrepV ^Applying patch
@@ -32,6 +32,10 @@ g 0 tests.report.advpack
n 0 files.c:20: Test failed: A failure in the main process
n 0 07b0:install: unhandled exception c0000005 at 0040167C
+g 0 tests.report.apphelp
+n 0 apphelp.c:40: Test failed: A failure in the child process
+n 0 apphelp.c:41: Test succeeded inside todo block: Success in the child process
+
g 0 tests.report.comctl32
n 0 animate: Timeout
n 0 comboex.c:40: Test failed: A failure in the main process
@@ -42,6 +46,8 @@ n 0 1234:subclass: unhandled exception c0000005 at 0040167C
n 0 Do not cut syslink.c:40: Test failed: Something wrong
n 0 Do not cut syslink.c:41: Test succeeded inside todo block: Something right!
n 0 Unhandled exception: page fault on write access to 0x00000000 in 32-bit code (0x0054376d).
+n 0 1234:taskdialog: unhandled exception c0000005 at 0040167C
+n 0 taskdialog:471: unhandled exception c0000005 in child process 1234
n 0 driver.c:40: Test failed: Something wrong
n 0 driver.c:41: Test succeeded inside todo block: Something right!
Module: tools
Branch: master
Commit: 45339484508126df9c1d5c9e546d5dbc0a7ddda8
URL: https://source.winehq.org/git/tools.git/?a=commit;h=45339484508126df9c1d5c9…
Author: Francois Gouget <fgouget(a)codeweavers.com>
Date: Thu Feb 11 13:57:21 2021 +0100
testbot/web: Speed up the main index page.
In order to present the per-job failures tally, the main index needs
to go through the tasks of every job except for the pretty rare
queued jobs. But doing so one job at a time results in many SQL
queries which is inefficient. So do it all at once and store the
results in a hash for later use in GenerateDataCell().
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
testbot/web/index.pl | 38 +++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)
diff --git a/testbot/web/index.pl b/testbot/web/index.pl
index 2486229..c88adfc 100644
--- a/testbot/web/index.pl
+++ b/testbot/web/index.pl
@@ -124,30 +124,17 @@ sub GenerateDataCell($$$$)
my $HTMLStatus = $HTMLChunks{$Status} || $Status;
if ($Status eq "completed" || $Status eq "boterror" || $Status eq "canceled")
{
- my $Failures = 0;
- my $HasTestResult;
- foreach my $Step (@{$Item->Steps->GetItems()})
- {
- foreach my $Task (@{$Step->Tasks->GetItems()})
- {
- my $TaskFailures = $Task->TestFailures;
- if (defined $TaskFailures)
- {
- $HasTestResult = 1;
- $Failures += $TaskFailures;
- }
- }
- }
- if (!$HasTestResult)
+ my $JobInfo = $self->{JobsInfo}->{$Item->Id};
+ if (!exists $JobInfo->{TestFailures})
{
print $HTMLStatus;
}
else
{
- $HTMLStatus = $Item->Status eq "completed" ? "" : "$HTMLStatus - ";
- my $class = $Failures ? "testfail" : "success";
- my $s = $Failures == 1 ? "" : "s";
- print "$HTMLStatus<span class='$class'>$Failures test failure$s</span>";
+ $HTMLStatus = $Status eq "completed" ? "" : "$HTMLStatus - ";
+ my $class = $JobInfo->{TestFailures} ? "testfail" : "success";
+ my $s = $JobInfo->{TestFailures} == 1 ? "" : "s";
+ print "$HTMLStatus<span class='$class'>$JobInfo->{TestFailures} test failure$s</span>";
}
}
else
@@ -233,6 +220,7 @@ use WineTestBot::Config;
use WineTestBot::Engine::Notify;
use WineTestBot::Jobs;
use WineTestBot::Log;
+use WineTestBot::Tasks;
use WineTestBot::VMs;
@@ -318,6 +306,18 @@ sub GenerateBody($)
print "<h2><a name='jobs'></a>Jobs</h2>\n";
my $Jobs = CreateJobs();
my $JobsCollectionBlock = new JobStatusBlock($Jobs, $self);
+
+ # We need to collect information about the tasks of all jobs except the
+ # pretty rare queued jobs. But doing so one job at a time is inefficient so
+ # do it all at once now and store the results in ...->{JobsInfo}.
+ my $Tasks = CreateTasks();
+ foreach my $Task (@{$Tasks->GetItems()})
+ {
+ my $JobInfo = ($JobsCollectionBlock->{JobsInfo}->{$Task->JobId} ||= {});
+ my $TestFailures = $Task->TestFailures;
+ $JobInfo->{TestFailures} += $TestFailures if (defined $TestFailures);
+ }
+
$JobsCollectionBlock->GenerateList();
print "<h2><a name='vms'></a>VMs</h2>\n";