Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
65bacd4b
Commit
65bacd4b
authored
Mar 05, 2014
by
Francois Gouget
Committed by
Alexandre Julliard
Mar 05, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi/tests: Avoid source test failures when running in an account with insufficient privileges.
parent
720f6868
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
12 deletions
+36
-12
source.c
dlls/msi/tests/source.c
+36
-12
No files found.
dlls/msi/tests/source.c
View file @
65bacd4b
...
...
@@ -1014,19 +1014,24 @@ machine_tests:
r
=
pMsiSourceListAddSourceExA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_MACHINE
,
MSICODE_PRODUCT
|
MSISOURCETYPE_URL
,
"C:
\\
source"
,
0
);
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
if
(
r
==
ERROR_ACCESS_DENIED
)
skip
(
"MsiSourceListAddSourceEx (insufficient privileges)
\n
"
);
else
{
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
res
=
RegOpenKeyExA
(
prodkey
,
"SourceList
\\
URL"
,
0
,
access
,
&
url
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
res
=
RegOpenKeyExA
(
prodkey
,
"SourceList
\\
URL"
,
0
,
access
,
&
url
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
size
=
MAX_PATH
;
res
=
RegQueryValueExA
(
url
,
"1"
,
NULL
,
NULL
,
(
LPBYTE
)
value
,
&
size
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
ok
(
!
lstrcmpA
(
value
,
"C:
\\
source/"
),
"Expected 'C:
\\
source/', got %s
\n
"
,
value
);
ok
(
size
==
11
,
"Expected 11, got %d
\n
"
,
size
);
size
=
MAX_PATH
;
res
=
RegQueryValueExA
(
url
,
"1"
,
NULL
,
NULL
,
(
LPBYTE
)
value
,
&
size
);
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
ok
(
!
lstrcmpA
(
value
,
"C:
\\
source/"
),
"Expected 'C:
\\
source/', got %s
\n
"
,
value
);
ok
(
size
==
11
,
"Expected 11, got %d
\n
"
,
size
);
RegCloseKey
(
url
);
RegCloseKey
(
prodkey
);
RegCloseKey
(
url
);
RegCloseKey
(
prodkey
);
}
LocalFree
(
usersid
);
}
...
...
@@ -2050,6 +2055,11 @@ machine_tests:
r
=
pMsiSourceListSetInfoA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_MACHINE
,
MSICODE_PRODUCT
,
INSTALLPROPERTY_MEDIAPACKAGEPATHA
,
"path"
);
if
(
r
==
ERROR_ACCESS_DENIED
)
{
skip
(
"MsiSourceListSetInfo (insufficient privileges)
\n
"
);
goto
done
;
}
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
/* Media key is created by MsiSourceListSetInfo */
...
...
@@ -2063,10 +2073,11 @@ machine_tests:
INSTALLPROPERTY_MEDIAPACKAGEPATHA
,
"path"
);
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
RegDeleteValueA
(
media
,
"MediaPackage"
);
delete_key
(
media
,
""
,
access
);
RegCloseKey
(
media
);
done:
delete_key
(
source
,
""
,
access
);
RegCloseKey
(
source
);
delete_key
(
prodkey
,
""
,
access
);
...
...
@@ -2361,6 +2372,11 @@ machine_tests:
r
=
pMsiSourceListAddMediaDiskA
(
prodcode
,
NULL
,
MSIINSTALLCONTEXT_MACHINE
,
MSICODE_PRODUCT
,
1
,
"label"
,
"prompt"
);
if
(
r
==
ERROR_ACCESS_DENIED
)
{
skip
(
"MsiSourceListAddMediaDisk (insufficient privileges)
\n
"
);
goto
done
;
}
ok
(
r
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
r
);
/* Media subkey is created by MsiSourceListAddMediaDisk */
...
...
@@ -2375,10 +2391,11 @@ machine_tests:
MSICODE_PRODUCT
,
1
,
"label"
,
"prompt"
);
ok
(
r
==
ERROR_INVALID_PARAMETER
,
"Expected ERROR_INVALID_PARAMETER, got %d
\n
"
,
r
);
RegDeleteValueA
(
media
,
"1"
);
delete_key
(
media
,
""
,
access
);
RegCloseKey
(
media
);
done:
delete_key
(
source
,
""
,
access
);
RegCloseKey
(
source
);
delete_key
(
prodkey
,
""
,
access
);
...
...
@@ -3452,6 +3469,11 @@ machine_tests:
/* Net key is created */
res
=
RegOpenKeyExA
(
source
,
"Net"
,
0
,
access
,
&
net
);
if
(
res
==
ERROR_ACCESS_DENIED
)
{
skip
(
"MsiSourceListAddSource (insufficient privileges)
\n
"
);
goto
done
;
}
ok
(
res
==
ERROR_SUCCESS
,
"Expected ERROR_SUCCESS, got %d
\n
"
,
res
);
CHECK_REG_STR
(
net
,
"1"
,
"source
\\
"
);
...
...
@@ -3467,6 +3489,8 @@ machine_tests:
RegDeleteValueA
(
net
,
"1"
);
delete_key
(
net
,
""
,
access
);
RegCloseKey
(
net
);
done:
delete_key
(
source
,
""
,
access
);
RegCloseKey
(
source
);
delete_key
(
prodkey
,
""
,
access
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment