Wine-Devel
By thread
wine-devel@list.winehq.org
By month
Messages by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2002 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2001 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
December 2017
- 60 participants
- 748 messages
[PATCH] winhttp/tests: Remove redundant comparison.
by Andrey Gusev
Signed-off-by: Andrey Gusev <andrey.goosev(a)gmail.com>
---
dlls/winhttp/tests/winhttp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/winhttp/tests/winhttp.c b/dlls/winhttp/tests/winhttp.c
index 4fc9c2cc28..e06661c31e 100644
--- a/dlls/winhttp/tests/winhttp.c
+++ b/dlls/winhttp/tests/winhttp.c
@@ -996,7 +996,7 @@ static void test_secure_connection(void)
protocols = WINHTTP_FLAG_SECURE_PROTOCOL_TLS1_2;
ret = WinHttpSetOption(ses, WINHTTP_OPTION_SECURE_PROTOCOLS, &protocols, sizeof(protocols));
err = GetLastError();
- ok(ret || (!ret && err == ERROR_INVALID_PARAMETER) /* < win7 */, "failed to set protocols %u\n", err);
+ ok(ret || err == ERROR_INVALID_PARAMETER /* < win7 */, "failed to set protocols %u\n", err);
con = WinHttpConnect(ses, test_winehq, 443, 0);
ok(con != NULL, "failed to open a connection %u\n", GetLastError());
--
2.13.6
Dec. 26, 2017
[PATCH 2/2] testbot/web: Show failed Tasks on the Activity page.
by Francois Gouget
This helps identify transient errors, TestBot errors, or why a task is
being re-run.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/lib/WineTestBot/Activity.pm | 57 ++++++++++++++++++++++++++++++++++++-
testbot/web/Activity.pl | 41 ++++++++++++++++++++++----
testbot/web/WineTestBot.css | 4 +++
3 files changed, 95 insertions(+), 7 deletions(-)
diff --git a/testbot/lib/WineTestBot/Activity.pm b/testbot/lib/WineTestBot/Activity.pm
index 31930ed2..d66109c0 100644
--- a/testbot/lib/WineTestBot/Activity.pm
+++ b/testbot/lib/WineTestBot/Activity.pm
@@ -66,6 +66,18 @@ describing the TestBot activity. The structure is as follows:
...
},
},
+ resultvms => {
+ <VMName1> => {
+ vm => <VMObject>,
+ result => <VMResult>,
+ tries => <Tries>,
+ maxtries => <MaxTries>,
+ details => <ResultDetails>,
+ },
+ <VMName2> => {
+ ...
+ },
+ },
},
<GroupNo2> => {
...
@@ -134,11 +146,24 @@ sub GetActivity($)
$VMStatus->{status} = $Status;
$VMStatus->{rows} = 1;
+ $VMStatus->{result} = "";
if ($Status eq "running")
{
$VMStatus->{job} = $Jobs->GetItem($Extra[0]);
$VMStatus->{step} = $VMStatus->{job}->Steps->GetItem($Extra[1]) if ($VMStatus->{job});
$VMStatus->{task} = $VMStatus->{step}->Tasks->GetItem($Extra[2]) if ($VMStatus->{step});
+ if ($VMStatus->{task})
+ {
+ if ($VMStatus->{task}->Status =~ /^(?:badpatch|badbuild|boterror)$/)
+ {
+ $VMStatus->{result} = $VMStatus->{task}->Status;
+ }
+ elsif ($VMStatus->{task}->Status eq "completed" and
+ $VMStatus->{task}->TestFailures)
+ {
+ $VMStatus->{result} = "failed";
+ }
+ }
}
elsif (@Extra)
{
@@ -148,6 +173,24 @@ sub GetActivity($)
$VMStatus->{details} = join(" ", @Extra);
}
}
+ elsif ($Record->Type eq "vmresult")
+ {
+ my ($RecordName, $RecordHost) = split / /, $Record->Name;
+ next if (!$VMs->ItemExists($RecordName));
+
+ my $ResultVMs = ( $Group->{resultvms} ||= {} );
+ my $VMResult = ( $ResultVMs->{$RecordName} ||= {} );
+
+ $VMResult->{host} = $RecordHost;
+ my ($Result, @Extras) = split / /, $Record->Value;
+ $VMResult->{result} = $Result;
+ if (@Extras >= 2 and $Extras[0] =~ /^\d+$/ and $Extras[1] =~ /^\d+$/)
+ {
+ $VMResult->{tries} = shift @Extras;
+ $VMResult->{maxtries} = shift @Extras;
+ }
+ $VMResult->{details} = join(" ", @Extras);
+ }
}
### Fill the holes in the table, compute end times, etc.
@@ -157,7 +200,8 @@ sub GetActivity($)
{
my $Group = $Activity->{$RecordGroup->Id};
my $StatusVMs = $Group->{statusvms};
- next if (!$StatusVMs);
+ my $ResultVMs = $Group->{resultvms};
+ next if (!$StatusVMs and !$ResultVMs);
if ($LastGroup)
{
$LastGroup->{end} = $Group->{start};
@@ -175,6 +219,17 @@ sub GetActivity($)
{
my $LastVMStatus = $LastStatusVMs{$VM->Name} ? $LastStatusVMs{$VM->Name}->{$VM->Name} : undef;
+ my $VMResult = $ResultVMs->{$VM->Name};
+ if ($VMResult and $LastVMStatus and $LastVMStatus->{status} ne "engine")
+ {
+ # Transfer the result to the relevant status object
+ $LastVMStatus->{result} = $VMResult->{result};
+ $LastVMStatus->{details} = $VMResult->{details};
+ $LastVMStatus->{tries} = $VMResult->{tries};
+ $LastVMStatus->{maxtries} = $VMResult->{maxtries};
+ }
+ next if (!$StatusVMs);
+
my $VMStatus = $StatusVMs->{$VM->Name};
if ($VMStatus)
{
diff --git a/testbot/web/Activity.pl b/testbot/web/Activity.pl
index 64a752b5..5a730df4 100644
--- a/testbot/web/Activity.pl
+++ b/testbot/web/Activity.pl
@@ -160,11 +160,26 @@ EOF
my $VMStatus = $Group->{statusvms}->{$VM->Name};
next if ($VMStatus->{merged});
- # Add borders to separate VM hosts and indicate anomalies.
+ # Add borders to separate VM hosts and indicate various anomalies.
print "<td class='Record Record-$VMStatus->{status}";
- my $Host = $VM->GetHost();
- print " Record-left" if ($Col > 0 and $SortedVMs[$Col-1]->GetHost() ne $Host);
- print " Record-right" if ($Col+1 < @SortedVMs and $SortedVMs[$Col+1]->GetHost() ne $Host);
+ if ($VMStatus->{result} eq "timeout")
+ {
+ print " Record-timeout";
+ }
+ elsif ($VMStatus->{result} eq "boterror")
+ {
+ print " Record-boterror";
+ }
+ elsif ($VMStatus->{result} eq "error")
+ {
+ print " Record-error";
+ }
+ else
+ {
+ my $Host = $VM->GetHost();
+ print " Record-left" if ($Col > 0 and $SortedVMs[$Col-1]->GetHost() ne $Host);
+ print " Record-right" if ($Col+1 < @SortedVMs and $SortedVMs[$Col+1]->GetHost() ne $Host);
+ }
print " Record-miss" if ($VMStatus->{mispredict});
print "'";
print " rowspan='$VMStatus->{rows}'" if ($VMStatus->{rows} > 1);
@@ -215,6 +230,17 @@ EOF
$Label = "<span class='RecordHost'>(on $Host)</span><br>$Label";
}
print "$Label ", _GetHtmlDuration($VMStatus->{end} - $VMStatus->{start});
+
+ my $Result = "";
+ if ($VMStatus->{status} ne "dirty")
+ {
+ $Result = $VMStatus->{result} if ($VMStatus->{result});
+ $Result .= " $VMStatus->{tries}/$VMStatus->{maxtries}" if ($VMStatus->{tries});
+ $Result .= ": $VMStatus->{details}" if ($VMStatus->{details});
+ $Result =~ s/^: //;
+ }
+ print "<br><span class='RecordResult'>$Result</span>" if ($Result);
+
print "</td>\n";
}
print "</tr>\n";
@@ -238,8 +264,11 @@ sub GenerateFooter($)
print "<span class='Record-running'>running</span> a task (in which case it links to it),<br>\n";
print "<span class='Record-dirty'>dirty</span> while the server is powering off the VM after a task or while it assesses its state on startup.</p>\n";
- print "<p>If no time is indicated then the VM remained in that state for less than 2 seconds. The tasks column indicates the number of runnable / queued tasks before that scheduling round. A long horizontal bar indicates the TestBot server was restarted.</p>\n";
- print "<p>This <span class='Record Record-idle Record-miss'>border</span> indicates that the server threw away the VM's current state without using it.</p>\n";
+ print "<p>If no time is indicated then the VM remained in that state for less than 2 seconds. The tasks column indicates the number of runnable / queued tasks before that scheduling round. A long horizontal bar indicates the TestBot server was restarted. </p>\n";
+ print "<p>This <span class='Record Record-running Record-timeout'>border</span> indicates that the task timed out,<br>\n";
+ print "this <span class='Record Record-running Record-error'>border</span> denotes a transient (network?) error so the task will be re-run,<br>\n";
+ print "and this <span class='Record Record-running Record-boterror'>border</span> indicates a TestBot error.<br>\n";
+ print "Finally this <span class='Record Record-idle Record-miss'>border</span> indicates that the server threw away the VM's current state without using it.</p>\n";
print "<p>The VM could also be <span class='Record-offline'>offline</span> due to a temporary issue,<br>\n";
print "or until the administrator can look at it for <span class='Record-maintenance'>maintenance</span>,<br>\n";
diff --git a/testbot/web/WineTestBot.css b/testbot/web/WineTestBot.css
index 55de9a33..4afbe31c 100644
--- a/testbot/web/WineTestBot.css
+++ b/testbot/web/WineTestBot.css
@@ -348,6 +348,7 @@ td.Record { text-align: center; }
.RecordHost { font-size: smaller; }
.RecordJob { font-size: smaller; }
.RecordDuration { }
+.RecordResult { font-size: smaller; font-style: italic; }
.Record-start { }
.Record-off { color: #c0c0c0; }
@@ -371,4 +372,7 @@ td.Record { text-align: center; }
/* Special borders */
.Record.Record-left { border-left: thin solid #601919; }
.Record.Record-right { border-right: thin solid #601919; }
+.Record.Record-boterror { border-left: thick solid red; border-right: thick solid red; }
+.Record.Record-error { border-left: thick solid #990000; border-right: thick solid #990000; }
+.Record.Record-timeout { border-left: thick solid blue; border-right: thick solid blue; }
.Record.Record-miss { border-top: thick dashed #ff6600; }
--
2.15.1
Dec. 26, 2017
[PATCH 1/2] testbot: Add history records for mutable task results.
by Francois Gouget
When a task fails due to a transient error it is re-run and the fact
that a transient error happened cannot be recovered from the final Task
object.
Similarly the final Task object does not clearly identify timeouts.
Furthermore all one can recover from the VM status history is that a
Task was run more than once but not the reason why.
So save abnormal task termination information in the history record.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
testbot/bin/WineRunBuild.pl | 20 ++++++++++++++++----
testbot/bin/WineRunReconfig.pl | 20 ++++++++++++++++----
testbot/bin/WineRunTask.pl | 19 ++++++++++++++++---
testbot/lib/WineTestBot/VMs.pm | 29 +++++++++++++++++++++++++++++
4 files changed, 77 insertions(+), 11 deletions(-)
diff --git a/testbot/bin/WineRunBuild.pl b/testbot/bin/WineRunBuild.pl
index b91d594b..e4295c8e 100755
--- a/testbot/bin/WineRunBuild.pl
+++ b/testbot/bin/WineRunBuild.pl
@@ -45,6 +45,7 @@ use WineTestBot::Config;
use WineTestBot::Jobs;
use WineTestBot::VMs;
use WineTestBot::Log;
+use WineTestBot::RecordGroups;
use WineTestBot::Engine::Notify;
@@ -192,10 +193,13 @@ sub LogTaskError($)
umask($OldUMask);
}
-sub WrapUpAndExit($;$)
+sub WrapUpAndExit($;$$)
{
- my ($Status, $Retry) = @_;
+ my ($Status, $Retry, $Timeout) = @_;
my $NewVMStatus = $Status eq 'queued' ? 'offline' : 'dirty';
+ my $VMResult = $Status eq "boterror" ? "boterror" :
+ $Status eq "queued" ? "error" :
+ $Timeout ? "timeout" : "";
my $TestFailures;
my $Tries = $Task->TestFailures || 0;
@@ -219,6 +223,13 @@ sub WrapUpAndExit($;$)
LogTaskError("The previous $Tries run(s) terminated abnormally\n");
}
+ # Record result details that may be lost or overwritten by a later run
+ if ($VMResult)
+ {
+ $VMResult .= " $Tries $MaxTaskTries" if ($Retry);
+ $VM->RecordResult(undef, $VMResult);
+ }
+
# Update the Task and Job
$Task->Status($Status);
$Task->TestFailures($TestFailures);
@@ -373,7 +384,7 @@ if (!$Pid)
# log before giving up
#
-my ($NewStatus, $ErrMessage, $TAError);
+my ($NewStatus, $ErrMessage, $TAError, $TaskTimedOut);
Debug(Elapsed($Start), " Waiting for the script (", $Task->Timeout, "s timeout)\n");
if (!defined $TA->Wait($Pid, $Task->Timeout, 60))
{
@@ -382,6 +393,7 @@ if (!defined $TA->Wait($Pid, $Task->Timeout, 60))
{
$ErrMessage = "The build timed out\n";
$NewStatus = "badbuild";
+ $TaskTimedOut = 1;
}
else
{
@@ -480,4 +492,4 @@ $TA->Disconnect();
# Wrap up
#
-WrapUpAndExit($NewStatus);
+WrapUpAndExit($NewStatus, undef, $TaskTimedOut);
diff --git a/testbot/bin/WineRunReconfig.pl b/testbot/bin/WineRunReconfig.pl
index ff99fb7c..4eefa171 100755
--- a/testbot/bin/WineRunReconfig.pl
+++ b/testbot/bin/WineRunReconfig.pl
@@ -45,6 +45,7 @@ use WineTestBot::Config;
use WineTestBot::Jobs;
use WineTestBot::VMs;
use WineTestBot::Log;
+use WineTestBot::RecordGroups;
use WineTestBot::Engine::Notify;
@@ -192,11 +193,14 @@ sub LogTaskError($)
umask($OldUMask);
}
-sub WrapUpAndExit($;$)
+sub WrapUpAndExit($;$$)
{
- my ($Status, $Retry) = @_;
+ my ($Status, $Retry, $Timeout) = @_;
my $NewVMStatus = $Status eq 'queued' ? 'offline' :
$Status eq 'completed' ? 'idle' : 'dirty';
+ my $VMResult = $Status eq "boterror" ? "boterror" :
+ $Status eq "queued" ? "error" :
+ $Timeout ? "timeout" : "";
my $TestFailures;
my $Tries = $Task->TestFailures || 0;
@@ -220,6 +224,13 @@ sub WrapUpAndExit($;$)
LogTaskError("The previous $Tries run(s) terminated abnormally\n");
}
+ # Record result details that may be lost or overwritten by a later run
+ if ($VMResult)
+ {
+ $VMResult .= " $Tries $MaxTaskTries" if ($Retry);
+ $VM->RecordResult(undef, $VMResult);
+ }
+
# Update the Task and Job
$Task->Status($Status);
$Task->TestFailures($TestFailures);
@@ -338,7 +349,7 @@ if (!$Pid)
# log before giving up
#
-my ($NewStatus, $ErrMessage, $TAError);
+my ($NewStatus, $ErrMessage, $TAError, $TaskTimedOut);
Debug(Elapsed($Start), " Waiting for the script (", $Task->Timeout, "s timeout)\n");
if (!defined $TA->Wait($Pid, $Task->Timeout, 60))
{
@@ -347,6 +358,7 @@ if (!defined $TA->Wait($Pid, $Task->Timeout, 60))
{
$ErrMessage = "The build timed out\n";
$NewStatus = "badbuild";
+ $TaskTimedOut = 1;
}
else
{
@@ -470,4 +482,4 @@ if ($NewStatus eq 'completed')
# Wrap up
#
-WrapUpAndExit($NewStatus);
+WrapUpAndExit($NewStatus, undef, $TaskTimedOut);
diff --git a/testbot/bin/WineRunTask.pl b/testbot/bin/WineRunTask.pl
index 3807a182..65faf725 100755
--- a/testbot/bin/WineRunTask.pl
+++ b/testbot/bin/WineRunTask.pl
@@ -44,6 +44,7 @@ use WineTestBot::Config;
use WineTestBot::Jobs;
use WineTestBot::VMs;
use WineTestBot::Log;
+use WineTestBot::RecordGroups;
use WineTestBot::Engine::Notify;
@@ -219,10 +220,13 @@ sub LogTaskError($)
umask($OldUMask);
}
-sub WrapUpAndExit($;$$)
+sub WrapUpAndExit($;$$$)
{
- my ($Status, $TestFailures, $Retry) = @_;
+ my ($Status, $TestFailures, $Retry, $Timeout) = @_;
my $NewVMStatus = $Status eq 'queued' ? 'offline' : 'dirty';
+ my $VMResult = $Status eq "boterror" ? "boterror" :
+ $Status eq "queued" ? "error" :
+ $Timeout ? "timeout" : "";
Debug(Elapsed($Start), " Taking a screenshot\n");
TakeScreenshot($VM, $FullScreenshotFileName);
@@ -248,6 +252,13 @@ sub WrapUpAndExit($;$$)
LogTaskError("The previous $Tries run(s) terminated abnormally\n");
}
+ # Record result details that may be lost or overwritten by a later run
+ if ($VMResult)
+ {
+ $VMResult .= " $Tries $MaxTaskTries" if ($Retry);
+ $VM->RecordResult(undef, $VMResult);
+ }
+
# Update the Task and Job
$Task->Status($Status);
$Task->TestFailures($TestFailures);
@@ -489,6 +500,7 @@ if (!defined $TA->Wait($Pid, $Timeout, $Keepalive))
}
}
+my $TimedOut;
Debug(Elapsed($Start), " Retrieving the report file to '$FullLogFileName'\n");
if ($TA->GetFile($RptFileName, $FullLogFileName))
{
@@ -712,6 +724,7 @@ if ($TA->GetFile($RptFileName, $FullLogFileName))
# so record the failure but don't add an error message.
$LogFailures++;
$CurrentIsBroken = 1;
+ $TimedOut = ($Step->Type ne "suite");
}
elsif ((!$Pid and !%CurrentPids) or
($Pid and !$CurrentPids{$Pid} and !$CurrentPids{0}))
@@ -767,4 +780,4 @@ FatalTAError(undef, $TAError, $PossibleCrash) if (defined $TAError);
# Wrap up
#
-WrapUpAndExit($NewStatus, $TaskFailures);
+WrapUpAndExit($NewStatus, $TaskFailures, undef, $TaskTimedOut || $TimedOut);
diff --git a/testbot/lib/WineTestBot/VMs.pm b/testbot/lib/WineTestBot/VMs.pm
index 961be52f..2ba6b4b5 100644
--- a/testbot/lib/WineTestBot/VMs.pm
+++ b/testbot/lib/WineTestBot/VMs.pm
@@ -566,6 +566,35 @@ sub RecordStatus($$;$)
}
}
+=pod
+=over 12
+
+=item C<RecordStatus()>
+
+Adds a Record of the specified VM process result.
+
+Also resets the last known VM status so a new one will be recorded even if
+it matches the current one, for instance if a new revert is started after the
+first one failed.
+
+=back
+=cut
+
+sub RecordResult($$$)
+{
+ my ($self, $Records, $Result) = @_;
+
+ if ($Records)
+ {
+ $Records->AddRecord("vmresult", $self->GetRecordName(), $Result);
+ }
+ else
+ {
+ SaveRecord("vmresult", $self->GetRecordName(), $Result);
+ }
+ delete $_VMStatuses{$self->Name};
+}
+
package WineTestBot::VMs;
--
2.15.1
Dec. 26, 2017
[PATCH 3/3] msvcrt: Add _get_osver.
by Gijs Vermeulen
Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com>
---
dlls/msvcr80/msvcr80.spec | 2 +-
dlls/msvcrt/data.c | 7 +++++++
dlls/msvcrt/msvcrt.spec | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec
index 8b34047514..f614eb4fbd 100644
--- a/dlls/msvcr80/msvcr80.spec
+++ b/dlls/msvcr80/msvcr80.spec
@@ -548,7 +548,7 @@
@ cdecl _get_invalid_parameter_handler()
@ cdecl _get_osfhandle(long) MSVCRT__get_osfhandle
@ cdecl _get_osplatform(ptr) MSVCRT__get_osplatform
-@ stub _get_osver
+@ cdecl _get_osver(ptr) _get_osver
@ cdecl _get_output_format() MSVCRT__get_output_format
@ cdecl _get_pgmptr(ptr)
@ cdecl _get_printf_count_output() MSVCRT__get_printf_count_output
diff --git a/dlls/msvcrt/data.c b/dlls/msvcrt/data.c
index 4a64e4afbb..5ab85d053e 100644
--- a/dlls/msvcrt/data.c
+++ b/dlls/msvcrt/data.c
@@ -760,3 +760,10 @@ int CDECL _get_winminor(int* value)
*value = MSVCRT__winminor;
return 0;
}
+
+int CDECL _get_osver(int* value)
+{
+ if (!MSVCRT_CHECK_PMT(value != NULL)) return MSVCRT_EINVAL;
+ *value = MSVCRT__osver;
+ return 0;
+}
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index 3ab1329582..5406900e8d 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -508,7 +508,7 @@
@ cdecl _get_heap_handle()
@ cdecl _get_osfhandle(long) MSVCRT__get_osfhandle
@ cdecl _get_osplatform(ptr) MSVCRT__get_osplatform
-# stub _get_osver(ptr)
+@ cdecl _get_osver(ptr) _get_osver
@ cdecl _get_output_format() MSVCRT__get_output_format
@ cdecl _get_pgmptr(ptr)
@ cdecl _get_sbh_threshold()
--
2.14.3 (Apple Git-98)
Dec. 25, 2017
[PATCH 2/3] msvcrt: Add _get_winminor.
by Gijs Vermeulen
Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com>
---
dlls/msvcr80/msvcr80.spec | 2 +-
dlls/msvcrt/data.c | 7 +++++++
dlls/msvcrt/msvcrt.spec | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec
index 55738a00bf..8b34047514 100644
--- a/dlls/msvcr80/msvcr80.spec
+++ b/dlls/msvcr80/msvcr80.spec
@@ -559,7 +559,7 @@
@ cdecl _get_tzname(ptr str long long) MSVCRT__get_tzname
@ cdecl _get_unexpected() MSVCRT__get_unexpected
@ cdecl _get_winmajor(ptr) _get_winmajor
-@ stub _get_winminor
+@ cdecl _get_winminor(ptr) _get_winminor
@ stub _get_winver
@ cdecl _get_wpgmptr(ptr)
@ cdecl _getc_nolock(ptr) MSVCRT__fgetc_nolock
diff --git a/dlls/msvcrt/data.c b/dlls/msvcrt/data.c
index 39f64539c6..4a64e4afbb 100644
--- a/dlls/msvcrt/data.c
+++ b/dlls/msvcrt/data.c
@@ -753,3 +753,10 @@ int CDECL _get_winmajor(int* value)
*value = MSVCRT__winmajor;
return 0;
}
+
+int CDECL _get_winminor(int* value)
+{
+ if (!MSVCRT_CHECK_PMT(value != NULL)) return MSVCRT_EINVAL;
+ *value = MSVCRT__winminor;
+ return 0;
+}
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index 8a88a51fcf..3ab1329582 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -514,7 +514,7 @@
@ cdecl _get_sbh_threshold()
# stub _get_wenviron(ptr)
@ cdecl _get_winmajor(ptr) _get_winmajor
-# stub _get_winminor(ptr)
+@ cdecl _get_winminor(ptr) _get_winminor
# stub _get_winver(ptr)
@ cdecl _get_wpgmptr(ptr)
@ cdecl _get_terminate() MSVCRT__get_terminate
--
2.14.3 (Apple Git-98)
Dec. 25, 2017
[PATCH 1/3] msvcrt: Add _get_winmajor.
by Gijs Vermeulen
Signed-off-by: Gijs Vermeulen <gijsvrm(a)gmail.com>
---
This patchset fixes the Zoo Tycoon 2 demo. Reported here: https://bugs.winehq.org/show_bug.cgi?id=26851#c14
dlls/msvcr80/msvcr80.spec | 2 +-
dlls/msvcrt/data.c | 7 +++++++
dlls/msvcrt/msvcrt.spec | 2 +-
3 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/dlls/msvcr80/msvcr80.spec b/dlls/msvcr80/msvcr80.spec
index dd80131464..55738a00bf 100644
--- a/dlls/msvcr80/msvcr80.spec
+++ b/dlls/msvcr80/msvcr80.spec
@@ -558,7 +558,7 @@
@ cdecl _get_timezone(ptr)
@ cdecl _get_tzname(ptr str long long) MSVCRT__get_tzname
@ cdecl _get_unexpected() MSVCRT__get_unexpected
-@ stub _get_winmajor
+@ cdecl _get_winmajor(ptr) _get_winmajor
@ stub _get_winminor
@ stub _get_winver
@ cdecl _get_wpgmptr(ptr)
diff --git a/dlls/msvcrt/data.c b/dlls/msvcrt/data.c
index 5de80f419a..39f64539c6 100644
--- a/dlls/msvcrt/data.c
+++ b/dlls/msvcrt/data.c
@@ -746,3 +746,10 @@ MSVCRT_wchar_t* CDECL _get_wide_winmain_command_line(void)
return wide_command_line = s;
}
+
+int CDECL _get_winmajor(int* value)
+{
+ if (!MSVCRT_CHECK_PMT(value != NULL)) return MSVCRT_EINVAL;
+ *value = MSVCRT__winmajor;
+ return 0;
+}
diff --git a/dlls/msvcrt/msvcrt.spec b/dlls/msvcrt/msvcrt.spec
index 2f20699d3b..8a88a51fcf 100644
--- a/dlls/msvcrt/msvcrt.spec
+++ b/dlls/msvcrt/msvcrt.spec
@@ -513,7 +513,7 @@
@ cdecl _get_pgmptr(ptr)
@ cdecl _get_sbh_threshold()
# stub _get_wenviron(ptr)
-# stub _get_winmajor(ptr)
+@ cdecl _get_winmajor(ptr) _get_winmajor
# stub _get_winminor(ptr)
# stub _get_winver(ptr)
@ cdecl _get_wpgmptr(ptr)
--
2.14.3 (Apple Git-98)
Dec. 25, 2017
[PATCH] services: Avoid buffer overruns in test_runner and START_TEST.
by Gerald Pfeifer
A few days ago my GCC-based builder started picking this up, and
looking into the code there is potential for an actual buffer overrun,
since service_name is included into named_pipe_name together with some
constants, and both originally were the same size.
This fixes it by increasing the size of the second buffer which also
addresses the following warnings issued by GCC:
service.c: In function ‘test_runner’:
service.c:541:46: warning: ‘_pipe’ directive writing 5 bytes into a region
of size between 1 and 100 [-Wformat-overflow=]
sprintf(named_pipe_name, "\\\\.\\pipe\\%s_pipe", service_name);
^~~~~
service.c:541:5: note: ‘sprintf’ output between 15 and 114 bytes into a
destination of size ...
sprintf(named_pipe_name, "\\\\.\\pipe\\%s_pipe", service_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
service.c: In function ‘func_service’:
service.c:593:50: warning: ‘_pipe’ directive writing 5 bytes into a region
of size between 1 and 100 [-Wformat-overflow=]
sprintf(named_pipe_name, "\\\\.\\pipe\\%s_pipe", service_name);
^~~~~
service.c:593:9: note: ‘sprintf’ output between 15 and 114 bytes into a
destination of size ...
sprintf(named_pipe_name, "\\\\.\\pipe\\%s_pipe", service_name);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Gerald
Signed-off-by: Gerald Pfeifer <gerald(a)pfeifer.com>
---
programs/services/tests/service.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/programs/services/tests/service.c b/programs/services/tests/service.c
index 98419497a5..47adb1a397 100644
--- a/programs/services/tests/service.c
+++ b/programs/services/tests/service.c
@@ -29,7 +29,8 @@
static SERVICE_STATUS_HANDLE (WINAPI *pRegisterServiceCtrlHandlerExA)(LPCSTR,LPHANDLER_FUNCTION_EX,LPVOID);
static HANDLE pipe_handle = INVALID_HANDLE_VALUE;
-static char service_name[100], named_pipe_name[100];
+static char service_name[100],
+ named_pipe_name[114]; /* will include service_name later on */
static SERVICE_STATUS_HANDLE service_handle;
/* Service process global variables */
--
2.15.1
Dec. 25, 2017
[PATCH] shell32: Fix SHGetFolderPathAndSubDir() trace message
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/shell32/shellpath.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/shell32/shellpath.c b/dlls/shell32/shellpath.c
index 4f1cdc01b2..551fec7951 100644
--- a/dlls/shell32/shellpath.c
+++ b/dlls/shell32/shellpath.c
@@ -3935,7 +3935,8 @@ HRESULT WINAPI SHGetFolderPathAndSubDirA(
HRESULT hr = S_OK;
LPWSTR pszSubPathW = NULL;
LPWSTR pszPathW = NULL;
- TRACE("%08x,%08x,%s\n",nFolder, dwFlags, debugstr_w(pszSubPathW));
+
+ TRACE("%p,%#x,%p,%#x,%s,%p\n", hwndOwner, nFolder, hToken, dwFlags, debugstr_a(pszSubPath), pszPath);
if(pszPath) {
pszPathW = HeapAlloc(GetProcessHeap(), 0, MAX_PATH * sizeof(WCHAR));
@@ -3988,7 +3989,7 @@ HRESULT WINAPI SHGetFolderPathAndSubDirW(
CSIDL_Type type;
int ret;
- TRACE("%p,%p,nFolder=0x%04x,%s\n", hwndOwner,pszPath,nFolder,debugstr_w(pszSubPath));
+ TRACE("%p,%#x,%p,%#x,%s,%p\n", hwndOwner, nFolder, hToken, dwFlags, debugstr_w(pszSubPath), pszPath);
/* Windows always NULL-terminates the resulting path regardless of success
* or failure, so do so first
--
2.15.1
Dec. 23, 2017
[PATCH] usp10/tests: Add missing return value tests (Coverity)
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/usp10/tests/usp10.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/usp10/tests/usp10.c b/dlls/usp10/tests/usp10.c
index 55bec7f74f..35cdec545b 100644
--- a/dlls/usp10/tests/usp10.c
+++ b/dlls/usp10/tests/usp10.c
@@ -3150,6 +3150,7 @@ static void test_ScriptXtoX(void)
WORD clust = 0;
INT advance = 16;
hr = ScriptXtoCP(iX, 1, 1, &clust, psva, &advance, &sa, &piCP, &piTrailing);
+ ok(hr == S_OK, "ScriptXtoCP() failed, hr %#x.\n", hr);
ok(piCP==0 && piTrailing==1,"%i should return 0(%i) and 1(%i)\n",iX,piCP,piTrailing);
}
for (iX = 9; iX < 16; iX++)
@@ -3157,6 +3158,7 @@ static void test_ScriptXtoX(void)
WORD clust = 0;
INT advance = 16;
hr = ScriptXtoCP(iX, 1, 1, &clust, psva, &advance, &sa, &piCP, &piTrailing);
+ ok(hr == S_OK, "ScriptXtoCP() failed, hr %#x.\n", hr);
ok(piCP==0 && piTrailing==0,"%i should return 0(%i) and 0(%i)\n",iX,piCP,piTrailing);
}
--
2.15.1
Dec. 23, 2017
[PATCH] msxml3/tests: Add missing return value test (Coverity)
by Nikolay Sivov
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com>
---
dlls/msxml3/tests/domdoc.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/dlls/msxml3/tests/domdoc.c b/dlls/msxml3/tests/domdoc.c
index 9a607e3d3c..87a885d082 100644
--- a/dlls/msxml3/tests/domdoc.c
+++ b/dlls/msxml3/tests/domdoc.c
@@ -7467,6 +7467,7 @@ static void test_XSLPattern(void)
ok(hr == S_OK, "query=%s, failed with 0x%08x\n", ptr->query, hr);
len = 0;
hr = IXMLDOMNodeList_get_length(list, &len);
+ ok(hr == S_OK, "Failed to get list length, hr %#x.\n", hr);
if (*ptr->list)
{
ok(len != 0, "query=%s, empty list\n", ptr->query);
--
2.15.1
Dec. 23, 2017