Closed Bug 1448197 Opened 5 years ago Closed 3 years ago

Rewrite Marionette test for the Safe Mode policy

Categories

(Firefox :: Enterprise Policies, enhancement, P5)

enhancement

Tracking

()

RESOLVED WONTFIX

People

(Reporter: Felipe, Assigned: mkaply)

References

Details

Attachments

(1 obsolete file)

We should clean up this test addressing the comments made by Henrik on bug 1440573 comment 50.
Blocks: 1440573
Please note that this test also causes another set of perma failures for our new Windows workers on TaskCluster:

https://treeherder.mozilla.org/#/jobs?repo=try&author=pmoore@mozilla.com&selectedJob=169866847&filter-searchStr=marionette

Here details from the log viewer:
https://treeherder.mozilla.org/logviewer.html#?job_id=169866859&repo=try&lineNumber=1397-1402

> 14:11:52    ERROR -  TEST-UNEXPECTED-ERROR | testing\marionette\harness\marionette_harness\tests\unit\test_cli_arguments.py TestCommandLineArguments.test_safe_mode_blocked_by_policy | WindowsError: [Error 5] Access is denied
> 14:11:52     INFO -  Traceback (most recent call last):
> 14:11:52     INFO -    File "Z:\task_1521814095\build\venv\lib\site-packages\marionette_harness\marionette_test\testcases.py", line 159, in run
> 14:11:52     INFO -      testMethod()
> 14:11:52     INFO -    File "Z:\task_1521814095\build\tests\marionette\tests\testing\marionette\harness\marionette_harness\tests\unit\test_cli_arguments.py", line 51, in test_safe_mode_blocked_by_policy
> 14:11:52     INFO -      reg_policies = winreg.OpenKeyEx(winreg.HKEY_CURRENT_USER, "SOFTWARE\\Policies", 0, winreg.KEY_WRITE)

Pete, as you mentioned in the email we don't allow that yet, and it would need a fix for the Windows worker?
Flags: needinfo?(pmoore)
Blocks: 1399401
Flags: needinfo?(pmoore)
I'm on PTO this week, but ideally it is preferred if individual tests do not require system changes (such as custom ACLs to be enacted) in order to run. If they are necessary, we can apply them, but it adds to the complexity of system set-up. Many thanks!
Felipe, can you please add details so that we know if such privileges are necessary? Thanks.
Flags: needinfo?(felipc)
Regarding the location of the test, it would be great if we can move it to a better place. Mn jobs are really for unit tests only, and we should not continue to clutter it even more. Would it be ok for you to move it to firefox-ui functional tests? We could add a new subfolder like "policy" under 

https://dxr.mozilla.org/mozilla-central/source/testing/firefox-ui/tests/functional/
Pushed by felipc@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/5c8cbf2a5088
Backout Marionette policy test that should be rewritten. r=backout test-only
I backed out that test from mozilla-central (and didn't uplift it to beta), so that we can properly rewrite it.
Flags: needinfo?(felipc)
Keywords: leave-open
Summary: Clean up Marionette test for Safe Mode → Rewrite Marionette test for the Safe Mode policy
No longer blocks: 1399401
Priority: -- → P5
The leave-open keyword is there and there is no activity for 6 months.
:Felipe, maybe it's time to close this bug?
Flags: needinfo?(felipc)
The bug is still valid, so I'm just gonna remove the leave-open keyword. The cset that landed here was a backout, and the leave-open was added just to avoid this bug getting closed at the time.
Flags: needinfo?(felipc)
Keywords: leave-open
Assignee: nobody → mozilla

This is what the test should look like, but I don't understand how it will work.

Writing to software/policies requires admin privileges. Does our test framework have that?

I'm going to WONTFIX this. We can't do the admin privileges we need to run this test.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
Attachment #9111736 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.