dCache / nfs4j

Pure Java NFSv3 and NFSv4.2 implementation
Other
235 stars 73 forks source link

Reduce number of callbacks when checking access flags. #89

Closed dkocher closed 4 years ago

dkocher commented 4 years ago

Fix for #88.

dcache-ci commented 4 years ago

Can one of the admins verify this patch?

kofemann commented 4 years ago

ok to test

kofemann commented 4 years ago

Please add Signed-off-by in to the commit.

kofemann commented 4 years ago

retest this please

dkocher commented 4 years ago

Not sure what the difference is but the test passes here.

kofemann commented 4 years ago

@dkocher This is not the issue of your patch, however, can you add the following:

diff --git a/core/src/test/java/org/dcache/nfs/vfs/PseudoFsTest.java b/core/src/test/java/org/dcache/nfs/vfs/PseudoFsTest.java
index 671a608f..cf252ebd 100644
--- a/core/src/test/java/org/dcache/nfs/vfs/PseudoFsTest.java
+++ b/core/src/test/java/org/dcache/nfs/vfs/PseudoFsTest.java
@@ -19,11 +19,14 @@
  */
 package org.dcache.nfs.vfs;

+import com.google.common.primitives.Longs;
+
 import java.io.IOException;
 import java.net.InetSocketAddress;
 import java.nio.charset.StandardCharsets;
 import java.util.stream.Stream;
 import javax.security.auth.Subject;
+
 import org.dcache.auth.Subjects;
 import org.dcache.nfs.ExportFile;
 import org.dcache.nfs.FsExport;
@@ -383,7 +386,7 @@ public class PseudoFsTest {
         Inode inode = new Inode(
                 new FileHandle.FileHandleBuilder()
                     .setExportIdx(1)
-                    .build(new byte[] {0x1})
+                    .build(Longs.toByteArray(1L))
             );

         given(mockedExportFile.getExport(1, localAddress.getAddress())).willReturn(null);
kofemann commented 4 years ago

Thanks!