       "initial",
       checkDiagnostics: checkDiagnostics,
       extraArguments: extraArguments,
-      expecting: [
-        // Leave off the part after the colon because it varies on Linux:
-        // MacOS: The operation could not be completed. (TSCBasic.FileSystemError error 3.).
-        // Linux: The operation couldn’t be completed. (TSCBasic.FileSystemError error 3.)
-        .enablingCrossModule,
-        .cannotReadBuildRecord,
-        .disablingIncrementalCannotReadBuildRecord,
-        .createdGraphFromSwiftdeps,
-        .findingBatchingCompiling("main", "other"),
-        .schedLinking,
-      ],
-      whenAutolinking: autolinkLifecycleExpectations)
+      whenAutolinking: autolinkLifecycleExpectedDiags
+    ) {
+      // Leave off the part after the colon because it varies on Linux:
+      // MacOS: The operation could not be completed. (TSCBasic.FileSystemError error 3.).
+      // Linux: The operation couldn’t be completed. (TSCBasic.FileSystemError error 3.)
+      enablingCrossModule
+      cannotReadBuildRecord
+      disablingIncrementalCannotReadBuildRecord
+      createdGraphFromSwiftdeps
+      findingBatchingCompiling("main", "other")
+      schedLinking
+    }
   }
 
   /// Try a build with no changes.

      "touch main; non-propagating but \(extraArgument)",
      checkDiagnostics: checkDiagnostics,
      extraArguments: [extraArgument],
      expecting: [
        .enablingCrossModule,
        .readGraph,
        .maySkip("other"),
        .queuingInitial("main"),
        .schedulingAlwaysRebuild("main"),
        .remarks(
          "Incremental compilation: Traced: interface of top-level name 'foo' in main.swift -> implementation of source file other.swiftdeps in other.swift",
          "Incremental compilation: Found dependent of main.swift:  {compile: other.o <= other.swift}"),
        .schedulingChanged("main"),
        .remarks(
          "Incremental compilation: Immediately scheduling dependent on main.swift  {compile: other.o <= other.swift}",
          "Incremental compilation: Queuing because of the initial set:  {compile: other.o <= other.swift}"),
        .findingAndFormingBatch(2),
        .addingToBatchThenForming("main", "other"),
        .schedulingPostCompileJobs,
        .compiling("main", "other"),
        .linking,
      ],
      whenAutolinking: autolinkLifecycleExpectations)
  }

  /// Check reaction to adding an input file.

        "initial",
        checkDiagnostics: false,
        extraArguments: [ driverOption.spelling ],
        whenAutolinking: []
      ) {}

      guard let sdkArgumentsForTesting = try Driver.sdkArgumentsForTesting()
      else {
