filestorageSuite.TestRelativePath fails because s390x host /tmp is different
Bug #1568179 reported by
Curtis Hovey
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
Reed O'Brien |
Bug Description
As seen at
http://
filestorageSuit
filestorage_
c.Assert(url, gc.Equals, utils.MakeFileU
... obtained string = "file:/
... expected string = "file:/
Changed in juju-core: | |
milestone: | 2.0-beta4 → 2.0.0 |
Changed in juju-core: | |
assignee: | nobody → Reed O'Brien (reedobrien) |
Changed in juju-core: | |
status: | Triaged → In Progress |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
milestone: | 2.0.0 → 2.0-beta8 |
status: | Fix Committed → Fix Released |
affects: | juju-core → juju |
Changed in juju: | |
milestone: | 2.0-beta8 → none |
milestone: | none → 2.0-beta8 |
To post a comment you must log in.
IIUC s390x doesn't really have a proper disk. So we have one mounted for CI purposes at `/home` and we have a tempdir there -- `/home/tmp`. To make things work we currently have a symlink from `/tmp` => `/home/tmp`.
So `TMPDIR` = `/home` in the environment but is actually `/home/tmp`.
The test does the following:
Create some subdirectories
dir := c.MkDir() // => /tmp/gocheck-00000/ filepath. Join(dir, "a", "b", "c"), os.ModePerm)
err := os.MkdirAll(
...
We then move into the sub-directory
err = os.Chdir( filepath. Join(dir, "a", "b", "c"))
...
The following reader will use filepath.Abs to get the path
reader, err := filestorage. NewFileStorageR eader(" ../..")
And returns the absolute path in the call to URL.
url, err := reader.URL("") // => file:// home/tmp/ gocheck- 0000/a
Now url does not equal a file url made from dir:
c.Assert(url, gc.Equals, utils.MakeFileU RL(dir) +"/a") // => FAIL
I think this will fix itself if we set the TMPDIR variable to /home/tmp in CI test runs on s390x -- or wherever we symlink /tmp to.