Closed
Bug 784888
Opened 13 years ago
Closed 1 year ago
Test for bug 674742 to prevent dataloss regression due to folder compact
Categories
(MailNews Core :: Backend, defect)
MailNews Core
Backend
Tracking
(Not tracked)
RESOLVED
INVALID
People
(Reporter: hiro, Unassigned)
References
(Depends on 1 open bug)
Details
(Whiteboard: [patchlove])
Attachments
(4 obsolete files)
Bug 674742 causes dataloss. It should be tested.
This test needs a stub of nsIFile (the patch for bug 784870).
Updated•13 years ago
|
Severity: normal → major
Summary: Test for bug 674742 → Test for bug 674742 to prevent dataloss regression due to folder compact
| Reporter | ||
Comment 1•13 years ago
|
||
The test should also check the content of the folder equals after compaction. I will post a new test with the approach that the target file/directory make read-only.
| Reporter | ||
Comment 2•13 years ago
|
||
Changing dependency.
The test depend on the patch for bug 784870 since the result of nsIMsgFolderCompactor.compact should be checked in the test.
| Reporter | ||
Comment 3•13 years ago
|
||
This is a try.
Unfortunately making the target file read-only does not work well at all. It can work no errors!
This patch tries to make the parent directory of the target read-only. It gets NS_ERROR_FILE_ACCESS_DENIED at CreateUnique in nsFolderCompactState::Init().
Sadly the failure result does not return, so this test hangs...
I will open a new bug for this hang.
| Reporter | ||
Comment 4•13 years ago
|
||
I am sorry that I posted the patch before qrefresh.
Attachment #654867 -
Attachment is obsolete: true
| Reporter | ||
Comment 5•13 years ago
|
||
(In reply to Hiroyuki Ikezoe (:hiro) from comment #3)
> This patch tries to make the parent directory of the target read-only. It
> gets NS_ERROR_FILE_ACCESS_DENIED at CreateUnique in
> nsFolderCompactState::Init().
> Sadly the failure result does not return, so this test hangs...
>
> I will open a new bug for this hang.
Filed bug 785274.
Depends on: 785274
| Reporter | ||
Comment 6•13 years ago
|
||
Yay! Now the test with nsIFileStub works fine without any patch against mozilla-central.
| Reporter | ||
Comment 7•13 years ago
|
||
Mark, now I'd recommend the second test even if it needs the stub for nsIFile. I will maintain the stub code as possible.
| Reporter | ||
Updated•12 years ago
|
Attachment #654944 -
Attachment is obsolete: true
| Reporter | ||
Updated•12 years ago
|
Attachment #654868 -
Attachment is obsolete: true
| Reporter | ||
Comment 8•12 years ago
|
||
I can write a new test code after bug 786936 is closed.
Depends on: 786936
Updated•10 years ago
|
Assignee: hiikezoe → nobody
Status: ASSIGNED → NEW
Whiteboard: [patchlove]
Comment 9•7 years ago
|
||
an example of where our compact tests are substandard
Updated•3 years ago
|
Comment 11•1 year ago
|
||
Yes, I think so... but they are larger issues: our testing of outside-the-app I/O failures (disk, network, whatever) is pretty awful at the moment.
I think it's worth another more comprehensive attempt, so I just wrote up Bug 1897667.
Flags: needinfo?(benc)
Updated•1 year ago
|
You need to log in
before you can comment on or make changes to this bug.
Description
•