Open Bug 481369 Opened 12 years ago Updated 8 years ago

nsDirEnumerator::HasMoreElements may throw NS_ERROR_FAILURE [nsISimpleEnumerator.hasMoreElements] enumerating nsIFile.directoryEntries on Mac running test_bug478086.js

Categories

(Core :: XPCOM, defect)

x86
macOS
defect
Not set
normal

Tracking

()

People

(Reporter: asqueella, Unassigned)

References

Details

(Keywords: intermittent-failure, Whiteboard: [test is disabled on non-Windows] )

see bug 478086 comment 13.

This test fails intermittently (I couldn't reproduce): 
http://mxr.mozilla.org/mozilla-central/source/xpcom/tests/unit/test_bug478086.js?raw=1

isWindows in the test is false (otherwise initWithPath() would fail), so this is an issue with nsDirEnumerator. Either this is a bug, which can be fixed, or a note should be added to the docs, warning that enumerating that enumeration may fail under certain (specific) circumstances.
Example build output from
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1245194590.1245197718.31411.gz

TEST-PASS | /builds/moz2_slave/mozilla-1.9.1-macosx-unittest/build/objdir/_tests/xpcshell/xpcom/unit/test_bug374754.js | test passed
TEST-UNEXPECTED-FAIL | /builds/moz2_slave/mozilla-1.9.1-macosx-unittest/build/objdir/_tests/xpcshell/xpcom/unit/test_bug478086.js | test failed (with xpcshell return code: 0), see following log:
  >>>>>>>
  ### XPCOM_MEM_LEAK_LOG defined -- logging leaks to /var/folders/Xh/XhBjGXEcHs0yUSzvR91WE++++TM/-Tmp-/runxpcshelltests_leaks.log
TEST-INFO | (xpcshell/head.js) | test 1 pending
TEST-PASS | /builds/moz2_slave/mozilla-1.9.1-macosx-unittest/build/objdir/_tests/xpcshell/xpcom/unit/test_bug478086.js | [run_test : 19] true == true
TEST-PASS | /builds/moz2_slave/mozilla-1.9.1-macosx-unittest/build/objdir/_tests/xpcshell/xpcom/unit/test_bug478086.js | [run_test : 22] -1 == -1
TEST-PASS | /builds/moz2_slave/mozilla-1.9.1-macosx-unittest/build/objdir/_tests/xpcshell/xpcom/unit/test_bug478086.js | [run_test : 22] -1 == -1
TEST-UNEXPECTED-FAIL | (xpcshell/head.js) | [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsISimpleEnumerator.hasMoreElements]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: /builds/moz2_slave/mozilla-1.9.1-macosx-unittest/build/objdir/_tests/xpcshell/xpcom/unit/test_bug478086.js :: run_test :: line 20"  data: no]
Blocks: 438871
Summary: nsDirEnumerator::HasMoreElements may throw NS_ERROR_FAILURE [nsISimpleEnumerator.hasMoreElements] enumerating nsIFile.directoryEntries on Mac → nsDirEnumerator::HasMoreElements may throw NS_ERROR_FAILURE [nsISimpleEnumerator.hasMoreElements] enumerating nsIFile.directoryEntries on Mac running test_bug478086.js
Whiteboard: [orange]
Huh, so the fix from bug 478086 comment 15 wasn't checked into the 1.9.1 tree? It probably should be, since there's no value in keeping this test running on Mac.
http://tinderbox.mozilla.org/showlog.cgi?log=Firefox3.5/1248751085.1248756612.20759.gz
OS X 10.5.2 mozilla-1.9.1 unit test on 2009/07/27 20:18:05
Whiteboard: [orange] → [On m-1.9.2+, test is disabled on non-Windows] [orange]
(In reply to comment #3)
> Huh, so the fix from bug 478086 comment 15 wasn't checked into the 1.9.1 tree?

Done. (You need to request c-n for that too...)

As this bug seems to be MacOSX specific, you probably should re-enable the test on Linux.
status1.9.1: --- → ?
Flags: wanted1.9.2?
Whiteboard: [On m-1.9.2+, test is disabled on non-Windows] [orange] → [test is disabled on non-Windows] [orange]
status1.9.1: ? → ---
Flags: wanted1.9.2?
Whiteboard: [test is disabled on non-Windows] [orange] → [test is disabled on non-Windows]
You need to log in before you can comment on or make changes to this bug.