Patrick Ohly

Results 1006 comments of Patrick Ohly

I tried to reproduce it, but so far without success.

Here's an example: https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/116354/pull-kubernetes-integration/1633336232408780800 ``` k8s.io/kubernetes/vendor/k8s.io/apiextensions-apiserver/test/integration: TestChangeCRD {Failed === RUN TestChangeCRD testserver.go:250: Resolved testserver package path to: "/home/prow/go/src/k8s.io/kubernetes/_output/local/go/src/k8s.io/kubernetes/vendor/k8s.io/apiextensions-apiserver/pkg/cmd/server/testing" testserver.go:139: runtime-config=map[api/all:true] testserver.go:140: Starting apiextensions-apiserver on port 34503... I0308 06:04:08.847174 90307 serving.go:342]...

Here's a potential solution: - Add Error[f]/Fatal[f] wrappers in k/k/test/utils/ktesting which add `[FAILED]` as message prefix. - Replace all existing calls with that. - Forbid the use of testing.T/B.Error through...

/cc @dims as you originally wrote [prunexml.go](https://github.com/kubernetes/kubernetes/blob/master/cmd/prune-junit-xml/prunexml.go).

Alternative: write a linter which requires `[FAILED]` to be the common prefix of all error messages. The wrapper approach might make it harder for "go vet" to detect incorrect `t.Fatalf`...

`go test -failure-prefix="[FAILED] "` - yes, that would be nice.

I posted about it here: https://groups.google.com/g/golang-nuts/c/fQrZ1lKRWzo

If there's no comment, I can create an issue.

We get JUnit XML with separate failure + log output only for E2E tests with Ginkgo. You are right, there is a `-json` in https://github.com/kubernetes/kubernetes/blob/c67953a2d0255c8c4f5e315b93f28ab599c428e5/hack/make-rules/test.sh#L148. However, in a `go test`...

JSON doesn't help. There's no indication there either that a certain output is a test failure. That's because `t.Error` = `t.Log + t.Fail`. ```console $ cat test/test_test.go package test import...