Last Comment Bug 439925 - nsMsgCopyService::CopyMessages not working as intended in xpcshell tests on Mac OS X
: nsMsgCopyService::CopyMessages not working as intended in xpcshell tests on M...
Status: RESOLVED FIXED
:
Product: MailNews Core
Classification: Components
Component: Backend (show other bugs)
: Trunk
: PowerPC Mac OS X
: -- normal (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
:
Mentors:
Depends on:
Blocks: 436880
  Show dependency treegraph
 
Reported: 2008-06-18 04:22 PDT by Siddharth Agarwal [:sid0] (inactive)
Modified: 2008-07-31 04:30 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Test to check this, with a couple of message files (7.06 KB, text/plain)
2008-06-18 04:22 PDT, Siddharth Agarwal [:sid0] (inactive)
no flags Details
Log on Windows (test succeeds) (2.29 KB, text/plain)
2008-06-18 04:25 PDT, Siddharth Agarwal [:sid0] (inactive)
no flags Details
Log on Mac OS X (test fails) (2.15 KB, text/plain)
2008-06-18 04:29 PDT, Siddharth Agarwal [:sid0] (inactive)
no flags Details

Description Siddharth Agarwal [:sid0] (inactive) 2008-06-18 04:22:22 PDT
Created attachment 325531 [details]
Test to check this, with a couple of message files

While testing the unit test uploaded at bug 436880, Standard8 found that it failed on his OS X build. The problem was finally traced to the CopyMessages function in nsMsgCopyService seemingly misbehaving and not working correctly. The function works correctly on my Windows trunk build, but not on OS X. (Later, beckley confirmed the same on both Windows and OS X.)

When an array of one message is passed to the function, it works as expected. However, then there's an array of two messages, only the first message seems to be copied, and then duplicated, in the destination message folder.

I've attached a simple test here to check this. To test this, apply the patch (-p1) to trunk, then go to $objdir/mailnews/base/test and run |make && make check|.
Comment 1 Siddharth Agarwal [:sid0] (inactive) 2008-06-18 04:25:23 PDT
Created attachment 325532 [details]
Log on Windows (test succeeds)

This is from my trunk build on Windows Vista.

As can be seen, the source message IDs and the destination IDs are both unique.
Comment 2 Siddharth Agarwal [:sid0] (inactive) 2008-06-18 04:29:06 PDT
Created attachment 325533 [details]
Log on Mac OS X (test fails)

Thanks to Standard8 for providing the log.

The source message IDs seem to be fine, but the destination IDs are both the same, so the do_check_neq fails.

Standard8 also reported that the mbox had just one message in it, and not both.

(This hasn't been tested on Linux so far.)
Comment 3 Siddharth Agarwal [:sid0] (inactive) 2008-06-24 10:56:20 PDT
Fixed by attachments 326410 and 326411 in bug 436880.

Note You need to log in before you can comment on or make changes to this bug.