Closed Bug 1314378 Opened 3 years ago Closed 3 years ago

Port TestStartupCache to gtest

Categories

(Core :: XPCOM, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla53
Tracking Status
firefox53 --- fixed

People

(Reporter: benjamin, Assigned: benjamin)

References

Details

Attachments

(2 files)

TestStartupCache is currently a standalone test, which will not be possible any more when the XPCOM glue is gone. It should be ported to a gtest.

As part of this, I'm also going to remove some startupcache telemetry which I'm sure nobody is using and is of dubious value at all.
No longer blocks: 1299187
Comment on attachment 8807159 [details]
Bug 1314378 part A - remove startupcache telemetry of dubious value.

https://reviewboard.mozilla.org/r/90418/#review90186
Attachment #8807159 - Flags: review?(nfroyd) → review+
Comment on attachment 8807160 [details]
Bug 1314378 part B - port TestStartupCache to gtest,

https://reviewboard.mozilla.org/r/90420/#review90212

::: startupcache/test/TestStartupCache.cpp:66
(Diff revision 1)
> +{
> +  nsresult rv = NS_GetSpecialDirectory(NS_OS_TEMP_DIR, getter_AddRefs(mSCFile));
> +  mSCFile->AppendNative(NS_LITERAL_CSTRING("test-startupcache.tmp"));
> +  nsAutoCString path;
> +  mSCFile->GetNativePath(path);
> +  char* env = PR_smprintf("MOZ_STARTUP_CACHE=%s", path.get()); // leak

Does this need some sort of annotation for ASan/LSan?

This is kind of gross, but given that we already have the environment variable support...
Attachment #8807160 - Flags: review?(nfroyd) → review+
Do we run ASAN/LSAN on gtests? I guess MOZ_LSAN_INTENTIONALLY_LEAK_OBJECT wouldn't hurt.
(In reply to Benjamin Smedberg [:bsmedberg] from comment #5)
> Do we run ASAN/LSAN on gtests? I guess MOZ_LSAN_INTENTIONALLY_LEAK_OBJECT
> wouldn't hurt.

We run ASan, but I think LSan is disabled there. I'd be surprised if we didn't leak a bunch of things in these tests, and I can't recall anybody doing the work to fix it up.
Pushed by bsmedberg@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/419e1a311337
part A - remove startupcache telemetry of dubious value. r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/4585a7b6f3ce
part B - port TestStartupCache to gtest, r=froydnj
Pushed by bsmedberg@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/52cfc93236f0
Build bustage fixup from bug 1314378 and bug 1314955 - remove things from the whitelist which are no longer built, r=lumpy on a CLOSED TREE
Sorry had to back out these also because there are bustages after backed out bug 1314955
Flags: needinfo?(benjamin)
Backout by ihsiao@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/4ab3e15efcfe
Backed out changeset 52cfc93236f0 to fix the bustage after backed out bug 1314955
https://hg.mozilla.org/integration/mozilla-inbound/rev/03614ff20ee0
Backed out changeset 4585a7b6f3ce 
https://hg.mozilla.org/integration/mozilla-inbound/rev/87b4c375fe75
Backed out changeset 419e1a311337
Pushed by bsmedberg@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6578aec20296
part A - remove startupcache telemetry of dubious value. r=froydnj
https://hg.mozilla.org/integration/mozilla-inbound/rev/ee8798338529
part B - port TestStartupCache to gtest, r=froydnj
https://hg.mozilla.org/mozilla-central/rev/6578aec20296
https://hg.mozilla.org/mozilla-central/rev/ee8798338529
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla53
Flags: needinfo?(benjamin)
You need to log in before you can comment on or make changes to this bug.