Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/tests/custom.c | 54 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 48 insertions(+), 6 deletions(-)
diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index c7ce4d20ae..6ae5bfc30a 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1112,11 +1112,57 @@ static void test_costs(MSIHANDLE hinst) ok(hinst, sz == 2, "got size %u\n", sz); }
+static void test_invalid_functions(MSIHANDLE hinst) +{ + char path[MAX_PATH], package_name[20]; + MSIHANDLE db, preview, package; + UINT r; + + r = MsiGetDatabaseState(hinst); + todo_wine ok(hinst, r == MSIDBSTATE_ERROR, "got %u\n", r); + + db = MsiGetActiveDatabase(hinst); + ok(hinst, db, "MsiGetActiveDatabase failed\n"); + + r = MsiDatabaseGenerateTransformA(db, db, "bogus.mst", 0, 0); + todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + + r = MsiDatabaseApplyTransformA(db, "bogus.mst", 0); + todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + + r = MsiCreateTransformSummaryInfoA(db, db, "bogus.mst", 0, 0); + todo_wine ok(hinst, r == ERROR_INSTALL_PACKAGE_OPEN_FAILED, "got %u\n", r); + + GetCurrentDirectoryA(sizeof(path), path); + r = MsiDatabaseExportA(db, "Test", path, "bogus.idt"); + todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + + r = MsiDatabaseImportA(db, path, "bogus.idt"); + todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + + r = MsiDatabaseCommit(db); + ok(hinst, r == ERROR_SUCCESS, "got %u\n", r); + + r = MsiDatabaseMergeA(db, db, "MergeErrors"); + ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + + r = MsiGetDatabaseState(db); + todo_wine ok(hinst, r == MSIDBSTATE_ERROR, "got %u\n", r); + + r = MsiEnableUIPreview(db, &preview); + todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + + sprintf(package_name, "#%u", db); + r = MsiOpenPackageA(package_name, &package); + todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + + MsiCloseHandle(db); +} + /* Main test. Anything that doesn't depend on a specific install configuration * or have undesired side effects should go here. */ UINT WINAPI main_test(MSIHANDLE hinst) { - UINT res; IUnknown *unk = NULL; HRESULT hr;
@@ -1131,11 +1177,6 @@ UINT WINAPI main_test(MSIHANDLE hinst) ok(hinst, hr == S_OK, "got %#x\n", hr); CoUninitialize();
- /* Test MsiGetDatabaseState() */ - res = MsiGetDatabaseState(hinst); - todo_wine - ok(hinst, res == MSIDBSTATE_ERROR, "expected MSIDBSTATE_ERROR, got %u\n", res); - test_props(hinst); test_db(hinst); test_doaction(hinst); @@ -1144,6 +1185,7 @@ UINT WINAPI main_test(MSIHANDLE hinst) test_feature_states(hinst); test_format_record(hinst); test_costs(hinst); + test_invalid_functions(hinst);
return ERROR_SUCCESS; }
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46812 Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/database.c | 13 ++----------- dlls/msi/tests/custom.c | 4 ++-- 2 files changed, 4 insertions(+), 13 deletions(-)
diff --git a/dlls/msi/database.c b/dlls/msi/database.c index 4537ed5836..1992661922 100644 --- a/dlls/msi/database.c +++ b/dlls/msi/database.c @@ -1993,17 +1993,8 @@ MSIDBSTATE WINAPI MsiGetDatabaseState( MSIHANDLE handle )
TRACE("%d\n", handle);
- db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE ); - if( !db ) - { - MSIHANDLE remote_database = msi_get_remote(handle); - if ( !remote_database ) - return MSIDBSTATE_ERROR; - - WARN("MsiGetDatabaseState not allowed during a custom action!\n"); - - return MSIDBSTATE_READ; - } + if (!(db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE ))) + return MSIDBSTATE_ERROR;
if (db->mode != MSIDBOPEN_READONLY ) ret = MSIDBSTATE_WRITE; diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index 6ae5bfc30a..9e9e2bf938 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1119,7 +1119,7 @@ static void test_invalid_functions(MSIHANDLE hinst) UINT r;
r = MsiGetDatabaseState(hinst); - todo_wine ok(hinst, r == MSIDBSTATE_ERROR, "got %u\n", r); + ok(hinst, r == MSIDBSTATE_ERROR, "got %u\n", r);
db = MsiGetActiveDatabase(hinst); ok(hinst, db, "MsiGetActiveDatabase failed\n"); @@ -1147,7 +1147,7 @@ static void test_invalid_functions(MSIHANDLE hinst) ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
r = MsiGetDatabaseState(db); - todo_wine ok(hinst, r == MSIDBSTATE_ERROR, "got %u\n", r); + ok(hinst, r == MSIDBSTATE_ERROR, "got %u\n", r);
r = MsiEnableUIPreview(db, &preview); todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
Hi,
While running your changed tests, 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=49924
Your paranoid android.
=== w7u (32 bit report) ===
msi: action: Timeout
=== wxppro (32 bit report) ===
msi: custom.c:1134: Test failed: got 1620
Report errors: msi:install contains a misplaced failure message for custom
=== w2008s64 (32 bit report) ===
msi: install: Timeout
=== w7u (32 bit report) ===
msi: install: Timeout
=== w2008s64 (64 bit report) ===
msi: install: Timeout
=== w7u (32 bit report) ===
msi: msi: Timeout
Signed-off-by: Hans Leidekker hans@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/msiquery.c | 14 ++------------ dlls/msi/tests/custom.c | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/dlls/msi/msiquery.c b/dlls/msi/msiquery.c index bea08c2822..862805fdbd 100644 --- a/dlls/msi/msiquery.c +++ b/dlls/msi/msiquery.c @@ -884,18 +884,8 @@ UINT WINAPI MsiDatabaseApplyTransformW( MSIHANDLE hdb, const WCHAR *transform, i
if (error_cond) FIXME( "ignoring error conditions\n" );
- db = msihandle2msiinfo( hdb, MSIHANDLETYPE_DATABASE ); - if (!db) - { - MSIHANDLE remote; - - if (!(remote = msi_get_remote(hdb))) - return ERROR_INVALID_HANDLE; - - WARN("MsiDatabaseApplyTransform not allowed during a custom action!\n"); - - return ERROR_SUCCESS; - } + if (!(db = msihandle2msiinfo(hdb, MSIHANDLETYPE_DATABASE))) + return ERROR_INVALID_HANDLE;
r = MSI_DatabaseApplyTransformW( db, transform, error_cond ); msiobj_release( &db->hdr ); diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index 9e9e2bf938..526c4a211d 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1128,7 +1128,7 @@ static void test_invalid_functions(MSIHANDLE hinst) todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
r = MsiDatabaseApplyTransformA(db, "bogus.mst", 0); - todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
r = MsiCreateTransformSummaryInfoA(db, db, "bogus.mst", 0, 0); todo_wine ok(hinst, r == ERROR_INSTALL_PACKAGE_OPEN_FAILED, "got %u\n", r);
Hi,
While running your changed tests, 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=49925
Your paranoid android.
=== w2008s64 (32 bit report) ===
msi: action: Timeout
=== w7u (32 bit report) ===
msi: action: Timeout
=== wxppro (32 bit report) ===
msi: custom.c:1134: Test failed: got 1620
Report errors: msi:install contains a misplaced failure message for custom
=== w2008s64 (task log) ===
Task errors: The task timed out
=== w7u (32 bit report) ===
msi: install: Timeout
=== w2008s64 (64 bit report) ===
msi: install: Timeout
=== w7u (32 bit report) ===
msi: msi: Timeout
Signed-off-by: Hans Leidekker hans@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/database.c | 13 ++----------- dlls/msi/tests/custom.c | 2 +- 2 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/dlls/msi/database.c b/dlls/msi/database.c index 1992661922..d039903944 100644 --- a/dlls/msi/database.c +++ b/dlls/msi/database.c @@ -1194,17 +1194,8 @@ UINT WINAPI MsiDatabaseExportW( MSIHANDLE handle, LPCWSTR szTable, TRACE("%x %s %s %s\n", handle, debugstr_w(szTable), debugstr_w(szFolder), debugstr_w(szFilename));
- db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE ); - if( !db ) - { - MSIHANDLE remote_database = msi_get_remote(handle); - if ( !remote_database ) - return ERROR_INVALID_HANDLE; - - WARN("MsiDatabaseExport not allowed during a custom action!\n"); - - return ERROR_SUCCESS; - } + if (!(db = msihandle2msiinfo(handle, MSIHANDLETYPE_DATABASE))) + return ERROR_INVALID_HANDLE;
r = MSI_DatabaseExport( db, szTable, szFolder, szFilename ); msiobj_release( &db->hdr ); diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index 526c4a211d..d9d4689c4e 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1135,7 +1135,7 @@ static void test_invalid_functions(MSIHANDLE hinst)
GetCurrentDirectoryA(sizeof(path), path); r = MsiDatabaseExportA(db, "Test", path, "bogus.idt"); - todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
r = MsiDatabaseImportA(db, path, "bogus.idt"); todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
Hi,
While running your changed tests, 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=49926
Your paranoid android.
=== w7u (32 bit report) ===
msi: action: Timeout
=== w1064 (64 bit report) ===
msi: action.c:6274: Test failed: Expected ERROR_SUCCESS, got 1618 action.c:6284: Test failed: Expected ERROR_SUCCESS, got 2 action.c:6285: Test failed: Key doesn't exist or wrong type action.c:6290: Test failed: Expected ERROR_SUCCESS, got 2 action.c:6291: Test failed: Key doesn't exist or wrong type action.c:6295: Test failed: Expected ERROR_SUCCESS, got 2 action.c:6296: Test failed: Key doesn't exist or wrong type action.c:6301: Test failed: Expected ERROR_SUCCESS, got 2 action.c:6302: Test failed: Key doesn't exist or wrong type action.c:6311: Test failed: Expected ERROR_SUCCESS, got 1605
=== wxppro (32 bit report) ===
msi: custom.c:1134: Test failed: got 1620
Report errors: msi:install contains a misplaced failure message for custom
=== w7u (32 bit report) ===
msi: install: Timeout
=== w7u (task log) ===
Task errors: The task timed out
=== w2008s64 (64 bit report) ===
msi: install: Timeout
=== w7u (32 bit report) ===
msi: msi: Timeout
Signed-off-by: Hans Leidekker hans@codeweavers.com
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/database.c | 13 ++----------- dlls/msi/tests/custom.c | 2 +- 2 files changed, 3 insertions(+), 12 deletions(-)
diff --git a/dlls/msi/database.c b/dlls/msi/database.c index d039903944..11ed27d9f2 100644 --- a/dlls/msi/database.c +++ b/dlls/msi/database.c @@ -870,17 +870,8 @@ UINT WINAPI MsiDatabaseImportW(MSIHANDLE handle, LPCWSTR szFolder, LPCWSTR szFil
TRACE("%x %s %s\n",handle,debugstr_w(szFolder), debugstr_w(szFilename));
- db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE ); - if( !db ) - { - MSIHANDLE remote_database = msi_get_remote( handle ); - if ( !remote_database ) - return ERROR_INVALID_HANDLE; - - WARN("MsiDatabaseImport not allowed during a custom action!\n"); - - return ERROR_SUCCESS; - } + if (!(db = msihandle2msiinfo(handle, MSIHANDLETYPE_DATABASE))) + return ERROR_INVALID_HANDLE;
r = MSI_DatabaseImport( db, szFolder, szFilename ); msiobj_release( &db->hdr ); diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index d9d4689c4e..b8da55e1ce 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1138,7 +1138,7 @@ static void test_invalid_functions(MSIHANDLE hinst) ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
r = MsiDatabaseImportA(db, path, "bogus.idt"); - todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
r = MsiDatabaseCommit(db); ok(hinst, r == ERROR_SUCCESS, "got %u\n", r);
Signed-off-by: Hans Leidekker hans@codeweavers.com
Hi,
While running your changed tests, 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=49927
Your paranoid android.
=== w7u (task log) ===
Task errors: The task timed out
=== w2008s64 (64 bit report) ===
msi: action: Timeout
=== wxppro (32 bit report) ===
msi: custom.c:1134: Test failed: got 1620
Report errors: msi:install contains a misplaced failure message for custom
=== w2008s64 (task log) ===
Task errors: The task timed out
=== w7u (task log) ===
Task errors: The task timed out
=== w2008s64 (64 bit report) ===
msi: install: Timeout
=== w7u (task log) ===
Task errors: The task timed out
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/dialog.c | 14 ++------------ dlls/msi/tests/custom.c | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/dlls/msi/dialog.c b/dlls/msi/dialog.c index a3e54815c0..153ff214d6 100644 --- a/dlls/msi/dialog.c +++ b/dlls/msi/dialog.c @@ -4216,19 +4216,9 @@ UINT WINAPI MsiEnableUIPreview( MSIHANDLE hdb, MSIHANDLE *phPreview )
TRACE("%d %p\n", hdb, phPreview);
- db = msihandle2msiinfo( hdb, MSIHANDLETYPE_DATABASE ); - if (!db) - { - MSIHANDLE remote_database = msi_get_remote( hdb ); - if (!remote_database) - return ERROR_INVALID_HANDLE; - - *phPreview = 0; - - WARN("MsiEnableUIPreview not allowed during a custom action!\n"); + if (!(db = msihandle2msiinfo(hdb, MSIHANDLETYPE_DATABASE))) + return ERROR_INVALID_HANDLE;
- return ERROR_FUNCTION_FAILED; - } preview = MSI_EnableUIPreview( db ); if (preview) { diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index b8da55e1ce..454966e914 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1150,7 +1150,7 @@ static void test_invalid_functions(MSIHANDLE hinst) ok(hinst, r == MSIDBSTATE_ERROR, "got %u\n", r);
r = MsiEnableUIPreview(db, &preview); - todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
sprintf(package_name, "#%u", db); r = MsiOpenPackageA(package_name, &package);
Signed-off-by: Hans Leidekker hans@codeweavers.com
Hi,
While running your changed tests, 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=49928
Your paranoid android.
=== w2008s64 (32 bit report) ===
msi: action: Timeout
=== w7u (task log) ===
Task errors: The task timed out
=== wxppro (32 bit report) ===
msi: custom.c:1134: Test failed: got 1620
Report errors: msi:install contains a misplaced failure message for custom
=== w2008s64 (32 bit report) ===
msi: install: Timeout
=== w7u (32 bit report) ===
msi: install: Timeout
=== w7u (32 bit report) ===
msi: msi: Timeout
=== w7u (task log) ===
Task errors: The task timed out
Signed-off-by: Zebediah Figura z.figura12@gmail.com --- dlls/msi/package.c | 14 ++------------ dlls/msi/tests/custom.c | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-)
diff --git a/dlls/msi/package.c b/dlls/msi/package.c index 563f55a123..490c687d78 100644 --- a/dlls/msi/package.c +++ b/dlls/msi/package.c @@ -1471,18 +1471,8 @@ UINT MSI_OpenPackageW(LPCWSTR szPackage, DWORD dwOptions, MSIPACKAGE **pPackage) if( szPackage[0] == '#' ) { handle = atoiW(&szPackage[1]); - db = msihandle2msiinfo( handle, MSIHANDLETYPE_DATABASE ); - if( !db ) - { - MSIHANDLE remote; - - if (!(remote = msi_get_remote(handle))) - return ERROR_INVALID_HANDLE; - - WARN("MsiOpenPackage not allowed during a custom action!\n"); - - return ERROR_FUNCTION_FAILED; - } + if (!(db = msihandle2msiinfo(handle, MSIHANDLETYPE_DATABASE))) + return ERROR_INVALID_HANDLE; } else { diff --git a/dlls/msi/tests/custom.c b/dlls/msi/tests/custom.c index 454966e914..43b8369b17 100644 --- a/dlls/msi/tests/custom.c +++ b/dlls/msi/tests/custom.c @@ -1154,7 +1154,7 @@ static void test_invalid_functions(MSIHANDLE hinst)
sprintf(package_name, "#%u", db); r = MsiOpenPackageA(package_name, &package); - todo_wine ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r); + ok(hinst, r == ERROR_INVALID_HANDLE, "got %u\n", r);
MsiCloseHandle(db); }
Signed-off-by: Hans Leidekker hans@codeweavers.com
Hi,
While running your changed tests, 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=49929
Your paranoid android.
=== w2008s64 (task log) ===
Task errors: The task timed out
=== w7u (32 bit report) ===
msi: action: Timeout
=== w2008s64 (64 bit report) ===
msi: action: Timeout
=== w1064 (64 bit report) ===
msi: action.c:6274: Test failed: Expected ERROR_SUCCESS, got 1618 action.c:6284: Test failed: Expected ERROR_SUCCESS, got 2 action.c:6285: Test failed: Key doesn't exist or wrong type action.c:6290: Test failed: Expected ERROR_SUCCESS, got 2 action.c:6291: Test failed: Key doesn't exist or wrong type action.c:6295: Test failed: Expected ERROR_SUCCESS, got 2 action.c:6296: Test failed: Key doesn't exist or wrong type action.c:6301: Test failed: Expected ERROR_SUCCESS, got 2 action.c:6302: Test failed: Key doesn't exist or wrong type action.c:6311: Test failed: Expected ERROR_SUCCESS, got 1605
=== wxppro (32 bit report) ===
msi: custom.c:1134: Test failed: got 1620
Report errors: msi:install contains a misplaced failure message for custom
=== w2008s64 (32 bit report) ===
msi: install: Timeout
=== w7u (32 bit report) ===
msi: install: Timeout
=== w7u (task log) ===
Task errors: The task timed out
=== w7u (task log) ===
Task errors: The task timed out
Hi,
While running your changed tests, 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=49923
Your paranoid android.
=== wvistau64 (32 bit report) ===
msi: action: Timeout
=== w7u (32 bit report) ===
msi: action: Timeout
=== w1064 (64 bit report) ===
msi: action.c:5676: Test failed: Expected ERROR_SUCCESS, got 1618 action.c:5679: Test failed: unexpected result 0 action.c:5681: Test failed: file not removed action.c:5682: Test failed: directory not removed custom.c:1625: Test failed: got 0 action.c:5714: Test failed: Expected ERROR_SUCCESS, got 1603 action.c:5716: Test failed: file not created action.c:5717: Test failed: file not created action.c:5719: Test failed: file not created action.c:5725: Test failed: file removed action.c:5730: Test failed: directory removed
Report errors: msi:action contains a misplaced failure message for custom
=== wxppro (32 bit report) ===
msi: custom.c:1134: Test failed: got 1620
Report errors: msi:install contains a misplaced failure message for custom
=== w2008s64 (32 bit report) ===
msi: install: Timeout
=== w7u (32 bit report) ===
msi: install: Timeout
=== w7u (32 bit report) ===
msi: msi: Timeout
=== w1064 (64 bit report) ===
msi: msi: Timeout