Add #getFastDigest method to SyscallCache and use it in DigestUtils. Thread the real per-build SyscallCache through to everywhere that calls into DigestUtils.
This leaves FileStateValue's call of #getFastDigest as the main undelegated one. A follow-up change will get rid of that usage too.
There should be no observable difference from this change: the only new actual usage of SyscallCache is in DigestUtils, which calls getFastDigest, which just delegates back to the Path for now.
PiperOrigin-RevId: 424972494
diff --git a/src/test/java/com/google/devtools/build/lib/remote/ByteStreamUploaderTest.java b/src/test/java/com/google/devtools/build/lib/remote/ByteStreamUploaderTest.java
index 2623921..adcc14a 100644
--- a/src/test/java/com/google/devtools/build/lib/remote/ByteStreamUploaderTest.java
+++ b/src/test/java/com/google/devtools/build/lib/remote/ByteStreamUploaderTest.java
@@ -45,6 +45,7 @@
import com.google.devtools.build.lib.remote.util.TestUtils;
import com.google.devtools.build.lib.remote.util.TracingMetadataUtils;
import com.google.devtools.build.lib.vfs.DigestHashFunction;
+import com.google.devtools.build.lib.vfs.SyscallCache;
import com.google.protobuf.ByteString;
import io.grpc.BindableService;
import io.grpc.CallCredentials;
@@ -97,7 +98,8 @@
@RunWith(JUnit4.class)
public class ByteStreamUploaderTest {
- private static final DigestUtil DIGEST_UTIL = new DigestUtil(DigestHashFunction.SHA256);
+ private static final DigestUtil DIGEST_UTIL =
+ new DigestUtil(SyscallCache.NO_CACHE, DigestHashFunction.SHA256);
private static final int CHUNK_SIZE = 10;
private static final String INSTANCE_NAME = "foo";