Closed Bug 472004 Opened 17 years ago Closed 17 years ago

Interactive mode for xpcshell tests not functional

Categories

(Core :: General, defect)

x86
macOS
defect
Not set
major

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: whimboo, Unassigned)

References

Details

(Keywords: dogfood, regression)

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2a1pre) Gecko/20090104 Minefield/3.2a1pre ID:20090104004409 Starting xpcshell tests with check-interactive doesn't work. There is no prompt as described on MDC. The tests stopped immediately with some errors, e.g. for test_privatebrowsing.js: make SOLO_FILE=test_privatebrowsing.js -C toolkit/components/downloads/test/ check-interactive test_privatebrowsing.js: *** Throwing trying to get CurProcD *** Throwing trying to get MozBinD
Summary: interactive mode → Interactive mode for xpcshell tests not functional
This is a regression, right? Please flag the bug it's a regression from?
Keywords: regression
Blocks: 404513
Severity: normal → major
(In reply to comment #1) > This is a regression, right? Please flag the bug it's a regression from? I don't know. Probably Shawn can help out here? Finding the regression range will not be easy because a lot of local building is necessary to check the interactive mode.
Boris, or can I just rebuild the xpcshell folders for testing? How would the make command look like?
So, I spent some time trying to figure this out before. I backed out all the jit changes here: http://hg.mozilla.org/mozilla-central/log/9f497b1505d2/tools/test-harness/xpcshell-simple/test_one.sh None of the jit changes there caused it. And I started to go through and try xpcshell, but something else more important ended up coming up, so I don't even recall if I got anywhere with that.
I don't know of a way to just rebuild the xpcshell stuff offhand.
hg bisect would probably help the regression hunting... (I don't have time to do that though) :/
Blocks: 468705
I'm moving this to Core::General so I can request blocking on this. This is killing me (I'm tired of printf debugging)
Component: TUnit → General
Keywords: dogfood
Product: Testing → Core
QA Contact: tunit → general
Flags: blocking1.9.1?
I just tested this with FF3.1a1. test_privatebrowsing.js didn't exist then, but I was able to reproduce this with test_resume.js. So this goes back a ways. Has anyone looked at 3.0 builds? Also, since this code is obstensibly being called from C++ code, have you considered nsIDebug.break? http://mxr.mozilla.org/mozilla-central/source/xpcom/base/nsDebugImpl.cpp#126
Reading over the test code, the only way prop could be CurProcD is if nsDirectoryService.cpp called it. Looking a little further, why is the test using the nsIProperties interface on the directory service and not nsIDirectoryServiceProvider? http://mxr.mozilla.org/mozilla-central/source/xpcom/io/nsDirectoryService.h#52 http://mxr.mozilla.org/mozilla-central/source/xpcom/io/nsIDirectoryService.idl dirSvc.get seems wrong - it looks like it should be using dirSvc.getFile.
I claim the head_download_manager.js code is incorrectly written. If I change over to using the nsIDirectoryServiceProvider interface and dirSvc.getFile, the error for CurProcD goes away, and I have only the error for MozBinD.
That's not relevant to this bug though, as any test (storage, places, download manager) that I run fails to wait for me to run _execute_test(), and then never finishes. The "exceptions" thrown in comment 0 are also not relevant. They are properly caught, but still end up dumping out to the console.
(In reply to comment #11) > any test that I run fails to wait for me to run _execute_test(), and then never finishes. Is this a duplicate of bug 384339, then?
no, because the run_test() function is running too and no prompt is given.
Flags: blocking1.9.1? → blocking1.9.1-
This WFM on Mac: hiny-thing:obj-firefox-libxul luser$ make -C toolkit/mozapps/downloads/tests/ check-interactive SOLO_FILE=test_unspecified_arguments.js NATIVE_TOPSRCDIR='/Users/luser/build/mozilla-central' TOPSRCDIR='/Users/luser/build/mozilla-central' ../../../../dist/bin/xpcshell -j -s -f /Users/luser/build/mozilla-central/testing/xpcshell/head.js -f ../../../../_tests/xpcshell-simple/test_downloads//unit/test_unspecified_arguments.js -f /Users/luser/build/mozilla-central/testing/xpcshell/tail.js 2>&1 test_unspecified_arguments.js: js> _execute_test() *** test pending *** test finished *** exiting *** PASS *** js> Am I missing something to reproduce this?
I built just yesterday, and I don't get a prompt. Maybe something went in overnight, but it doesn't not work for me.
Oh neat - the console just isn't displaying the js> command line bits at the right time it would seem: 23 obj-i386-apple-darwin9.6.0 $ make -C toolkit/mozapps/downloads/tests/ check-interactive SOLO_FILE=test_unspecified_arguments.js NATIVE_TOPSRCDIR='/Code/moz/central/mozilla' TOPSRCDIR='/Code/moz/central/mozilla' ../../../../dist/bin/xpcshell -j -s -f /Code/moz/central/mozilla/testing/xpcshell/head.js -f ../../../../_tests/xpcshell-simple/test_downloads//unit/test_unspecified_arguments.js -f /Code/moz/central/mozilla/testing/xpcshell/tail.js 2>&1 _execute_test() test_unspecified_arguments.js: js> *** test pending *** test finished *** exiting *** PASS *** quit() js> WARNING: nsExceptionService ignoring thread destruction after shutdown: file /Code/moz/central/mozilla/xpcom/base/nsExceptionService.cpp, line 194 recorder: started(2), aborted(0), completed(2), different header(0), trees trashed(0), slot promoted(0), unstable loop variable(2), breaks(0), returns(0), unstableInnerCalls(0) monitor: triggered(4), exits(4), type mismatch(0), global mismatch(0) nsStringStats => mAllocCount: 2488 => mReallocCount: 3 => mFreeCount: 2488 => mShareCount: 99 => mAdoptCount: 13 => mAdoptFreeCount: 13 grep: ../../../../_tests/xpcshell-simple/test_downloads//unit/test_unspecified_arguments.js.log: No such file or directory /Code/moz/central/mozilla/testing/xpcshell/test_one.sh: line 145: [: too many arguments PASS
WORKSFORME per comment 16
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
Not worth checking for a regression range.
You need to log in before you can comment on or make changes to this bug.