OLD | NEW |
| (Empty) |
1 package data | |
2 | |
3 import ( | |
4 "path/filepath" | |
5 "reflect" | |
6 "strings" | |
7 "testing" | |
8 | |
9 "go.skia.org/infra/fuzzer/go/common" | |
10 "go.skia.org/infra/go/testutils" | |
11 ) | |
12 | |
13 func TestParseReleaseDump(t *testing.T) { | |
14 testInput := testutils.MustReadFile("parse-catchsegv-release.dump") | |
15 trace := parseCatchsegvStackTrace(testInput) | |
16 expected := StackTrace{ | |
17 Frames: []StackTraceFrame{ | |
18 FullStackFrame("src/core/", "SkReadBuffer.cpp", "readFla
ttenable", 344), | |
19 FullStackFrame("src/core/", "SkReadBuffer.h", "readFlatt
enable", 130), | |
20 FullStackFrame("src/core/", "SkPictureData.cpp", "parseB
ufferTag", 498), | |
21 FullStackFrame("src/core/", "SkPictureData.cpp", "parseS
treamTag", 424), | |
22 FullStackFrame("src/core/", "SkPictureData.cpp", "parseS
tream", 580), | |
23 FullStackFrame("src/core/", "SkPicture.cpp", "CreateFrom
Stream", 153), | |
24 FullStackFrame("src/core/", "SkPictureData.cpp", "parseS
treamTag", 392), | |
25 FullStackFrame("src/core/", "SkPictureData.cpp", "parseS
tream", 580), | |
26 FullStackFrame("src/core/", "SkPicture.cpp", "CreateFrom
Stream", 153), | |
27 FullStackFrame("fuzzer_cache/src/", "parseskp.cpp", "too
l_main", 41), | |
28 }, | |
29 } | |
30 if !reflect.DeepEqual(expected, trace) { | |
31 t.Errorf("Expected %#v\nbut was %#v", expected, trace) | |
32 } | |
33 } | |
34 | |
35 func TestParseDebugDump(t *testing.T) { | |
36 testInput := testutils.MustReadFile("parse-catchsegv-debug.dump") | |
37 | |
38 trace := parseCatchsegvStackTrace(testInput) | |
39 | |
40 expected := StackTrace{ | |
41 Frames: []StackTraceFrame{ | |
42 FullStackFrame("src/core/", "SkReadBuffer.cpp", "readFla
ttenable", 343), | |
43 FullStackFrame("src/core/", "SkReadBuffer.h", "readFlatt
enable", 130), | |
44 FullStackFrame("src/core/", "SkReadBuffer.h", "readPathE
ffect", 136), | |
45 FullStackFrame("src/core/", "SkPaint.cpp", "unflatten",
1971), | |
46 FullStackFrame("src/core/", "SkReadBuffer.h", "readPaint
", 126), | |
47 FullStackFrame("src/core/", "SkPictureData.cpp", "parseB
ufferTag", 498), | |
48 FullStackFrame("src/core/", "SkPictureData.cpp", "parseS
treamTag", 424), | |
49 FullStackFrame("src/core/", "SkPictureData.cpp", "parseS
tream", 580), | |
50 FullStackFrame("src/core/", "SkPictureData.cpp", "Create
FromStream", 553), | |
51 FullStackFrame("src/core/", "SkPicture.cpp", "CreateFrom
Stream", 153), | |
52 FullStackFrame("src/core/", "SkPictureData.cpp", "parseS
treamTag", 392), | |
53 FullStackFrame("src/core/", "SkPictureData.cpp", "parseS
tream", 580), | |
54 FullStackFrame("src/core/", "SkPictureData.cpp", "Create
FromStream", 553), | |
55 FullStackFrame("src/core/", "SkPicture.cpp", "CreateFrom
Stream", 153), | |
56 FullStackFrame("src/core/", "SkPicture.cpp", "CreateFrom
Stream", 142), | |
57 FullStackFrame("fuzzer_cache/src/", "parseskp.cpp", "too
l_main", 41), | |
58 }, | |
59 } | |
60 | |
61 if !reflect.DeepEqual(expected, trace) { | |
62 t.Errorf("Expected %#v\nbut was %#v", expected, trace) | |
63 } | |
64 } | |
65 | |
66 func TestParsingEdgeCases(t *testing.T) { | |
67 // This is a made up dump that has the edge cases for parsing function n
ames. | |
68 testInput := testutils.MustReadFile("parse-catchsegv-edge.dump") | |
69 trace := parseCatchsegvStackTrace(testInput) | |
70 expected := StackTrace{ | |
71 Frames: []StackTraceFrame{ | |
72 FullStackFrame("src/codec/", "SkMasks.cpp", "convert_to_
8", 54), | |
73 FullStackFrame("src/codec/", "SkBmpMaskCodec.cpp", "deco
deRows", 93), | |
74 FullStackFrame("src/core/", "SkClipStack.cpp", "Element:
:updateBoundAndGenID", 483), | |
75 FullStackFrame("src/core/", "SkClipStack.cpp", "pushElem
ent", 719), | |
76 FullStackFrame("dm/", "DMSrcSink.cpp", "SKPSrc::draw", 7
51), | |
77 FullStackFrame("src/core/", "SkReader32.h", "eof", 38), | |
78 FullStackFrame("src/core/", "SkTaskGroup.cpp", "ThreadPo
ol::Wait", 88), | |
79 FullStackFrame("fuzz/", "fuzz.cpp", "fuzz_img", 110), | |
80 }, | |
81 } | |
82 | |
83 if !reflect.DeepEqual(expected, trace) { | |
84 t.Errorf("Expected %#v\nbut was %#v", expected, trace) | |
85 t.Errorf("Expected \n%s\nbut was \n%s", expected.String(), trace
.String()) | |
86 } | |
87 } | |
88 | |
89 func TestParseASANSingle(t *testing.T) { | |
90 testInput := testutils.MustReadFile("parse-asan-single.asan") | |
91 | |
92 trace := parseASANStackTrace(testInput) | |
93 | |
94 expected := StackTrace{ | |
95 Frames: []StackTraceFrame{ | |
96 FullStackFrame("src/codec/", "SkMasks.cpp", "convert_to_
8", 54), | |
97 FullStackFrame("src/codec/", "SkMaskSwizzler.cpp", "swiz
zle_mask24_to_n32_opaque", 93), | |
98 FullStackFrame("src/codec/", "SkBmpMaskCodec.cpp", "SkBm
pMaskCodec::decodeRows", 103), | |
99 FullStackFrame("third_party/externals/piex/src/", "piex.
cc", "piex::GetPreviewData", 59), | |
100 FullStackFrame("third_party/externals/piex/src/", "piex.
cc", "piex::GetPreviewData", 68), | |
101 FullStackFrame("fuzz/", "fuzz.cpp", "fuzz_img", 119), | |
102 FullStackFrame("fuzz/", "fuzz.cpp", "main", 53), | |
103 }, | |
104 } | |
105 | |
106 if !reflect.DeepEqual(expected, trace) { | |
107 t.Errorf("Expected %#v\nbut was %#v", expected, trace) | |
108 t.Errorf("Expected %s \n but was %s", expected.String(), trace.S
tring()) | |
109 } | |
110 } | |
111 | |
112 func TestParseASANDouble(t *testing.T) { | |
113 testInput := testutils.MustReadFile("parse-asan-double.asan") | |
114 | |
115 trace := parseASANStackTrace(testInput) | |
116 | |
117 expected := StackTrace{ | |
118 Frames: []StackTraceFrame{ | |
119 FullStackFrame("src/core/", "SkReader32.h", "SkReader32:
:readInt_asan", 57), | |
120 FullStackFrame("src/core/", "SkPicturePlayback.cpp", "Sk
PicturePlayback::handleOp", 151), | |
121 FullStackFrame("src/core/", "SkPicturePlayback.cpp", "Sk
PicturePlayback::draw", 111), | |
122 FullStackFrame("src/core/", "SkPicture.cpp", "SkPicture:
:Forwardport", 137), | |
123 FullStackFrame("src/core/", "SkPicture.cpp", "SkPicture:
:CreateFromStream", 154), | |
124 FullStackFrame("fuzz/", "fuzz.cpp", "fuzz_skp", 143), | |
125 FullStackFrame("fuzz/", "fuzz.cpp", "main", 54), | |
126 }, | |
127 } | |
128 | |
129 if !reflect.DeepEqual(expected, trace) { | |
130 t.Errorf("Expected %#v\nbut was %#v", expected, trace) | |
131 t.Errorf("Expected %s \n but was %s", expected.String(), trace.S
tring()) | |
132 } | |
133 } | |
134 | |
135 func TestParseEmptyStackTrace(t *testing.T) { | |
136 trace := parseCatchsegvStackTrace("") | |
137 | |
138 if !trace.IsEmpty() { | |
139 t.Errorf("Expected stacktrace to be empty but was %#v", trace) | |
140 } | |
141 } | |
142 | |
143 func stacktrace(file string) string { | |
144 return filepath.Join("stacktrace", file) | |
145 } | |
146 | |
147 func TestParseGCSPackage_Grey(t *testing.T) { | |
148 // Everything was successful or partially successful | |
149 g := GCSPackage{ | |
150 Debug: OutputFiles{ | |
151 Asan: testutils.MustReadFile(stacktrace("0grey_debug.a
san")), | |
152 Dump: "", | |
153 StdErr: testutils.MustReadFile(stacktrace("0grey_debug.e
rr")), | |
154 }, | |
155 Release: OutputFiles{ | |
156 Asan: testutils.MustReadFile(stacktrace("0grey_release
.asan")), | |
157 Dump: "", | |
158 StdErr: testutils.MustReadFile(stacktrace("0grey_release
.err")), | |
159 }, | |
160 FuzzCategory: "skcodec", | |
161 } | |
162 | |
163 result := ParseGCSPackage(g) | |
164 expectedDebugFlags := TerminatedGracefully | |
165 expectedReleaseFlags := TerminatedGracefully | |
166 if result.Debug.Flags != expectedDebugFlags { | |
167 t.Errorf("Parsed Debug flags were wrong. Expected %s, but was %
s", expectedDebugFlags.String(), result.Debug.Flags.String()) | |
168 } | |
169 if result.Release.Flags != expectedReleaseFlags { | |
170 t.Errorf("Parsed Release flags were wrong. Expected %s, but was
%s", expectedReleaseFlags.String(), result.Release.Flags.String()) | |
171 } | |
172 if !result.Debug.StackTrace.IsEmpty() { | |
173 t.Errorf("Should have had empty debug stacktrace, but was %s", r
esult.Debug.StackTrace.String()) | |
174 } | |
175 if !result.Release.StackTrace.IsEmpty() { | |
176 t.Errorf("Should have had empty release stacktrace, but was %s",
result.Release.StackTrace.String()) | |
177 } | |
178 } | |
179 | |
180 // For the following tests, I added the suffix _asan and _dump to the top stackt
race line in the | |
181 // raw files, so we can tell where the stacktrace is being parsed from easily, i
f there are two | |
182 // possibilities. The analysis should try to reason about the AddressSanitizer o
utput, with a | |
183 // fallback to the catchsegv debug/err output. | |
184 | |
185 func TestParseGCSPackage_GlobalStackOverflow(t *testing.T) { | |
186 // Both debug/release crashed with a stackoverflow. | |
187 g := GCSPackage{ | |
188 Debug: OutputFiles{ | |
189 Asan: testutils.MustReadFile(stacktrace("1bad_debug.as
an")), | |
190 Dump: "", | |
191 StdErr: testutils.MustReadFile(stacktrace("1grey_debug.e
rr")), | |
192 }, | |
193 Release: OutputFiles{ | |
194 Asan: testutils.MustReadFile(stacktrace("1bad_release.
asan")), | |
195 Dump: "", | |
196 StdErr: testutils.MustReadFile(stacktrace("1grey_release
.err")), | |
197 }, | |
198 FuzzCategory: "skcodec", | |
199 } | |
200 | |
201 result := ParseGCSPackage(g) | |
202 expectedDebugFlags := ASANCrashed | ASAN_GlobalBufferOverflow | |
203 expectedReleaseFlags := ASANCrashed | ASAN_GlobalBufferOverflow | |
204 if result.Debug.Flags != expectedDebugFlags { | |
205 t.Errorf("Parsed Debug flags were wrong. Expected %s, but was %
s", expectedDebugFlags.String(), result.Debug.Flags.String()) | |
206 } | |
207 if result.Release.Flags != expectedReleaseFlags { | |
208 t.Errorf("Parsed Release flags were wrong. Expected %s, but was
%s", expectedReleaseFlags.String(), result.Release.Flags.String()) | |
209 } | |
210 // There was no catchsegv dump, so only one possibility for stacktrace f
or both of these. | |
211 if result.Debug.StackTrace.IsEmpty() { | |
212 t.Errorf("Should not have had empty debug stacktrace") | |
213 } | |
214 if result.Release.StackTrace.IsEmpty() { | |
215 t.Errorf("Should not have had empty release stacktrace") | |
216 } | |
217 } | |
218 | |
219 func TestParseGCSPackage_AssertDuringRendering(t *testing.T) { | |
220 // Debug assert hit. Release heap buffer overflow | |
221 g := GCSPackage{ | |
222 Debug: OutputFiles{ | |
223 Asan: testutils.MustReadFile(stacktrace("2bad_debug.as
an")), | |
224 Dump: testutils.MustReadFile(stacktrace("2bad_debug.du
mp")), | |
225 StdErr: testutils.MustReadFile(stacktrace("2bad_debug.er
r")), | |
226 }, | |
227 Release: OutputFiles{ | |
228 Asan: testutils.MustReadFile(stacktrace("2bad_release.
asan")), | |
229 Dump: "", | |
230 StdErr: testutils.MustReadFile(stacktrace("2grey_release
.err")), | |
231 }, | |
232 FuzzCategory: "skpicture", | |
233 } | |
234 | |
235 result := ParseGCSPackage(g) | |
236 expectedDebugFlags := ASANCrashed | ClangCrashed | AssertionViolated | |
237 expectedReleaseFlags := ASANCrashed | ASAN_HeapBufferOverflow | SKPICTUR
E_DuringRendering | |
238 if result.Debug.Flags != expectedDebugFlags { | |
239 t.Errorf("Parsed Debug flags were wrong. Expected %s, but was %
s", expectedDebugFlags.String(), result.Debug.Flags.String()) | |
240 } | |
241 if result.Release.Flags != expectedReleaseFlags { | |
242 t.Errorf("Parsed Release flags were wrong. Expected %s, but was
%s", expectedReleaseFlags.String(), result.Release.Flags.String()) | |
243 } | |
244 stack := result.Debug.StackTrace | |
245 if stack.IsEmpty() { | |
246 t.Errorf("Should not have had empty debug stacktrace") | |
247 } else { | |
248 if !strings.HasSuffix(stack.Frames[0].FunctionName, "_asan") { | |
249 t.Errorf("Should have parsed stacktrace from asan: \n%s"
, stack.String()) | |
250 } | |
251 } | |
252 // There was no catchsegv dump, so only one possibility for stacktrace. | |
253 if result.Release.StackTrace.IsEmpty() { | |
254 t.Errorf("Should not have had empty release stacktrace") | |
255 } | |
256 } | |
257 | |
258 func TestParseGCSPackage_UseAfterFree(t *testing.T) { | |
259 // Debug ClangCrashed. Release heap use after free. | |
260 g := GCSPackage{ | |
261 Debug: OutputFiles{ | |
262 Asan: testutils.MustReadFile(stacktrace("3grey_debug.a
san")), | |
263 Dump: testutils.MustReadFile(stacktrace("3bad_debug.du
mp")), | |
264 StdErr: "", | |
265 }, | |
266 Release: OutputFiles{ | |
267 Asan: testutils.MustReadFile(stacktrace("3bad_release.
asan")), | |
268 Dump: testutils.MustReadFile(stacktrace("3bad_release.
dump")), | |
269 StdErr: "", | |
270 }, | |
271 FuzzCategory: "skpicture", | |
272 } | |
273 | |
274 result := ParseGCSPackage(g) | |
275 expectedDebugFlags := ClangCrashed | |
276 expectedReleaseFlags := ASANCrashed | ClangCrashed | ASAN_HeapUseAfterFr
ee | |
277 if result.Debug.Flags != expectedDebugFlags { | |
278 t.Errorf("Parsed Debug flags were wrong. Expected %s, but was %
s", expectedDebugFlags.String(), result.Debug.Flags.String()) | |
279 } | |
280 if result.Release.Flags != expectedReleaseFlags { | |
281 t.Errorf("Parsed Release flags were wrong. Expected %s, but was
%s", expectedReleaseFlags.String(), result.Release.Flags.String()) | |
282 } | |
283 stack := result.Debug.StackTrace | |
284 // There was no asan dump, so only one possibility for stacktrace. | |
285 if stack.IsEmpty() { | |
286 t.Errorf("Should not have had empty debug stacktrace") | |
287 } | |
288 stack = result.Release.StackTrace | |
289 if stack.IsEmpty() { | |
290 t.Errorf("Should not have had empty release stacktrace") | |
291 } else { | |
292 if !strings.HasSuffix(stack.Frames[0].FunctionName, "_asan") { | |
293 t.Errorf("Should have parsed stacktrace from asan: \n%s"
, stack.String()) | |
294 } | |
295 } | |
296 } | |
297 | |
298 func TestParseGCSPackage_TimeOut(t *testing.T) { | |
299 // Everything timed out on analysis | |
300 g := GCSPackage{ | |
301 Debug: OutputFiles{ | |
302 Asan: testutils.MustReadFile(stacktrace("4bad_debug.as
an")), | |
303 Dump: "", | |
304 StdErr: testutils.MustReadFile(stacktrace("4bad_debug.er
r")), | |
305 }, | |
306 Release: OutputFiles{ | |
307 Asan: testutils.MustReadFile(stacktrace("4bad_release.
asan")), | |
308 Dump: "", | |
309 StdErr: testutils.MustReadFile(stacktrace("4bad_release.
err")), | |
310 }, | |
311 FuzzCategory: "skcodec", | |
312 } | |
313 | |
314 result := ParseGCSPackage(g) | |
315 expectedDebugFlags := TimedOut | |
316 expectedReleaseFlags := TimedOut | |
317 if result.Debug.Flags != expectedDebugFlags { | |
318 t.Errorf("Parsed Debug flags were wrong. Expected %s, but was %
s", expectedDebugFlags.String(), result.Debug.Flags.String()) | |
319 } | |
320 if result.Release.Flags != expectedReleaseFlags { | |
321 t.Errorf("Parsed Release flags were wrong. Expected %s, but was
%s", expectedReleaseFlags.String(), result.Release.Flags.String()) | |
322 } | |
323 if !result.Debug.StackTrace.IsEmpty() { | |
324 t.Errorf("Should have had empty debug stacktrace, but was %s", r
esult.Debug.StackTrace.String()) | |
325 } | |
326 if !result.Release.StackTrace.IsEmpty() { | |
327 t.Errorf("Should have had empty release stacktrace, but was %s",
result.Release.StackTrace.String()) | |
328 } | |
329 } | |
330 | |
331 func TestParseGCSPackage_BadAlloc(t *testing.T) { | |
332 // Everything was a bad:alloc | |
333 g := GCSPackage{ | |
334 Debug: OutputFiles{ | |
335 Asan: testutils.MustReadFile(stacktrace("5bad_debug.as
an")), | |
336 Dump: "", | |
337 StdErr: testutils.MustReadFile(stacktrace("5bad_debug.er
r")), | |
338 }, | |
339 Release: OutputFiles{ | |
340 Asan: testutils.MustReadFile(stacktrace("5bad_release.
asan")), | |
341 Dump: "", | |
342 StdErr: testutils.MustReadFile(stacktrace("5bad_release.
err")), | |
343 }, | |
344 FuzzCategory: "skcodec", | |
345 } | |
346 | |
347 result := ParseGCSPackage(g) | |
348 expectedDebugFlags := BadAlloc | ASANCrashed | ClangCrashed | |
349 expectedReleaseFlags := BadAlloc | ASANCrashed | ClangCrashed | |
350 if result.Debug.Flags != expectedDebugFlags { | |
351 t.Errorf("Parsed Debug flags were wrong. Expected %s, but was %
s", expectedDebugFlags.String(), result.Debug.Flags.String()) | |
352 } | |
353 if result.Release.Flags != expectedReleaseFlags { | |
354 t.Errorf("Parsed Release flags were wrong. Expected %s, but was
%s", expectedReleaseFlags.String(), result.Release.Flags.String()) | |
355 } | |
356 if result.Debug.StackTrace.IsEmpty() { | |
357 t.Errorf("Should not have had empty debug stacktrace") | |
358 } | |
359 if result.Release.StackTrace.IsEmpty() { | |
360 t.Errorf("Should not have had empty release stacktrace") | |
361 } | |
362 } | |
363 | |
364 func TestParseGCSPackage_EmptyStacktrace(t *testing.T) { | |
365 // According to AddressSanitizer, both crashed while trying to report a
bug. | |
366 g := GCSPackage{ | |
367 Debug: OutputFiles{ | |
368 Asan: testutils.MustReadFile(stacktrace("6bad_debug.as
an")), | |
369 Dump: testutils.MustReadFile(stacktrace("6bad_debug.du
mp")), | |
370 StdErr: testutils.MustReadFile(stacktrace("6bad_debug.er
r")), | |
371 }, | |
372 Release: OutputFiles{ | |
373 Asan: testutils.MustReadFile(stacktrace("6bad_release.
asan")), | |
374 Dump: testutils.MustReadFile(stacktrace("6bad_release.
dump")), | |
375 StdErr: testutils.MustReadFile(stacktrace("6bad_release.
err")), | |
376 }, | |
377 FuzzCategory: "skcodec", | |
378 } | |
379 | |
380 result := ParseGCSPackage(g) | |
381 expectedDebugFlags := NoStackTrace | ASANCrashed | ClangCrashed | |
382 expectedReleaseFlags := NoStackTrace | ASANCrashed | ClangCrashed | |
383 if result.Debug.Flags != expectedDebugFlags { | |
384 t.Errorf("Parsed Debug flags were wrong. Expected %s, but was %
s", expectedDebugFlags.String(), result.Debug.Flags.String()) | |
385 } | |
386 if result.Release.Flags != expectedReleaseFlags { | |
387 t.Errorf("Parsed Release flags were wrong. Expected %s, but was
%s", expectedReleaseFlags.String(), result.Release.Flags.String()) | |
388 } | |
389 if !result.Debug.StackTrace.IsEmpty() { | |
390 t.Errorf("Should have had empty debug stacktrace") | |
391 } | |
392 if !result.Release.StackTrace.IsEmpty() { | |
393 t.Errorf("Should have had empty release stacktrace") | |
394 } | |
395 } | |
396 | |
397 func TestParseGCSPackage_SKAbort(t *testing.T) { | |
398 // Both hit SK_ABORT somewhere. | |
399 g := GCSPackage{ | |
400 Debug: OutputFiles{ | |
401 Asan: testutils.MustReadFile(stacktrace("7bad_debug.as
an")), | |
402 Dump: "", | |
403 StdErr: testutils.MustReadFile(stacktrace("7bad_debug.er
r")), | |
404 }, | |
405 Release: OutputFiles{ | |
406 Asan: testutils.MustReadFile(stacktrace("7bad_release.
asan")), | |
407 Dump: "", | |
408 StdErr: testutils.MustReadFile(stacktrace("7bad_release.
err")), | |
409 }, | |
410 FuzzCategory: "skpicture", | |
411 } | |
412 | |
413 result := ParseGCSPackage(g) | |
414 expectedDebugFlags := SKAbortHit | ASANCrashed | ClangCrashed | |
415 expectedReleaseFlags := SKAbortHit | ASANCrashed | ClangCrashed | |
416 if result.Debug.Flags != expectedDebugFlags { | |
417 t.Errorf("Parsed Debug flags were wrong. Expected %s, but was %
s", expectedDebugFlags.String(), result.Debug.Flags.String()) | |
418 } | |
419 if result.Release.Flags != expectedReleaseFlags { | |
420 t.Errorf("Parsed Release flags were wrong. Expected %s, but was
%s", expectedReleaseFlags.String(), result.Release.Flags.String()) | |
421 } | |
422 if len(result.Debug.StackTrace.Frames) != 1 { | |
423 t.Fatalf("Should have filled in top frame of trace") | |
424 } | |
425 expected := FullStackFrame("src/core/", "SkPictureData.cpp", common.UNKN
OWN_FUNCTION, 360) | |
426 if frame := result.Debug.StackTrace.Frames[0]; frame.LineNumber != expec
ted.LineNumber || frame.FunctionName != expected.FunctionName || frame.FileName
!= expected.FileName || frame.PackageName != expected.PackageName { | |
427 t.Errorf("Top frame was wrong. Expected: %#v, but was %#v", exp
ected, frame) | |
428 } | |
429 | |
430 if len(result.Release.StackTrace.Frames) != 1 { | |
431 t.Errorf("Should not have had empty release stacktrace") | |
432 } | |
433 if frame := result.Release.StackTrace.Frames[0]; frame.LineNumber != exp
ected.LineNumber || frame.FunctionName != expected.FunctionName || frame.FileNam
e != expected.FileName || frame.PackageName != expected.PackageName { | |
434 t.Errorf("Top frame was wrong. Expected: %#v, but was %#v", exp
ected, frame) | |
435 } | |
436 } | |
OLD | NEW |