Closed Bug 1504073 Opened 6 years ago Closed 6 years ago

JS coverage files are locked and can't be removed while the process is in execution

Categories

(Testing :: Code Coverage, enhancement)

enhancement
Not set
normal

Tracking

(firefox65 fixed)

RESOLVED FIXED
mozilla65
Tracking Status
firefox65 --- fixed

People

(Reporter: marco, Assigned: marco)

References

Details

Attachments

(2 files)

For per-test coverage, after startup and before running a test, we need to flush and remove the coverage files. The LCovRuntime is currently initialized when a Runtime is created. The initialization creates and opens a file (without writing anything in it), which makes the removal fail on Windows (as the file is open, it can't be removed).
I'm not sure this is actually needed, in my local testing it wasn't, but since it could be depending on timing it's better to be safe than sorry.
Attachment #9021994 - Flags: review?(nfroyd)
Attachment #9021994 - Flags: review?(nfroyd) → review+
Attachment #9021992 - Flags: review?(nicolas.b.pierron) → review+
Pushed by mcastelluccio@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/3d14a1201277 Close output stream for flushing JS coverage data after we're done writing. r=froydnj https://hg.mozilla.org/integration/mozilla-inbound/rev/8d667ad8e5aa Don't create lcov output file as soon as the runtime is created, but only when we actually have to write lcov data out. r=nbp
Backed out for SM build bustages: Push with failures: https://treeherder.mozilla.org/#/jobs?repo=mozilla-inbound&resultStatus=busted&fromchange=8d667ad8e5aad0da4007060712fbdb056613f7b8&tochange=8adb7ae128fae57c88b6ea4efbfd45f81735f4c9&selectedJob=209819496 Failure log: https://treeherder.mozilla.org/logviewer.html#?job_id=209819496&repo=mozilla-inbound&lineNumber=6918 Backout link: https://hg.mozilla.org/integration/mozilla-inbound/rev/8adb7ae128fae57c88b6ea4efbfd45f81735f4c9 [task 2018-11-05T13:37:09.850Z] TEST-PASS | js/src/jit-test/tests/basic/getprop.js | Success (code 0, args "") [0.2 s] [task 2018-11-05T13:37:09.851Z] {"action": "test_start", "jitflags": "", "pid": 19600, "source": "jittests", "test": "basic/getprop.js", "thread": "main", "time": 1541425029.6968908} [task 2018-11-05T13:37:09.851Z] {"action": "test_end", "extra": {"jitflags": "", "pid": 19600}, "jitflags": "", "message": "Success", "pid": 19600, "source": "jittests", "status": "PASS", "test": "basic/getprop.js", "thread": "main", "time": 1541425029.850874} [task 2018-11-05T13:37:09.861Z] /builds/worker/workspace/build/src/js/src/jit-test/tests/basic/functionnames.js:7:5 Error: Assertion failed: got "Foo", expected "Foo</<" [task 2018-11-05T13:37:09.861Z] Stack: [task 2018-11-05T13:37:09.861Z] assertName@/builds/worker/workspace/build/src/js/src/jit-test/tests/basic/functionnames.js:7:5 [task 2018-11-05T13:37:09.861Z] @/builds/worker/workspace/build/src/js/src/jit-test/tests/basic/functionnames.js:39:1 [task 2018-11-05T13:37:09.862Z] Exit code: 3 [task 2018-11-05T13:37:09.862Z] FAIL - basic/functionnames.js [task 2018-11-05T13:37:09.862Z] TEST-UNEXPECTED-FAIL | js/src/jit-test/tests/basic/functionnames.js | /builds/worker/workspace/build/src/js/src/jit-test/tests/basic/functionnames.js:7:5 Error: Assertion failed: got "Foo", expected "Foo</<" (code 3, args "") [0.2 s] [task 2018-11-05T13:37:09.862Z] {"action": "test_start", "jitflags": "", "pid": 19589, "source": "jittests", "test": "basic/functionnames.js", "thread": "main", "time": 1541425029.690886} [task 2018-11-05T13:37:09.862Z] {"action": "test_end", "extra": {"jitflags": "", "pid": 19589}, "jitflags": "", "message": "/builds/worker/workspace/build/src/js/src/jit-test/tests/basic/functionnames.js:7:5 Error: Assertion failed: got \"Foo\", expected \"Foo</<\"", "pid": 19589, "source": "jittests", "status": "FAIL", "test": "basic/functionnames.js", "thread": "main", "time": 1541425029.86242} [task 2018-11-05T13:37:09.862Z] INFO exit-status : 3 [task 2018-11-05T13:37:09.863Z] INFO timed-out : False [task 2018-11-05T13:37:09.863Z] INFO stderr 2> /builds/worker/workspace/build/src/js/src/jit-test/tests/basic/functionnames.js:7:5 Error: Assertion failed: got "Foo", expected "Foo</<" [task 2018-11-05T13:37:09.863Z] INFO stderr 2> Stack: [task 2018-11-05T13:37:09.863Z] INFO stderr 2> assertName@/builds/worker/workspace/build/src/js/src/jit-test/tests/basic/functionnames.js:7:5 [task 2018-11-05T13:37:09.863Z] INFO stderr 2> @/builds/worker/workspace/build/src/js/src/jit-test/tests/basic/functionnames.js:39:1 [task 2018-11-05T13:37:09.881Z] TEST-PASS | js/src/jit-test/tests/basic/globalGet.js | Success (code 0, args "") [0.1 s]
Flags: needinfo?(mcastelluccio)
Pushed by mcastelluccio@mozilla.com: https://hg.mozilla.org/integration/mozilla-inbound/rev/76afad09223d Close output stream for flushing JS coverage data after we're done writing. r=froydnj https://hg.mozilla.org/integration/mozilla-inbound/rev/6eedb075c902 Don't create lcov output file as soon as the runtime is created, but only when we actually have to write lcov data out. r=nbp
Flags: needinfo?(mcastelluccio)
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: