One option of course would be to disable/ignore these particular tests. I don’t understand what they are testing well enough to know if they reflect significant defects in functionality.
That previous log was a Debian schroot on my bionic laptop. I ran the build on a debian porter box to see if the ubuntu kernel was a factor and lo and behold the apparmor tests pass. The wrapping ones still fail though.
The wrapping ones are due to a mismatch in the version of go-flags. The tests could be changed to use testutil.EqualsWrapped if getting the right go-flags is not an option (but note the generated manpage will probably be buggy, as that was the main thing fixed by the go-flags version bump).