[tefmocheck] Skip passed tasks for `could not open file for writing`.

The error might appear as part of a test, which should show up as a test
failure instead. Only check for this error if the task failed.

Bug: 103197
Change-Id: Id395d684e5cb6c67b976777ce4a1f4bd4f2c13ae
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/693826
Fuchsia-Auto-Submit: Ina Huh <ihuh@google.com>
Commit-Queue: Ina Huh <ihuh@google.com>
Reviewed-by: Tamir Duberstein <tamird@google.com>
Commit-Queue: Auto-Submit <auto-submit@fuchsia-infra.iam.gserviceaccount.com>
diff --git a/tools/testing/tefmocheck/string_in_log_check.go b/tools/testing/tefmocheck/string_in_log_check.go
index fa658e3..12aa4bc 100644
--- a/tools/testing/tefmocheck/string_in_log_check.go
+++ b/tools/testing/tefmocheck/string_in_log_check.go
@@ -391,6 +391,9 @@
 		&stringInLogCheck{
 			String: "server canceled transfer: could not open file for writing",
 			Type:   swarmingOutputType,
+			// This error may appear as part of a test, so ignore unless it happens
+			// during device setup which will cause a task failure.
+			SkipPassedTask: true,
 		},
 		// For fxbug.dev/53101.
 		&stringInLogCheck{