MCPcopy Create free account
hub / github.com/maruel/panicparse / testPanicRace

Function testPanicRace

stack/context_test.go:1867–1967  ·  view source on GitHub ↗
(t *testing.T, s *Snapshot, b *bytes.Buffer, ppDir string)

Source from the content-addressed store, hash-verified

1865}
1866
1867func testPanicRace(t *testing.T, s *Snapshot, b *bytes.Buffer, ppDir string) {
1868 if s.RemoteGOROOT != "" {
1869 t.Fatalf("RemoteGOROOT is %q", s.RemoteGOROOT)
1870 }
1871 if b.String() != "GOTRACEBACK=all\n" {
1872 t.Fatalf("output: %q", b.String())
1873 }
1874 want := []*Goroutine{
1875 {
1876 Signature: Signature{
1877 State: "running",
1878 CreatedBy: Stack{
1879 Calls: []Call{
1880 newCallLocal(
1881 "main.panicRace",
1882 Args{},
1883 pathJoin(ppDir, "main.go"),
1884 151,
1885 ),
1886 newCallLocal(
1887 "main.main",
1888 Args{},
1889 pathJoin(ppDir, "main.go"),
1890 76,
1891 ),
1892 },
1893 },
1894 Stack: Stack{
1895 Calls: []Call{
1896 newCallLocal(
1897 "main.panicDoRaceRead",
1898 Args{},
1899 pathJoin(ppDir, "main.go"),
1900 150),
1901 newCallLocal(
1902 "main.panicRace.func2",
1903 Args{},
1904 pathJoin(ppDir, "main.go"),
1905 135),
1906 },
1907 },
1908 },
1909 RaceAddr: pointer,
1910 },
1911 {
1912 Signature: Signature{
1913 State: "running",
1914 CreatedBy: Stack{
1915 Calls: []Call{
1916 newCallLocal(
1917 "main.panicRace",
1918 Args{},
1919 pathJoin(ppDir, "main.go"),
1920 151,
1921 ),
1922 newCallLocal(
1923 "main.main",
1924 Args{},

Callers

nothing calls this directly

Calls 4

pathJoinFunction · 0.85
similarGoroutinesFunction · 0.85
newCallLocalFunction · 0.70
StringMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…