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
June 2018
- 68 participants
- 1149 messages
[PATCH] testbot: Add proper command line options to CheckForWinetestUpdate.pl.
by Francois Gouget
The options make it possible to test a specific job/task creation
without having to way for a new WineTest binary download each time.
Also it is now possible to specify the exact task type to create and
if none is given the script will now handle all of them. This way the
crontab commands don't need to be updated when new task types are
added.
Also the script now prints the error messages to stderr by default to
make it easier to figure things out when running it on the command
line. The --log-only option can be used when that's not desired.
Signed-off-by: Francois Gouget <fgouget(a)codeweavers.com>
---
Note: This requires updating the crontab entries. Typically they can
both be replaced with a single command that will create all the relevant
jobs:
*/10 * * * * $HOME/tools/testbot/bin/CheckForWinetestUpdate.pl --log-only
testbot/bin/CheckForWinetestUpdate.pl | 273 +++++++++++++++++++-------
testbot/doc/INSTALL.txt | 3 +-
2 files changed, 199 insertions(+), 77 deletions(-)
diff --git a/testbot/bin/CheckForWinetestUpdate.pl b/testbot/bin/CheckForWinetestUpdate.pl
index 20eacec63..a79f60c71 100755
--- a/testbot/bin/CheckForWinetestUpdate.pl
+++ b/testbot/bin/CheckForWinetestUpdate.pl
@@ -6,6 +6,7 @@
# runs the full test suite on the standard Windows test VMs.
#
# Copyright 2009 Ge van Geldorp
+# Copyright 2018 Francois Gouget
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -37,6 +38,8 @@ sub BEGIN
unshift @INC, "$::RootDir/lib";
}
}
+my $Name0 = $0;
+$Name0 =~ s+^.*/++;
use File::Basename;
use File::Compare;
@@ -60,11 +63,112 @@ my %WineTestUrls = (
64 => "http://test.winehq.org/builds/winetest64-latest.exe"
);
+my %TaskTypes = (build => 1, base32 => 1, winetest32 => 1, all64 => 1);
+
+
+my $Debug;
+sub Debug(@)
+{
+ print STDERR @_ if ($Debug);
+}
+
+my $LogOnly;
+sub Error(@)
+{
+ print STDERR "$Name0:error: ", @_ if (!$LogOnly);
+ LogMsg @_;
+}
+
+
+=pod
+=over 12
+
+=item C<UpdateWineTest()>
+
+Downloads the latest WineTest executable.
+
+Returns 1 if the executable was updated, 0 if it was not, and -1 if an
+error occurred.
+
+=back
+=cut
+
+sub UpdateWineTest($$)
+{
+ my ($OptCreate, $Bits) = @_;
+
+ my $BitsSuffix = ($Bits == 64 ? "64" : "");
+ my $LatestBaseName = "winetest${BitsSuffix}-latest.exe";
+ my $LatestFileName = "$DataDir/latest/$LatestBaseName";
+ if ($OptCreate)
+ {
+ return (1, $LatestBaseName) if (-r $LatestFileName);
+ Debug("$LatestBaseName is missing\n");
+ }
+
+ # See if the online WineTest executable is newer
+ my $UA = LWP::UserAgent->new();
+ $UA->agent("WineTestBot");
+ my $Request = HTTP::Request->new(GET => $WineTestUrls{$Bits});
+ if (-r $LatestFileName)
+ {
+ my $Since = gmtime((stat $LatestFileName)[9]);
+ $Request->header("If-Modified-Since" => "$Since GMT");
+ }
+ Debug("Checking $WineTestUrls{$Bits}\n");
+ my $Response = $UA->request($Request);
+ if ($Response->code == RC_NOT_MODIFIED)
+ {
+ Debug("$LatestBaseName is already up to date\n");
+ return (0, $LatestBaseName); # Already up to date
+ }
+ if ($Response->code != RC_OK)
+ {
+ Error "Unexpected HTTP response code ", $Response->code, "\n";
+ return (-1, undef);
+ }
+
+ # Download the WineTest executable
+ Debug("Downloading $LatestBaseName\n");
+ umask 002;
+ mkdir "$DataDir/staging";
+ my ($fh, $StagingFileName) = OpenNewFile("$DataDir/staging", "_$LatestBaseName");
+ if (!$fh)
+ {
+ Error "Could not create staging file: $!\n";
+ return (-1, undef);
+ }
+ print $fh $Response->decoded_content();
+ close($fh);
+
+ if (-r $LatestFileName and compare($StagingFileName, $LatestFileName) == 0)
+ {
+ Debug("$LatestBaseName did not change\n");
+ unlink($StagingFileName);
+ return (0, $LatestBaseName); # No change after all
+ }
+
+ # Save the WineTest executable to the latest directory for the next round
+ mkdir "$DataDir/latest";
+ if (!move($StagingFileName, $LatestFileName))
+ {
+ Error "Could not move '$StagingFileName' to '$LatestFileName': $!\n";
+ unlink($StagingFileName);
+ return (-1, undef);
+ }
+ utime time, $Response->last_modified, $LatestFileName;
+
+ return (1, $LatestBaseName);
+}
sub AddJob($$$)
{
my ($BaseJob, $LatestBaseName, $Bits) = @_;
+ my $Remarks = ($Bits == 64 ? "64-bit" : $BaseJob ? "base" : "other");
+ $Remarks = "WineTest: $Remarks VMs";
+ Debug("Creating the '$Remarks' job\n");
+
my $VMs = CreateVMs();
if ($Bits == 64)
{
@@ -84,6 +188,7 @@ sub AddJob($$$)
if ($VMs->GetItemsCount() == 0)
{
# There is nothing to do
+ Debug(" Found no VM\n");
return 1;
}
@@ -97,9 +202,7 @@ sub AddJob($$$)
my $NewJob = $Jobs->Add();
$NewJob->User(GetBatchUser());
$NewJob->Priority($BaseJob && $Bits == 32 ? 8 : 9);
- $NewJob->Remarks("WineTest: " .
- ($Bits == 64 ? "64-bit" : $BaseJob ? "base" : "other") .
- " VMs");
+ $NewJob->Remarks($Remarks);
# Add a step to the job
my $Steps = $NewJob->Steps;
@@ -114,6 +217,7 @@ sub AddJob($$$)
my $Tasks = $NewStep->Tasks;
foreach my $VMKey (@{$VMs->SortKeysBySortOrder($VMs->GetKeys())})
{
+ Debug(" $VMKey\n");
my $Task = $Tasks->Add();
$Task->VM($VMs->GetItem($VMKey));
$Task->Timeout($SuiteTimeout);
@@ -123,7 +227,7 @@ sub AddJob($$$)
my ($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save();
if (defined $ErrMessage)
{
- LogMsg "Failed to save job: $ErrMessage\n";
+ Error "Failed to save job: $ErrMessage\n";
unlink($StagingFileName);
return 0;
}
@@ -133,12 +237,15 @@ sub AddJob($$$)
sub AddReconfigJob()
{
+ my $Remarks = "Update Wine to latest git";
+ Debug("Creating the '$Remarks' job\n");
+
# First create a new job
my $Jobs = CreateJobs();
my $NewJob = $Jobs->Add();
$NewJob->User(GetBatchUser());
$NewJob->Priority(3);
- $NewJob->Remarks("Update Wine to latest git");
+ $NewJob->Remarks($Remarks);
# Add a step to the job
my $Steps = $NewJob->Steps;
@@ -153,6 +260,7 @@ sub AddReconfigJob()
$VMs->AddFilter("Type", ["build"]);
$VMs->AddFilter("Role", ["base"]);
my $BuildVM = ${$VMs->GetItems()}[0];
+ Debug(" ", $BuildVM->GetKey(), "\n");
my $Task = $NewStep->Tasks->Add();
$Task->VM($BuildVM);
$Task->Timeout($ReconfigTimeout);
@@ -161,97 +269,112 @@ sub AddReconfigJob()
my ($ErrKey, $ErrProperty, $ErrMessage) = $Jobs->Save();
if (defined $ErrMessage)
{
- LogMsg "Failed to save reconfig job: $ErrMessage\n";
+ Error "Failed to save reconfig job: $ErrMessage\n";
return 0;
}
}
-my $Bits = $ARGV[0];
-if (!$Bits)
-{
- die "Usage: CheckForWinetestUpdate.pl <bits>";
-}
-if ($Bits =~ m/^(32|64)$/)
+
+#
+# Command line processing
+#
+
+my ($OptCreate, %OptTypes, $Usage);
+while (@ARGV)
{
- $Bits = $1;
+ my $Arg = shift @ARGV;
+ if ($Arg eq "--create")
+ {
+ $OptCreate = 1;
+ }
+ elsif ($TaskTypes{$Arg})
+ {
+ $OptTypes{$Arg} = 1;
+ }
+ elsif ($Arg eq "--debug")
+ {
+ $Debug = 1;
+ }
+ elsif ($Arg eq "--log-only")
+ {
+ $LogOnly = 1;
+ }
+ elsif ($Arg =~ /^(?:-\?|-h|--help)$/)
+ {
+ $Usage = 0;
+ last;
+ }
+ elsif ($Arg =~ /^-/)
+ {
+ Error "unknown option '$Arg'\n";
+ $Usage = 2;
+ last;
+ }
+ else
+ {
+ Error "unexpected argument '$Arg'\n";
+ $Usage = 2;
+ last;
+ }
}
-else
+
+# Check parameters
+if (!defined $Usage)
{
- die "Invalid number of bits $Bits";
+ map { $OptTypes{$_} = 1 } keys %TaskTypes if (!%OptTypes);
}
-my $BitsSuffix = ($Bits == 64 ? "64" : "");
-
-# Download the winetest executable if new
-my $UA = LWP::UserAgent->new();
-$UA->agent("WineTestBot");
-my $Request = HTTP::Request->new(GET => $WineTestUrls{$Bits});
-my $LatestBaseName = "winetest${BitsSuffix}-latest.exe";
-my $LatestFileName = "$DataDir/latest/$LatestBaseName";
-if (-r $LatestFileName)
+if (defined $Usage)
{
- my $Since = gmtime((stat $LatestFileName)[9]);
- $Request->header("If-Modified-Since" => "$Since GMT");
+ print "Usage: $Name0 [--debug] [--log-only] [--help] [--create] [TASKTYPE] ...\n";
+ print "\n";
+ print "Where TASKTYPE is one of: ", join(" ", sort keys %TaskTypes), "\n";
+ exit $Usage;
}
-my $Response = $UA->request($Request);
-if ($Response->code != RC_OK)
+
+
+#
+# Create the 32 bit tasks
+#
+
+my $Rc = 0;
+if ($OptTypes{build} or $OptTypes{base32} or $OptTypes{winetest32})
{
- if ($Response->code != RC_NOT_MODIFIED)
+ my ($Create, $LatestBaseName) = UpdateWineTest($OptCreate, 32);
+ if ($Create < 0)
{
- LogMsg "Unexpected HTTP response code ", $Response->code, "\n";
- exit 1;
+ $Rc = 1;
+ }
+ elsif ($Create == 1)
+ {
+ # A new executable means there have been commits so update Wine. Create
+ # this job first purely to make the WineTestBot job queue look nice, and
+ # arbitrarily do it only for 32-bit executables to avoid redundant updates.
+ $Rc = 1 if ($OptTypes{build} and !AddReconfigJob());
+ $Rc = 1 if ($OptTypes{base32} and !AddJob("base", $LatestBaseName, 32));
+ $Rc = 1 if ($OptTypes{winetest32} and !AddJob("", $LatestBaseName, 32));
}
- exit 0;
}
-# Store the new WineTest executable in the staging directory:
-# - So we can compare it to the reference one in the latest directory to
-# verify that it truly is new.
-# - Because we don't know the relevant Job and Step IDs yet and thus cannot
-# put it in the jobs directory tree.
-umask 002;
-mkdir "$DataDir/staging";
-my ($fh, $StagingFileName) = OpenNewFile("$DataDir/staging", "_$LatestBaseName");
-if (!$fh)
-{
- LogMsg "Could not create staging file: $!\n";
- exit 1;
-}
-print $fh $Response->decoded_content();
-close($fh);
-my $NewFile = 1;
-if (-r $LatestFileName)
-{
- $NewFile = compare($StagingFileName, $LatestFileName) != 0;
-}
-if (!$NewFile)
-{
- # Nothing to do
- unlink($StagingFileName);
- exit 0;
-}
+#
+# Create the 64 bit tasks
+#
-# Save the WineTest executable in the latest directory for the next round
-mkdir "$DataDir/latest";
-if (!move($StagingFileName, $LatestFileName))
+if ($OptTypes{all64})
{
- LogMsg "Could not move '$StagingFileName' to '$LatestFileName': $!\n";
- unlink($StagingFileName);
- exit 1;
+ my ($Create, $LatestBaseName) = UpdateWineTest($OptCreate, 64);
+ if ($Create < 0)
+ {
+ $Rc = 1;
+ }
+ elsif ($Create == 1)
+ {
+ $Rc = 1 if ($OptTypes{all64} and !AddJob("", $LatestBaseName, 64));
+ }
}
-utime time, $Response->last_modified, $LatestFileName;
-
-# A new executable means there have been commits so update Wine. Create this
-# job first purely to make the WineTestBot job queue look nice, and arbitrarily
-# do it only for 32-bit executables to avoid redundant updates.
-my $rc = 0;
-$rc = 1 if ($Bits == 32 and !AddReconfigJob());
-
-$rc = 1 if (!AddJob(1, $LatestBaseName, $Bits));
-$rc = 1 if ($Bits == 32 and !AddJob(!1, $LatestBaseName, $Bits));
RescheduleJobs();
LogMsg "Submitted jobs\n";
-exit $rc;
+exit $Rc;
diff --git a/testbot/doc/INSTALL.txt b/testbot/doc/INSTALL.txt
index 8827c227d..cb7c31b97 100644
--- a/testbot/doc/INSTALL.txt
+++ b/testbot/doc/INSTALL.txt
@@ -86,8 +86,7 @@ Setup for Wine's patches site:
Setup for Winetest updates:
- Use a cron job to run CheckForWinetestUpdate.pl periodically. For
instance:
- */10 * * * * $HOME/tools/testbot/bin/CheckForWinetestUpdate.pl 32
- */10 * * * * $HOME/tools/testbot/bin/CheckForWinetestUpdate.pl 64
+ */10 * * * * $HOME/tools/testbot/bin/CheckForWinetestUpdate.pl --log-only
Setup for wine-devel:
- A proper WineTestBot system should integrate with Wine's patches site.
--
2.17.0
June 5, 2018
[PATCH v2 2/2] wbemdisp/tests: Add ISWbemSecurity tests
by Hans Leidekker
From: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
v2: Add more tests for default settings.
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/wbemdisp/tests/wbemdisp.c | 43 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/dlls/wbemdisp/tests/wbemdisp.c b/dlls/wbemdisp/tests/wbemdisp.c
index 171a91edb4..1ce045697a 100644
--- a/dlls/wbemdisp/tests/wbemdisp.c
+++ b/dlls/wbemdisp/tests/wbemdisp.c
@@ -265,7 +265,10 @@ static void test_locator(void)
ISWbemObject *object;
ISWbemPropertySet *prop_set;
ISWbemProperty *prop;
+ ISWbemSecurity *security;
VARIANT var;
+ WbemImpersonationLevelEnum imp_level;
+ WbemAuthenticationLevelEnum auth_level;
hr = CoCreateInstance( &CLSID_SWbemLocator, NULL, CLSCTX_INPROC_SERVER, &IID_ISWbemLocator, (void **)&locator );
ok( hr == S_OK, "got %x\n", hr );
@@ -284,6 +287,34 @@ static void test_locator(void)
SysFreeString( lang_bstr );
SysFreeString( query_bstr );
+ hr = ISWbemLocator_get_Security_( locator, &security );
+ ok( hr == S_OK, "got %x\n", hr );
+ imp_level = 0xdeadbeef;
+ hr = ISWbemSecurity_get_ImpersonationLevel( security, &imp_level );
+ ok( hr == S_OK, "got %x\n", hr );
+ ok( imp_level == wbemImpersonationLevelImpersonate, "got %u\n", imp_level );
+ hr = ISWbemSecurity_put_ImpersonationLevel( security, wbemImpersonationLevelAnonymous );
+ ok( hr == S_OK, "got %x\n", hr );
+ imp_level = 0xdeadbeef;
+ hr = ISWbemSecurity_get_ImpersonationLevel( security, &imp_level );
+ ok( hr == S_OK, "got %x\n", hr );
+ ok( imp_level == wbemImpersonationLevelAnonymous, "got %u\n", imp_level );
+
+ auth_level = 0xdeadbeef;
+ hr = ISWbemSecurity_get_AuthenticationLevel( security, &auth_level );
+ todo_wine {
+ ok( hr == WBEM_E_FAILED, "got %x\n", hr );
+ ok( auth_level == 0xdeadbeef, "got %u\n", auth_level );
+ }
+ hr = ISWbemSecurity_put_AuthenticationLevel( security, wbemAuthenticationLevelNone );
+ ok( hr == S_OK, "got %x\n", hr );
+ auth_level = 0xdeadbeef;
+ hr = ISWbemSecurity_get_AuthenticationLevel( security, &auth_level );
+ ok( hr == S_OK, "got %x\n", hr );
+ ok( auth_level == wbemAuthenticationLevelNone, "got %u\n", auth_level );
+ ISWbemSecurity_Release( security );
+ security = NULL;
+
hr = ISWbemObjectSet_get__NewEnum( object_set, (IUnknown**)&enum_var );
ok( hr == S_OK, "got %x\n", hr );
@@ -318,6 +349,18 @@ static void test_locator(void)
ok( V_VT(&var) == VT_BSTR, "got %x\n", V_VT(&var) );
VariantClear( &var );
+ hr = ISWbemServices_get_Security_( services, &security );
+ ok( hr == S_OK, "got %x\n", hr );
+ imp_level = 0xdeadbeef;
+ hr = ISWbemSecurity_get_ImpersonationLevel( security, &imp_level );
+ ok( hr == S_OK, "got %x\n", hr );
+ ok( imp_level == wbemImpersonationLevelImpersonate, "got %u\n", imp_level );
+ auth_level = 0xdeadbeef;
+ hr = ISWbemSecurity_get_AuthenticationLevel( security, &auth_level );
+ ok( hr == S_OK, "got %x\n", hr );
+ ok( auth_level == wbemAuthenticationLevelPktPrivacy, "got %u\n", auth_level );
+
+ ISWbemSecurity_Release(security);
ISWbemProperty_Release( prop );
ISWbemPropertySet_Release( prop_set );
ISWbemObject_Release( object );
--
2.11.0
June 5, 2018
[PATCH v2 1/2] wbemdisp: Add ISWbemSecurity stub interface.
by Hans Leidekker
From: Michael Müller <michael(a)fds-team.de>
Signed-off-by: Alistair Leslie-Hughes <leslie_alistair(a)hotmail.com>
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
---
dlls/wbemdisp/locator.c | 249 +++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 244 insertions(+), 5 deletions(-)
diff --git a/dlls/wbemdisp/locator.c b/dlls/wbemdisp/locator.c
index e782d1f523..cdc0ab4479 100644
--- a/dlls/wbemdisp/locator.c
+++ b/dlls/wbemdisp/locator.c
@@ -38,6 +38,7 @@
WINE_DEFAULT_DEBUG_CHANNEL(wbemdisp);
static HRESULT EnumVARIANT_create( IEnumWbemClassObject *, IEnumVARIANT ** );
+static HRESULT ISWbemSecurity_create( ISWbemSecurity ** );
enum type_id
{
@@ -47,6 +48,7 @@ enum type_id
ISWbemProperty_tid,
ISWbemPropertySet_tid,
ISWbemServices_tid,
+ ISWbemSecurity_tid,
last_tid
};
@@ -60,7 +62,8 @@ static REFIID wbemdisp_tid_id[] =
&IID_ISWbemObjectSet,
&IID_ISWbemProperty,
&IID_ISWbemPropertySet,
- &IID_ISWbemServices
+ &IID_ISWbemServices,
+ &IID_ISWbemSecurity
};
static HRESULT get_typeinfo( enum type_id tid, ITypeInfo **ret )
@@ -1873,8 +1876,12 @@ static HRESULT WINAPI services_get_Security_(
ISWbemServices *iface,
ISWbemSecurity **objWbemSecurity )
{
- FIXME( "\n" );
- return E_NOTIMPL;
+ TRACE( "%p, %p\n", iface, objWbemSecurity );
+
+ if (!objWbemSecurity)
+ return E_INVALIDARG;
+
+ return ISWbemSecurity_create( objWbemSecurity );
}
static const ISWbemServicesVtbl services_vtbl =
@@ -2128,8 +2135,12 @@ static HRESULT WINAPI locator_get_Security_(
ISWbemLocator *iface,
ISWbemSecurity **objWbemSecurity )
{
- FIXME( "%p, %p\n", iface, objWbemSecurity );
- return E_NOTIMPL;
+ TRACE( "%p, %p\n", iface, objWbemSecurity );
+
+ if (!objWbemSecurity)
+ return E_INVALIDARG;
+
+ return ISWbemSecurity_create( objWbemSecurity );
}
static const ISWbemLocatorVtbl locator_vtbl =
@@ -2160,3 +2171,231 @@ HRESULT SWbemLocator_create( void **obj )
TRACE( "returning iface %p\n", *obj );
return S_OK;
}
+
+struct security
+{
+ ISWbemSecurity ISWbemSecurity_iface;
+ LONG refs;
+ WbemImpersonationLevelEnum implevel;
+ WbemAuthenticationLevelEnum authlevel;
+};
+
+static inline struct security *impl_from_ISWbemSecurity( ISWbemSecurity *iface )
+{
+ return CONTAINING_RECORD( iface, struct security, ISWbemSecurity_iface );
+}
+
+static ULONG WINAPI security_AddRef(
+ ISWbemSecurity *iface )
+{
+ struct security *security = impl_from_ISWbemSecurity( iface );
+ return InterlockedIncrement( &security->refs );
+}
+
+static ULONG WINAPI security_Release(
+ ISWbemSecurity *iface )
+{
+ struct security *security = impl_from_ISWbemSecurity( iface );
+ LONG refs = InterlockedDecrement( &security->refs );
+ if (!refs)
+ {
+ TRACE( "destroying %p\n", security );
+ heap_free( security );
+ }
+ return refs;
+}
+
+static HRESULT WINAPI security_QueryInterface(
+ ISWbemSecurity *iface,
+ REFIID riid,
+ void **ppvObject )
+{
+ struct security *security = impl_from_ISWbemSecurity( iface );
+ TRACE( "%p, %s, %p\n", security, debugstr_guid( riid ), ppvObject );
+
+ if (IsEqualGUID( riid, &IID_ISWbemSecurity ) ||
+ IsEqualGUID( riid, &IID_IDispatch ) ||
+ IsEqualGUID( riid, &IID_IUnknown ))
+ {
+ *ppvObject = iface;
+ }
+ else
+ {
+ FIXME( "interface %s not implemented\n", debugstr_guid(riid) );
+ return E_NOINTERFACE;
+ }
+ ISWbemSecurity_AddRef( iface );
+ return S_OK;
+}
+
+static HRESULT WINAPI security_GetTypeInfoCount(
+ ISWbemSecurity *iface,
+ UINT *count )
+{
+ struct security *security = impl_from_ISWbemSecurity( iface );
+ TRACE( "%p, %p\n", security, count );
+
+ *count = 1;
+ return S_OK;
+}
+
+static HRESULT WINAPI security_GetTypeInfo(
+ ISWbemSecurity *iface,
+ UINT index,
+ LCID lcid,
+ ITypeInfo **info )
+{
+ struct security *security = impl_from_ISWbemSecurity( iface );
+ TRACE( "%p, %u, %u, %p\n", security, index, lcid, info );
+
+ return get_typeinfo( ISWbemSecurity_tid, info );
+}
+
+static HRESULT WINAPI security_GetIDsOfNames(
+ ISWbemSecurity *iface,
+ REFIID riid,
+ LPOLESTR *names,
+ UINT count,
+ LCID lcid,
+ DISPID *dispid )
+{
+ struct security *security = impl_from_ISWbemSecurity( iface );
+ ITypeInfo *typeinfo;
+ HRESULT hr;
+
+ TRACE( "%p, %s, %p, %u, %u, %p\n", security, debugstr_guid(riid), names, count, lcid, dispid );
+
+ if (!names || !count || !dispid) return E_INVALIDARG;
+
+ hr = get_typeinfo( ISWbemSecurity_tid, &typeinfo );
+ if (SUCCEEDED(hr))
+ {
+ hr = ITypeInfo_GetIDsOfNames( typeinfo, names, count, dispid );
+ ITypeInfo_Release( typeinfo );
+ }
+ return hr;
+}
+
+static HRESULT WINAPI security_Invoke(
+ ISWbemSecurity *iface,
+ DISPID member,
+ REFIID riid,
+ LCID lcid,
+ WORD flags,
+ DISPPARAMS *params,
+ VARIANT *result,
+ EXCEPINFO *excep_info,
+ UINT *arg_err )
+{
+ struct security *security = impl_from_ISWbemSecurity( iface );
+ ITypeInfo *typeinfo;
+ HRESULT hr;
+
+ TRACE( "%p, %d, %s, %d, %d, %p, %p, %p, %p\n", security, member, debugstr_guid(riid),
+ lcid, flags, params, result, excep_info, arg_err );
+
+ hr = get_typeinfo( ISWbemSecurity_tid, &typeinfo );
+ if (SUCCEEDED(hr))
+ {
+ hr = ITypeInfo_Invoke( typeinfo, &security->ISWbemSecurity_iface, member, flags,
+ params, result, excep_info, arg_err );
+ ITypeInfo_Release( typeinfo );
+ }
+ return hr;
+}
+
+static HRESULT WINAPI security_get_ImpersonationLevel(
+ ISWbemSecurity *iface,
+ WbemImpersonationLevelEnum *impersonation_level )
+{
+ struct security *security = impl_from_ISWbemSecurity( iface );
+ FIXME( "%p, %p: stub\n", security, impersonation_level );
+
+ if (!impersonation_level)
+ return E_INVALIDARG;
+
+ *impersonation_level = security->implevel;
+ return S_OK;
+}
+
+static HRESULT WINAPI security_put_ImpersonationLevel(
+ ISWbemSecurity *iface,
+ WbemImpersonationLevelEnum impersonation_level )
+{
+ struct security *security = impl_from_ISWbemSecurity( iface );
+ FIXME( "%p, %d: stub\n", security, impersonation_level );
+
+ security->implevel = impersonation_level;
+ return S_OK;
+}
+
+static HRESULT WINAPI security_get_AuthenticationLevel(
+ ISWbemSecurity *iface,
+ WbemAuthenticationLevelEnum *authentication_level )
+{
+ struct security *security = impl_from_ISWbemSecurity( iface );
+ FIXME( "%p, %p: stub\n", security, authentication_level );
+
+ if (!authentication_level)
+ return E_INVALIDARG;
+
+ *authentication_level = security->authlevel;
+ return S_OK;
+}
+
+static HRESULT WINAPI security_put_AuthenticationLevel(
+ ISWbemSecurity *iface,
+ WbemAuthenticationLevelEnum authentication_level )
+{
+ struct security *security = impl_from_ISWbemSecurity( iface );
+ FIXME( "%p, %d: stub\n", security, authentication_level );
+
+ security->authlevel = authentication_level;
+ return S_OK;
+}
+
+static HRESULT WINAPI security_get_Privileges(
+ ISWbemSecurity *iface,
+ ISWbemPrivilegeSet **privilege_set )
+{
+ struct security *security = impl_from_ISWbemSecurity( iface );
+ FIXME( "%p, %p: stub\n", security, privilege_set );
+
+ if (!privilege_set)
+ return E_INVALIDARG;
+
+ return E_NOTIMPL;
+}
+
+static const ISWbemSecurityVtbl security_vtbl =
+{
+ security_QueryInterface,
+ security_AddRef,
+ security_Release,
+ security_GetTypeInfoCount,
+ security_GetTypeInfo,
+ security_GetIDsOfNames,
+ security_Invoke,
+ security_get_ImpersonationLevel,
+ security_put_ImpersonationLevel,
+ security_get_AuthenticationLevel,
+ security_put_AuthenticationLevel,
+ security_get_Privileges
+};
+
+static HRESULT ISWbemSecurity_create( ISWbemSecurity **obj )
+{
+ struct security *security;
+
+ TRACE( "%p\n", obj );
+
+ if (!(security = heap_alloc( sizeof(*security) ))) return E_OUTOFMEMORY;
+ security->ISWbemSecurity_iface.lpVtbl = &security_vtbl;
+ security->refs = 1;
+ security->implevel = wbemImpersonationLevelImpersonate;
+ security->authlevel = wbemAuthenticationLevelPktPrivacy;
+
+ *obj = &security->ISWbemSecurity_iface;
+ TRACE( "returning iface %p\n", *obj );
+ return S_OK;
+}
--
2.11.0
June 5, 2018
Re: [PATCH 3/3] msi/tests: Test deferral of WriteRegistryValues.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
June 5, 2018
Re: [PATCH 2/3] msi/tests: Simplify and clarify WriteRegistryValues and RemoveRegistryValues tests.
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
June 5, 2018
Re: [PATCH 1/3] msi: Only delete empty registry keys in delete_key().
by Hans Leidekker
Signed-off-by: Hans Leidekker <hans(a)codeweavers.com>
June 5, 2018
Re: [PATCH v2 2/2] widl: Generate correct size and alignment for all types.
by Huw Davies
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
June 5, 2018
Re: [PATCH v2 1/2] stdole2.idl: Use more accurate sizes for Automation types.
by Huw Davies
Signed-off-by: Huw Davies <huw(a)codeweavers.com>
June 5, 2018
Re: [PATCH] msvcp120: Add tests for concurrent_vector_Internal_push_back and capacity.
by Zhiyi Zhang
On Tue 6 5 14:39, Hua Meng wrote:
> Signed-off-by: Hua meng <161220092(a)smail.nju.edu.cn>
> ---
> dlls/msvcp120/tests/msvcp120.c | 120 +++++++++++++++++++++++++++++++++++++++--
> 1 file changed, 117 insertions(+), 3 deletions(-)
> mode change 100644 => 100755 dlls/msvcp120/tests/msvcp120.c
Hi,
I don't think you need to change the file permission from 644 to 755.
And there are some style inconsistencies.
Thanks,
Zhiyi Zhang
>
> diff --git a/dlls/msvcp120/tests/msvcp120.c b/dlls/msvcp120/tests/msvcp120.c
> old mode 100644
> new mode 100755
> index dfd2d06..84e20bd
> --- a/dlls/msvcp120/tests/msvcp120.c
> +++ b/dlls/msvcp120/tests/msvcp120.c
> @@ -35,6 +35,7 @@ struct expect_struct {
> DEFINE_EXPECT(queue_char__Move_item);
> DEFINE_EXPECT(queue_char__Copy_item);
> DEFINE_EXPECT(queue_char__Assign_and_destroy_item);
> + DEFINE_EXPECT(concurrent_vector_int_alloc);
> };
>
> #define SET_EXPECT(func) \
> @@ -105,6 +106,8 @@ struct thiscall_thunk
>
> static void * (WINAPI *call_thiscall_func1)( void *func, void *this );
> static void * (WINAPI *call_thiscall_func2)( void *func, void *this, const void *a );
> +static void * (WINAPI *call_thiscall_func3)( void *func, void *this, const void *a,
> + const void *b );
>
> static void init_thiscall_thunk(void)
> {
> @@ -117,17 +120,19 @@ static void init_thiscall_thunk(void)
> thunk->jmp_edx = 0xe2ff; /* jmp *%edx */
> call_thiscall_func1 = (void *)thunk;
> call_thiscall_func2 = (void *)thunk;
> + call_thiscall_func3 = (void *)thunk;
> }
>
> #define call_func1(func,_this) call_thiscall_func1(func,_this)
> #define call_func2(func,_this,a) call_thiscall_func2(func,_this,(const void*)(a))
> -
> +#define call_func3(func,_this,a,b) call_thiscall_func3(func,_this,(const void*)(a),\
> + (const void*)(b))
> #else
>
> #define init_thiscall_thunk()
> #define call_func1(func,_this) func(_this)
> #define call_func2(func,_this,a) func(_this,a)
> -
> +#define call_func3(func,_this,a,b) func(_this,a,b)
> #endif /* __i386__ */
>
> static inline float __port_infinity(void)
> @@ -360,6 +365,19 @@ static void (__thiscall *p_queue_base_v4__Internal_move_push)(queue_base_v4*, vo
> static MSVCP_bool (__thiscall *p_queue_base_v4__Internal_pop_if_present)(queue_base_v4*, void*);
> static void (__thiscall *p_queue_base_v4__Internal_finish_clear)(queue_base_v4*);
>
> +typedef struct vector_base_v4
> +{
> + void* (__cdecl *allocator)(struct vector_base_v4 *, size_t);
> + void *storage[3];
> + size_t first_block;
> + size_t early_size;
> + void **segment;
> +} vector_base_v4;
> +
> +static void (__thiscall *p_vector_base_v4_dtor)(vector_base_v4*);
> +static size_t (__thiscall *p_vector_base_v4__Internal_capacity)(vector_base_v4*);
> +static void* (__thiscall *p_vector_base_v4__Internal_push_back)(vector_base_v4*, size_t, size_t*);
> +
> static HMODULE msvcp;
> #define SETNOFAIL(x,y) x = (void*)GetProcAddress(msvcp,y)
> #define SET(x,y) do { SETNOFAIL(x,y); ok(x != NULL, "Export '%s' not found\n", y); } while(0)
> @@ -493,7 +511,13 @@ static BOOL init(void)
> "?_Internal_pop_if_present(a)_Concurrent_queue_base_v4@details(a)Concurrency@@IEAA_NPEAX(a)Z");
> SET(p_queue_base_v4__Internal_finish_clear,
> "?_Internal_finish_clear(a)_Concurrent_queue_base_v4@details(a)Concurrency@@IEAAXXZ");
> - } else {
> + SET(p_vector_base_v4_dtor,
> + "??1_Concurrent_vector_base_v4(a)details@Concurrency@@IEAA(a)XZ");
> + SET(p_vector_base_v4__Internal_capacity,
> + "?_Internal_capacity(a)_Concurrent_vector_base_v4@details(a)Concurrency@@IEBA_KXZ");
> + SET(p_vector_base_v4__Internal_push_back,
> + "?_Internal_push_back(a)_Concurrent_vector_base_v4@details(a)Concurrency@@IEAAPEAX_KAEA_K(a)Z");
> +} else {
> SET(p_tr2_sys__File_size,
> "?_File_size(a)sys@tr2(a)std@@YA_KPBD(a)Z");
> SET(p_tr2_sys__File_size_wchar,
> @@ -596,6 +620,12 @@ static BOOL init(void)
> "?_Internal_pop_if_present(a)_Concurrent_queue_base_v4@details(a)Concurrency@@IAE_NPAX(a)Z");
> SET(p_queue_base_v4__Internal_finish_clear,
> "?_Internal_finish_clear(a)_Concurrent_queue_base_v4@details(a)Concurrency@@IAEXXZ");
> + SET(p_vector_base_v4_dtor,
> + "??1_Concurrent_vector_base_v4(a)details@Concurrency@@IAE(a)XZ");
> + SET(p_vector_base_v4__Internal_capacity,
> + "?_Internal_capacity(a)_Concurrent_vector_base_v4@details(a)Concurrency@@IBEIXZ");
> + SET(p_vector_base_v4__Internal_push_back,
> + "?_Internal_push_back(a)_Concurrent_vector_base_v4@details(a)Concurrency@@IAEPAXIAAI(a)Z");
> #else
> SET(p__Thrd_current,
> "_Thrd_current");
> @@ -627,6 +657,12 @@ static BOOL init(void)
> "?_Internal_pop_if_present(a)_Concurrent_queue_base_v4@details(a)Concurrency@@IAA_NPAX(a)Z");
> SET(p_queue_base_v4__Internal_finish_clear,
> "?_Internal_finish_clear(a)_Concurrent_queue_base_v4@details(a)Concurrency@@IAAXXZ");
> + SET(p_vector_base_v4_dtor,
> + "??1_Concurrent_vector_base_v4(a)details@Concurrency@@IAA(a)XZ");
> + SET(p_vector_base_v4__Internal_capacity,
> + "?_Internal_capacity(a)_Concurrent_vector_base_v4@details(a)Concurrency@@IBAIXZ");
> + SET(p_vector_base_v4__Internal_push_back,
> + "?_Internal_push_back(a)_Concurrent_vector_base_v4@details(a)Concurrency@@IAAPAXIAAI(a)Z");
> #endif
> }
> SET(p__Thrd_equal,
> @@ -2396,6 +2432,83 @@ static DWORD WINAPI queue_pop_thread(void*arg)
> return 0;
> }
>
> +static void* __cdecl concurrent_vector_int_alloc(vector_base_v4 *this, size_t n)
> +{
> + CHECK_EXPECT(concurrent_vector_int_alloc);
> + return malloc(n*sizeof(int));
> +}
> +
> +static void concurrent_vector_int_ctor(vector_base_v4 *this)
> +{
> + memset(this, 0, sizeof(*this));
> + this->allocator = concurrent_vector_int_alloc;
> + this->segment = &this->storage[0];
> +}
> +
> +static void test_vector_base_v4(void)
> +{
> + vector_base_v4 vector;
> + size_t idx;
> + size_t size;
> + int *data;
> +
> + /* test for concurrent_vector_base_v4__Internal_push_back and _Internal_capacity */
> + concurrent_vector_int_ctor(&vector);
> +
> + size = (size_t)call_func1(p_vector_base_v4__Internal_capacity, &vector);
> + todo_wine ok(size == 0, "size of vector got %ld expected %d\n", (long)size, 0);
> +
> + SET_EXPECT(concurrent_vector_int_alloc);
> + data = call_func3(p_vector_base_v4__Internal_push_back, &vector, sizeof(int), &idx);
> + CHECK_CALLED(concurrent_vector_int_alloc);
> + todo_wine ok(data != NULL, "_Internal_push_back returned NULL\n");
> + if(!data){
> + skip("_Internal_capacity not yet implemented\n");
> + return;
> + }
> + todo_wine ok(idx == 0, "idx got %ld expected %d\n", (long)idx, 0);
> + *data = 1;
> + todo_wine ok(data == vector.storage[0], "vector.storage[0] got %p expected %p\n", vector.storage[0], data);
> + todo_wine ok(vector.first_block == 1, "vector.first_block got %ld expected %d\n", (long)vector.first_block, 1);
> + todo_wine ok(vector.early_size == 1, "vector.early_size got %ld expected %d\n", (long)vector.early_size, 1);
> +
> + size = (size_t)call_func1(p_vector_base_v4__Internal_capacity, &vector);
> + todo_wine ok(size == 2, "size of vector got %ld expected %d\n", (long)size, 2);
> +
> + data = call_func3(p_vector_base_v4__Internal_push_back, &vector, sizeof(int), &idx);
> + todo_wine ok(data != NULL, "_Internal_push_back returned NULL\n");
> + todo_wine ok(idx == 1, "idx got %ld expected %d\n", (long)idx, 1);
> + *data = 2;
> + todo_wine ok(vector.first_block == 1, "vector.first_block got %ld expected %d\n", (long)vector.first_block, 1);
> + todo_wine ok(vector.early_size == 2, "vector.early_size got %ld expected %d\n", (long)vector.early_size, 2);
> +
> + size = (size_t)call_func1(p_vector_base_v4__Internal_capacity, &vector);
> + todo_wine ok(size == 2, "size of vector got %ld expected %d\n", (long)size, 2);
> +
> + SET_EXPECT(concurrent_vector_int_alloc);
> + data = call_func3(p_vector_base_v4__Internal_push_back, &vector, sizeof(int), &idx);
> + CHECK_CALLED(concurrent_vector_int_alloc);
> + todo_wine ok(data != NULL, "_Internal_push_back returned NULL\n");
> + todo_wine ok(idx == 2, "idx got %ld expected %d\n", (long)idx, 2);
> + *data = 3;
> + todo_wine ok(vector.first_block == 1, "vector.first_block got %ld expected %d\n", (long)vector.first_block, 1);
> + todo_wine ok(vector.early_size == 3, "vector.early_size got %ld expected %d\n", (long)vector.early_size, 3);
> +
> + size = (size_t)call_func1(p_vector_base_v4__Internal_capacity, &vector);
> + todo_wine ok(size == 4, "size of vector got %ld expected %d\n", (long)size, 4);
> +
> + data = call_func3(p_vector_base_v4__Internal_push_back, &vector, sizeof(int), &idx);
> + size = (size_t)call_func1(p_vector_base_v4__Internal_capacity, &vector);
> + todo_wine ok(size == 4, "size of vector got %ld expected %d\n", (long)size, 4);
> +
> + SET_EXPECT(concurrent_vector_int_alloc);
> + data = call_func3(p_vector_base_v4__Internal_push_back, &vector, sizeof(int), &idx);
> + CHECK_CALLED(concurrent_vector_int_alloc);
> + size = (size_t)call_func1(p_vector_base_v4__Internal_capacity, &vector);
> + todo_wine ok(size == 8, "size of vector got %ld expected %d\n", (long)size, 8);
> +
> + call_func1(p_vector_base_v4_dtor, &vector);
> +}
> static void test_queue_base_v4(void)
> {
> queue_base_v4 queue;
> @@ -2626,6 +2739,7 @@ START_TEST(msvcp120)
>
> test_vector_base_v4__Segment_index_of();
> test_queue_base_v4();
> + test_vector_base_v4();
>
> test_vbtable_size_exports();
>
>
June 5, 2018
Re: [PATCH] netapi32: NetUserGetInfo should return Admin privilege - wine users run as Administrators
by Marvin
Hi,
While running your changed tests on Windows, I think I found new failures.
Being a bot and all I'm not very good at pattern recognition, so I might be
wrong, but could you please double-check?
Full results can be found at
https://testbot.winehq.org/JobDetails.pl?Key=38963
Your paranoid android.
=== wxppro (32 bit access) ===
0b40:access: unhandled exception c0000005 at 004025C6
=== w2003std (32 bit access) ===
06ac:access: unhandled exception c0000005 at 004025C6
=== wvistau64 (32 bit access) ===
073c:access: unhandled exception c0000005 at 004025C6
=== wvistau64_zh_CN (32 bit access) ===
0bbc:access: unhandled exception c0000005 at 004025C6
=== wvistau64_fr (32 bit access) ===
06a8:access: unhandled exception c0000005 at 004025C6
=== wvistau64_he (32 bit access) ===
0be8:access: unhandled exception c0000005 at 004025C6
=== w2008s64 (32 bit access) ===
086c:access: unhandled exception c0000005 at 004025C6
=== w7u (32 bit access) ===
0130:access: unhandled exception c0000005 at 004025C6
=== w7pro64 (32 bit access) ===
0adc:access: unhandled exception c0000005 at 004025C6
=== w8 (32 bit access) ===
0d30:access: unhandled exception c0000005 at 004025C6
=== w864 (32 bit access) ===
0154:access: unhandled exception c0000005 at 004025C6
=== w1064 (32 bit access) ===
0eb8:access: unhandled exception c0000005 at 004025C6
=== wvistau64 (64 bit access) ===
073c:access: unhandled exception c0000005 at 00000000004022FB
=== w2008s64 (64 bit access) ===
086c:access: unhandled exception c0000005 at 00000000004022FB
=== w7pro64 (64 bit access) ===
0a9c:access: unhandled exception c0000005 at 00000000004022FB
The previous 1 run(s) terminated abnormally
=== w864 (64 bit access) ===
0ad8:access: unhandled exception c0000005 at 00000000004022FB
=== w1064 (64 bit access) ===
0e04:access: unhandled exception c0000005 at 00000000004022FB
June 5, 2018