Port bug 1772930 to Thunderbird - comm/chat/components/src/test/test_logger.js | Starting test_appendToFileHeader is failing
Categories
(Thunderbird :: Upstream Synchronization, task)
Tracking
(thunderbird_esr102 unaffected)
Tracking | Status | |
---|---|---|
thunderbird_esr102 | --- | unaffected |
People
(Reporter: mkmelin, Assigned: mkmelin)
References
Details
(Keywords: intermittent-failure)
Attachments
(2 files, 1 obsolete file)
+++ This bug was initially created as a clone of Bug #1772930 +++
Some porting of at least https://hg.mozilla.org/mozilla-central/rev/7e712d8f5d3e needed.
comm/chat/components/src/test/test_logger.js | Starting test_appendToFileHeader
[task 2022-11-23T01:18:06.662Z] 01:18:06 INFO - Unexpected exception NoModificationAllowedError: Refusing to overwrite the file at /tmp/xpc-profile-kd65x8ba/headerTestFile.txt
[task 2022-11-23T01:18:06.662Z] 01:18:06 INFO - Specify mode: "overwrite"
to allow overwriting the destination
[task 2022-11-23T01:18:06.662Z] 01:18:06 INFO - _do_main@/builds/worker/workspace/build/tests/xpcshell/head.js:238:6
[task 2022-11-23T01:18:06.663Z] 01:18:06 INFO - _execute_test@/builds/worker/workspace/build/tests/xpcshell/head.js:588:5
Assignee | ||
Updated•1 year ago
|
Comment 1•1 year ago
|
||
Maybe this check that's failing?
https://searchfox.org/comm-central/rev/bc947827a7df614d5e49fffe0026bd5a030b1a93/chat/components/src/logger.sys.mjs#91
Assignee | ||
Comment 2•1 year ago
|
||
Yes, making it const mode = aCreate ? "overwrite" : "append";
instead fixes the test failure.
But I'm not sure that's correct. The test seems to test unreasonable behavior really - https://searchfox.org/comm-central/rev/b175fe607e2b841970c7f6c34e636ef1bcb26c22/chat/components/src/test/test_logger.js#283-286
Assignee | ||
Comment 3•1 year ago
|
||
Given this is only used with create true in startNewFile(), perhaps it's reasonable.
Perhaps even better to just remove the whole appendToFile function... but leaving it for now.
Updated•1 year ago
|
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/fe4df9e8f1f8
Port bug 1772930 to Thunderbird - comm/chat/components/src/test/test_logger.js | Starting test_appendToFileHeader is failing. rs=#bustage-fix
Assignee | ||
Comment 5•1 year ago
|
||
Pushed as bustage fix. Martin, please check it out once you're back.
Comment 6•1 year ago
|
||
Responding as "spare time chat peer" here. That is almost certainly the wrong fix, since that part of code is never supposed to overwrite existing files. However, we're expecting some files to already exist sometimes, which is why there's error handling ignoring the overwrite error in some cases. What I tried to point out, was that the detection that it was an overwrite error was likely wrong and had changed in that patch.
Assignee | ||
Comment 7•1 year ago
|
||
Well, that's what I'm saying, the test is testing very dubious behavior (that it can write with create twice and nothing bad would happen). I don't have any reason to think it happens in real usage.
Comment 8•1 year ago
|
||
It can, due to the filenames being timestamp based. You can also see the same failure in browser_logs.js
Assignee | ||
Updated•1 year ago
|
Comment 9•1 year ago
|
||
Assignee | ||
Comment 10•1 year ago
|
||
Updated•1 year ago
|
Assignee | ||
Updated•1 year ago
|
Comment 11•1 year ago
|
||
Pushed by mkmelin@iki.fi:
https://hg.mozilla.org/comm-central/rev/0c1b14c0b7b2
Better fix for appendToFile with create and file existing. r=freaktechnik
Comment hidden (Intermittent Failures Robot) |
Description
•