tests: Don't print log messages on stdout

A parser of test results doesn't expect to see any extra messages.

PiperOrigin-RevId: 298966577
This commit is contained in:
Andrei Vagin
2020-03-04 16:16:35 -08:00
committed by gVisor bot
parent 4f43d5ecad
commit 80b40bbb06
2 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -451,7 +451,7 @@ func TestRandom(t *testing.T) {
}
}
fmt.Printf("Testing filters: %v", syscallRules)
t.Logf("Testing filters: %v", syscallRules)
instrs, err := BuildProgram([]RuleSet{
RuleSet{
Rules: syscallRules,
+2 -2
View File
@@ -333,13 +333,13 @@ func TestJobControlSignalRootContainer(t *testing.T) {
// file. Writes after a certain point will block unless we drain the
// PTY, so we must continually copy from it.
//
// We log the output to stdout for debugabilitly, and also to a buffer,
// We log the output to stderr for debugabilitly, and also to a buffer,
// since we wait on particular output from bash below. We use a custom
// blockingBuffer which is thread-safe and also blocks on Read calls,
// which makes this a suitable Reader for WaitUntilRead.
ptyBuf := newBlockingBuffer()
tee := io.TeeReader(ptyMaster, ptyBuf)
go io.Copy(os.Stdout, tee)
go io.Copy(os.Stderr, tee)
// Start the container.
if err := c.Start(conf); err != nil {