You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
testing: unexpected top level test output belonging to a subtest #29755
changed the title [-]testing: unexpected outer test output belonging to a subtest[/-][+]testing: unexpected top level test output belonging to a subtest[/+]on Jan 15, 2019
From my not-yet-informed first read, it seems like the bug may be that converter.testName is used as event.Test. That value is a single field, not a stack, so when indentation drops back down the testName isn't being reset. converter.report seems to be a stack of event, which has a Name field.
Maybe testName could be removed and the value could be ready from report[-1]? (or we could add a new stack for testName if that won't work for some reason).
Anyone familiar with this code that might be able to confirm?
Activity
[-]testing: unexpected outer test output belonging to a subtest[/-][+]testing: unexpected top level test output belonging to a subtest[/+]bcmills commentedon Jan 29, 2019
CC @mpvl @josharian
As far as I can tell the indentation looks right. I suspect a
test2jsonbug.dnephin commentedon Sep 18, 2019
I ran into this bug as well. I started reading test2json for the first time.
From my not-yet-informed first read, it seems like the bug may be that
converter.testNameis used asevent.Test. That value is a single field, not a stack, so when indentation drops back down thetestNameisn't being reset.converter.reportseems to be a stack ofevent, which has aNamefield.Maybe
testNamecould be removed and the value could be ready fromreport[-1]? (or we could add a new stack for testName if that won't work for some reason).Anyone familiar with this code that might be able to confirm?
I can work on contributing a fix.
gopherbot commentedon Sep 20, 2019
Change https://golang.org/cl/196617 mentions this issue:
cmd/test2json: attribute output to the correct teststore test output by rootTestName->subTestNames->output
Workaround test2json bug causing missing test output
Workaround test2json bug causing missing test output
store test output by rootTestName->subTestNames->output
summary: mitigate test2json bug causing missing test output
store test output by rootTestName->subTestNames->output
summary: mitigate test2json bug causing missing test output
summary: mitigate test2json bug causing missing test output