Closed Bug 1632115 Opened 11 months ago Closed 10 months ago

TEST-UNEXPECTED-FAIL | TestMailCookie.TestMailCookieMain | Value of: NS_SUCCEEDED(rv)

Categories

(Thunderbird :: General, defect, P5)

defect

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 77.0

People

(Reporter: intermittent-bug-filer, Assigned: mkmelin)

References

Details

(Keywords: intermittent-failure)

Attachments

(1 file, 2 obsolete files)

Assignee: nobody → mkmelin+mozilla
Status: NEW → ASSIGNED
See Also: → 1631565

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/7e71b9fa21f2
adjust gtest TestMailCookie.TestMailCookieMain for bug 1631565. rs=bustage-fix DONBTUILD

Status: ASSIGNED → RESOLVED
Closed: 11 months ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 77.0

Sigh, windows is still broken. I have no idea why that would be.

Status: RESOLVED → REOPENED
Resolution: FIXED → ---

I have no idea why that would be.

The problem is that nsMailboxService::NewChannel() fails when called by NewChannelFromURI() since mailbox://mail.co.uk/ is not a valid mailbox: URL, at least not on Windows.

[8916, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005 (NS_ERROR_FAILURE): file c:/mozilla-source/comm-central/comm/mailnews/base/util/nsMsgProtocol.cpp, line 193
[8916, Main Thread] WARNING: NS_ENSURE_SUCCESS(rv, rv) failed with result 0x80004005 (NS_ERROR_FAILURE): file c:/mozilla-source/comm-central/comm/mailnews/local/src/nsMailboxService.cpp, line 560
[8916, Main Thread] WARNING: NS_ENSURE_TRUE(aChannel) failed: file c:/mozilla-source/comm-central/netwerk/cookie/CookieService.cpp, line 365

What fails in nsMsgProtocol.cpp, line 193 is this call rv = GetFileFromURL(aURL, getter_AddRefs(file)); which is understandable since the file isn't there. I wonder how this passes on Mac/Linux.

I tried switching to imap: URLs but that doesn't work either since it checks for the existence of the server in the account manager. nntp: URLs don't work either.

So providing a real channel is hard since all our channel creation does some checking and you can't fake things any more.

I don't have a good idea right now other then to switch this somewhat esoteric test off on Windows. Rob knows how. Note that gTests already don't run on Mac due to bug 1581762.

I guess this would disable it.

Attachment #9143529 - Flags: review?(rob)

Hmm, wasn't there something more granular to just disable one test?

Comment on attachment 9143529 [details] [diff] [review]
bug1632115_disable_gtest_win.patch

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

You can prefix a test function name with DISABLED_ as mentioned here: https://github.com/google/googletest/blob/master/googletest/docs/faq.md#how-do-i-temporarily-disable-a-test
Though that would disable it on all platforms which sounds like it's not what the desired effect.

If you want to go crazy with it, you could do some #ifdef WINDOWS or whatever around it to only disable it on Windows.

Another option might be the GTEST_FILTER environment variable. It's set for all platforms so we only run mail tests rather than the whole mess of browser tests, but I could possibly set to exclude the failing test on Windows (maybe). I'd have to dig a little more.
Attachment #9143529 - Flags: review?(rob) → review+
Comment on attachment 9143529 [details] [diff] [review]
bug1632115_disable_gtest_win.patch

(In reply to Rob Lemley [:rjl] from comment #9)
> Though that would disable it on all platforms which sounds like it's not
> what the desired effect.

Well, now we suggest to switch off **all** GTests on Windows, right ... which sounds like it's not what the desired effect

> If you want to go crazy with it, you could do some #ifdef WINDOWS or whatever around it to only disable it on Windows.

I don't think that's crazy, that's what we need.
Attachment #9143529 - Flags: feedback-

With this ./mach gtest TestMailCookie.TestMailCookieMain still works at least locally. I'd assume it will fix it if the documentation is correct.

Attachment #9143529 - Attachment is obsolete: true
Attachment #9143882 - Flags: review?(rob)

Will fix the indention.

Comment on attachment 9143882 [details] [diff] [review]
bug1632115_disable_gtest_TestMailCookie.patch

I think the disabling needs to go around here: `TEST(TestMailCookie, TestMailCookieMain)`.

Ah yes.
Couldn't get the command line flag mentioned to work, but export GTEST_ALSO_RUN_DISABLED_TESTS=1works

Attachment #9143882 - Attachment is obsolete: true
Attachment #9143882 - Flags: review?(rob)
Attachment #9143884 - Flags: review?(rob)
Comment on attachment 9143884 [details] [diff] [review]
bug1632115_disable_gtest_TestMailCookie.patch

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

Works for me.
Attachment #9143884 - Flags: review?(rob) → review+

Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/62005c97509c
disable TestMailCookie on windows (faking a channel is needed, but hard to do). r=rjl

Status: REOPENED → RESOLVED
Closed: 11 months ago10 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.