Closed Bug 901678 Opened 11 years ago Closed 11 years ago

Permanent Orange: TEST-UNEXPECTED-FAIL | POP3pump.js | [Exception... (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.appendRelativePath]

Categories

(MailNews Core :: Build Config, defect)

All
Windows XP
defect
Not set
normal

Tracking

(thunderbird24 fixed, thunderbird25 fixed)

RESOLVED FIXED
Thunderbird 26.0
Tracking Status
thunderbird24 --- fixed
thunderbird25 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

(Keywords: intermittent-failure, regression)

Attachments

(1 file)

Seeing this on Aurora as tests are working there - its windows only, and a regression from switching pop3d.js to be a testing module.

https://tbpl.mozilla.org/php/getParsedLog.php?id=26176069&tree=Thunderbird-Try#error0

TEST-UNEXPECTED-FAIL | ../../../resources/POP3pump.js | [Exception... "Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsIFile.appendRelativePath]"  nsresult: "0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH)"  location: "JS frame :: resource://testing-common/mailnews/pop3d.js :: readFile :: line 46"  data: no] - See following stack:
JS frame :: ../../../resources/POP3pump.js :: _testNext :: line 171
JS frame :: ../../../resources/POP3pump.js :: run :: line 209
JS frame :: C:/talos-slave/test/build/xpcshell/tests/mailnews/base/test/unit/test_copyThenMoveManual.js :: getLocalMessages1 :: line 46
JS frame :: C:/talos-slave/test/build/xpcshell/tests/mailnews/base/test/unit/test_copyThenMoveManual.js :: doTest :: line 135
JS frame :: C:/talos-slave/test/build/xpcshell/tests/mailnews/base/test/unit/test_copyThenMoveManual.js :: createFilters :: line 39
JS frame :: C:/talos-slave/test/build/xpcshell/tests/mailnews/base/test/unit/test_copyThenMoveManual.js :: doTest :: line 135
JS frame :: C:/talos-slave/test/build/xpcshell/tests/mailnews/base/test/unit/test_copyThenMoveManual.js :: run_test :: line 123
JS frame :: C:\talos-slave\test\build\xpcshell\head.js :: _execute_test :: line 336
JS frame :: -e :: <TOP_LEVEL> :: line 1
native frame :: <unknown filename> :: <TOP_LEVEL> :: line 0
I've tried a couple of things including:

https://hg.mozilla.org/try-comm-central/rev/edadc22128d0

but haven't found a work around yet.

Joshua - any ideas?
Ok, appendRelativePath just doesn't like '..' in any form. Unsure why, there's one or two workarounds elsewhere, so I think we'll just do the same.
Assignee: nobody → mbanner
Attached patch The fixSplinter Review
Fix for relative paths on windows, basically we'll just have to process them manually. Passed on a local VM, pushed to try here:

https://tbpl.mozilla.org/?tree=Thunderbird-Try&rev=323191210240
Attachment #788084 - Flags: review?(Pidgeot18)
Comment on attachment 788084 [details] [diff] [review]
The fix

Review of attachment 788084 [details] [diff] [review]:
-----------------------------------------------------------------

Conditional r+:

::: mailnews/test/fakeserver/pop3d.js
@@ +40,5 @@
> +    // Windows doesn't allow '..' in appendRelativePath,
> +    // so we'll have to do this the long way.
> +    if (fileName.contains('/')) {
> +      let parts = fileName.split('/');
> +      for each (let part in parts) {

for (let part of parts)

@@ +50,5 @@
> +    }
> +    else {
> +      file.append("data");
> +      file.append(fileName);
> +    }

The code for Windows is not equivalent to the code for not-Windows. This worries me slightly, but if you make the documentation on this method indicate stricter requirements on fileName (chooses a file relative to cwd/data if only a filename is provided, otherwise chooses a file relative to cwd), then I could tolerate it.
Attachment #788084 - Flags: review?(Pidgeot18) → review+
Comment on attachment 788084 [details] [diff] [review]
The fix

[Triage Comment]
Taking onto other channels as well.
Attachment #788084 - Flags: approval-comm-beta+
Attachment #788084 - Flags: approval-comm-aurora+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: