Closed Bug 1339196 Opened 8 years ago Closed 8 years ago

xpcshell-test fails on taskcluster-worker

Categories

(Taskcluster :: Workers, defect, P1)

x86_64
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wcosta, Assigned: wcosta)

References

Details

User Story

This happens because we have the environment variable HOME, but don't set the new home using dscl command.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=28e4a8fa74d4&selectedJob=76441535
No description provided.
Assignee: nobody → wcosta
Status: NEW → ASSIGNED
Commits pushed to master at https://github.com/taskcluster/taskcluster-worker https://github.com/taskcluster/taskcluster-worker/commit/ca4c8e15c825d4170707514a1b306016b5848cc1 Bug 1339196: Make $HOME and os/user.Lookup().HomeDir equal. r=jonasfj We can get user's home directory either but looking at the $HOME environment variable or read the OS specific user database. As is common for scripts to look for home directory just by reading $HOME environment variable, our first approach was to not change user database and modify the $HOME variable to a temporary directory when spawning the task command without creating a new user. This way, we could clobber the task just by removing the $HOME directory. This approach worked for most tests but xpcshell. Particularly, it checks if $HOME matches user database, making this test to fail. As we may not be allowed to change even the current user home directory, we fix this by using the user's true home directory. This implies that we only need to create a temporary directory if we create a new user to run the task, otherwise it is not necessary. We also need to explicitly set the correct owner of the context file. https://github.com/taskcluster/taskcluster-worker/commit/8ce5497bfd9baf8faa28a97e9588b403f29009e3 Merge pull request #161 from walac/master Bug 1339196: Make $HOME and os/user.Lookup().HomeDir equal. r=jonasfj
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Component: Worker → Workers
You need to log in before you can comment on or make changes to this bug.