From 703da53d9466063d68c5a7fdf73d71dd73a02c59 Mon Sep 17 00:00:00 2001 From: Eric Rahm Date: Mon, 1 Oct 2018 16:38:17 -0700 Subject: [PATCH] Bug 1409739 - Part 1: Accept SmokeDMD when filtering test DMD stacks. r=njn On some builds we only get 'SmokeDMD' references during testing rather than a full file path. This adds 'SmokeDMD' to the acceptable frame description list. --HG-- extra : source : 1192c15fc9347ccd6169dcb5bea81d7f2399e3fd extra : intermediate-source : d39c2dfcc7004a4736436c564de239ba68b20c03 extra : histedit_source : 5a75a20f5b88481c994597da81fdbc29186aba3d%2C3f60f2bfbe54ab3843d4b18d66296cd4aadf4a30 --- memory/replace/dmd/dmd.py | 6 ++++-- memory/replace/dmd/test/xpcshell.ini | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/memory/replace/dmd/dmd.py b/memory/replace/dmd/dmd.py index 390d2ef80b9e..47caa50800b4 100755 --- a/memory/replace/dmd/dmd.py +++ b/memory/replace/dmd/dmd.py @@ -332,7 +332,8 @@ def getDigestFromFile(args, inputFile): if args.filter_stacks_for_testing: # When running SmokeDMD.cpp, every stack trace should contain at # least one frame that contains 'DMD.cpp', from either |DMD.cpp| or - # |SmokeDMD.cpp|. (Or 'dmd.cpp' on Windows.) If we see such a + # |SmokeDMD.cpp|. (Or 'dmd.cpp' on Windows.) On builds without + # debuginfo we expect just |SmokeDMD|. If we see such a # frame, we replace the entire stack trace with a single, # predictable frame. There is too much variation in the stack # traces across different machines and platforms to do more precise @@ -340,7 +341,8 @@ def getDigestFromFile(args, inputFile): # stack fixing fails completely. for frameKey in frameKeys: frameDesc = frameTable[frameKey] - if 'DMD.cpp' in frameDesc or 'dmd.cpp' in frameDesc: + expected = ('DMD.cpp', 'dmd.cpp', 'SmokeDMD') + if any(ex in frameDesc for ex in expected): return [fmt.format(1, ': ... DMD.cpp ...')] # The frame number is always '#00' (see DMD.h for why), so we have to diff --git a/memory/replace/dmd/test/xpcshell.ini b/memory/replace/dmd/test/xpcshell.ini index df3aef27aeb9..d76bb414bec0 100644 --- a/memory/replace/dmd/test/xpcshell.ini +++ b/memory/replace/dmd/test/xpcshell.ini @@ -31,4 +31,4 @@ support-files = [test_dmd.js] dmd = true -skip-if = !(os=='linux' || os=='win' || os=='mac') +skip-if = !(os=='linux' || os=='mac' || (os=='win' && !pgo))