Issue 36 in omaha: install_self_unittest_no_xml_parser unit tests fail on Windows 7 as non-admin

8 views
Skip to first unread message

om...@googlecode.com

unread,
Jan 10, 2012, 7:25:56 AM1/10/12
to omah...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 36 by ben.chal...@red-gate.com:
install_self_unittest_no_xml_parser unit tests fail on Windows 7 as
non-admin
http://code.google.com/p/omaha/issues/detail?id=36

What steps will reproduce the problem?
1. Build as non-admin on Windows 7

What is the expected output? What do you see instead?
Expect build to succeed, but the install_self_unittest_no_xml_parser unit
tests fail (these run automatically as part of the build).

What version of the product are you using? On what operating system?
r109 on Windows 7.

Please provide any additional information below.
I believe that this failure is spurious.

The tests check that HasXmlParser() fails when the registry is redirected
with RegOverridePredefKey(), because the MSXML library needs to read
registry keys that no longer exist when the registry is redirected.

However, when running as non-admin on Windows 7, the registry is not fully
redirected. Crucially, the accesses that would have caused MSXML to fail
are not redirected, and so HasXmlParser() does not fail.

I've created a minimal reproduction and attached it to this issue, along
with the logs produced by procmon when running as admin and non-admin.

I've also created a patch which simply ignores the tests if the user is not
an admin.

Attachments:
xmlunittests.patch 3.1 KB
main.cpp 1.6 KB
notadmin-succeeded.CSV 41.3 KB
admin-failed.CSV 7.4 KB

om...@googlecode.com

unread,
Jan 10, 2012, 7:29:58 AM1/10/12
to omah...@googlegroups.com

Comment #1 on issue 36 by ben.chal...@red-gate.com:
install_self_unittest_no_xml_parser unit tests fail on Windows 7 as
non-admin
http://code.google.com/p/omaha/issues/detail?id=36

I believe this user had the same issue:
http://groups.google.com/group/omaha-discuss/browse_thread/thread/9823c152cec8e78d .

om...@googlecode.com

unread,
Jan 10, 2012, 7:34:01 AM1/10/12
to omah...@googlegroups.com

Comment #2 on issue 36 by ben.chal...@red-gate.com:

om...@googlecode.com

unread,
Mar 16, 2012, 3:48:39 PM3/16/12
to omah...@googlegroups.com
Updates:
Status: WontFix

Comment #3 on issue 36 by ryan...@google.com:

install_self_unittest_no_xml_parser unit tests fail on Windows 7 as
non-admin
http://code.google.com/p/omaha/issues/detail?id=36

A large number of the unit tests explicitly require that they be run as an
admin (i.e. from an elevated command prompt). At the moment, too many of
them depend on the ability to temporarily redirect registry hives.

We've got a work item to consider refactoring unit tests at some point in
the future to not use registry redirection, but for now, sticking to
running them as admin (or patching all such tests to not run when
non-admin) is suggested. Thank you for the report, though!

Reply all
Reply to author
Forward
0 new messages