Skip to content

Commit

Permalink
Rename NativeLeaf to LinkableLeaf
Browse files Browse the repository at this point in the history
With all of the methods except Link() and Unlink() removed, the name
LinkableLeaf seems more fitting.
  • Loading branch information
EdSchouten committed Sep 18, 2024
1 parent b798066 commit a590c43
Show file tree
Hide file tree
Showing 32 changed files with 211 additions and 211 deletions.
2 changes: 1 addition & 1 deletion cmd/bb_virtual_tmp/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ func main() {
handleAllocator.New().AsStatelessDirectory(
virtual.NewStaticDirectory(map[path.Component]virtual.DirectoryChild{
path.MustNewComponent("tmp"): virtual.DirectoryChild{}.
FromLeaf(handleAllocator.New().AsNativeLeaf(userSettableSymlink)),
FromLeaf(handleAllocator.New().AsLinkableLeaf(userSettableSymlink)),
}))); err != nil {
return util.StatusWrap(err, "Failed to expose virtual file system mount")
}
Expand Down
2 changes: 1 addition & 1 deletion internal/mock/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ gomock(
"HandleResolver",
"InitialContentsFetcher",
"Leaf",
"NativeLeaf",
"LinkableLeaf",
"ResolvableHandleAllocation",
"ResolvableHandleAllocator",
"StatefulDirectoryHandle",
Expand Down
2 changes: 1 addition & 1 deletion pkg/filesystem/virtual/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ go_library(
"in_memory_prepopulated_directory.go",
"initial_contents_fetcher.go",
"leaf.go",
"native_leaf.go",
"linkable_leaf.go",
"nfs_handle_allocator.go",
"node.go",
"permissions.go",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ func TestAccessMonitoringInitialContentsFetcher(t *testing.T) {
// Reading the directory's contents should report it as being
// read. It should return children that are wrapped as well.
baseChildInitialContentsFetcher := mock.NewMockInitialContentsFetcher(ctrl)
baseChildFile := mock.NewMockNativeLeaf(ctrl)
baseChildFile := mock.NewMockLinkableLeaf(ctrl)
baseChildFileReadMonitor := mock.NewMockFileReadMonitor(ctrl)
baseFileReadMonitorFactory := mock.NewMockFileReadMonitorFactory(ctrl)
baseFileReadMonitorFactory.EXPECT().Call(path.MustNewComponent("file")).Return(baseChildFileReadMonitor.Call)
Expand Down
2 changes: 1 addition & 1 deletion pkg/filesystem/virtual/base_symlink_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (

type symlinkFactory struct{}

func (symlinkFactory) LookupSymlink(target []byte) NativeLeaf {
func (symlinkFactory) LookupSymlink(target []byte) LinkableLeaf {
return symlink{target: target}
}

Expand Down
2 changes: 1 addition & 1 deletion pkg/filesystem/virtual/blob_access_cas_file_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ func NewBlobAccessCASFileFactory(ctx context.Context, contentAddressableStorage
}
}

func (cff *blobAccessCASFileFactory) LookupFile(blobDigest digest.Digest, isExecutable bool, readMonitor FileReadMonitor) NativeLeaf {
func (cff *blobAccessCASFileFactory) LookupFile(blobDigest digest.Digest, isExecutable bool, readMonitor FileReadMonitor) LinkableLeaf {
if readMonitor != nil {
panic("The read monitor should have been set up by StatelessHandleAllocatingCASFileFactory")
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/filesystem/virtual/cas_file_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ import (
// CASFileFactory is a factory type for files whose contents correspond
// with an object stored in the Content Addressable Storage (CAS).
type CASFileFactory interface {
LookupFile(digest digest.Digest, isExecutable bool, readMonitor FileReadMonitor) NativeLeaf
LookupFile(digest digest.Digest, isExecutable bool, readMonitor FileReadMonitor) LinkableLeaf
}
2 changes: 1 addition & 1 deletion pkg/filesystem/virtual/cas_initial_contents_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ func (icf *casInitialContentsFetcher) fetchContentsUnwrapped(fileReadMonitorFact
}

// Ensure that leaves are properly unlinked if this method fails.
leavesToUnlink := make([]NativeLeaf, 0, len(directory.Files)+len(directory.Symlinks))
leavesToUnlink := make([]LinkableLeaf, 0, len(directory.Files)+len(directory.Symlinks))
defer func() {
for _, leaf := range leavesToUnlink {
leaf.Unlink()
Expand Down
10 changes: 5 additions & 5 deletions pkg/filesystem/virtual/cas_initial_contents_fetcher_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ func TestCASInitialContentsFetcherFetchContents(t *testing.T) {
},
},
}, nil)
file1 := mock.NewMockNativeLeaf(ctrl)
file1 := mock.NewMockLinkableLeaf(ctrl)
fileReadMonitor1 := mock.NewMockFileReadMonitor(ctrl)
fileReadMonitorFactory.EXPECT().Call(path.MustNewComponent("file1")).Return(fileReadMonitor1.Call)
casFileFactory.EXPECT().LookupFile(
Expand Down Expand Up @@ -139,7 +139,7 @@ func TestCASInitialContentsFetcherFetchContents(t *testing.T) {
},
},
}, nil)
file1 := mock.NewMockNativeLeaf(ctrl)
file1 := mock.NewMockLinkableLeaf(ctrl)
fileReadMonitor1 := mock.NewMockFileReadMonitor(ctrl)
fileReadMonitorFactory.EXPECT().Call(path.MustNewComponent("hello")).Return(fileReadMonitor1.Call)
casFileFactory.EXPECT().LookupFile(
Expand Down Expand Up @@ -195,23 +195,23 @@ func TestCASInitialContentsFetcherFetchContents(t *testing.T) {
childDirectoryWalker := mock.NewMockDirectoryWalker(ctrl)
directoryWalker.EXPECT().GetChild(digest.MustNewDigest("hello", remoteexecution.DigestFunction_MD5, "4b3b03436604cb9d831b91c71a8c1952", 123)).
Return(childDirectoryWalker)
executableLeaf := mock.NewMockNativeLeaf(ctrl)
executableLeaf := mock.NewMockLinkableLeaf(ctrl)
executableReadMonitor := mock.NewMockFileReadMonitor(ctrl)
fileReadMonitorFactory.EXPECT().Call(path.MustNewComponent("executable")).Return(executableReadMonitor.Call)
casFileFactory.EXPECT().LookupFile(
digest.MustNewDigest("hello", remoteexecution.DigestFunction_MD5, "946fbe7108add776d3e3094f512c3483", 456),
/* isExecutable = */ true,
gomock.Any(),
).Return(executableLeaf)
fileLeaf := mock.NewMockNativeLeaf(ctrl)
fileLeaf := mock.NewMockLinkableLeaf(ctrl)
fileReadMonitor := mock.NewMockFileReadMonitor(ctrl)
fileReadMonitorFactory.EXPECT().Call(path.MustNewComponent("file")).Return(fileReadMonitor.Call)
casFileFactory.EXPECT().LookupFile(
digest.MustNewDigest("hello", remoteexecution.DigestFunction_MD5, "c0607941dd5b3ca8e175a1bfbfd1c0ea", 789),
/* isExecutable = */ false,
gomock.Any(),
).Return(fileLeaf)
symlinkLeaf := mock.NewMockNativeLeaf(ctrl)
symlinkLeaf := mock.NewMockLinkableLeaf(ctrl)
symlinkFactory.EXPECT().LookupSymlink([]byte("target")).Return(symlinkLeaf)

children, err := initialContentsFetcher.FetchContents(fileReadMonitorFactory.Call)
Expand Down
8 changes: 4 additions & 4 deletions pkg/filesystem/virtual/character_device_factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ import (
// Character devices are immutable files; it is not possible to change
// the device after it has been created.
type CharacterDeviceFactory interface {
LookupCharacterDevice(deviceNumber filesystem.DeviceNumber) NativeLeaf
LookupCharacterDevice(deviceNumber filesystem.DeviceNumber) LinkableLeaf
}

type baseCharacterDeviceFactory struct{}

func (baseCharacterDeviceFactory) LookupCharacterDevice(deviceNumber filesystem.DeviceNumber) NativeLeaf {
func (baseCharacterDeviceFactory) LookupCharacterDevice(deviceNumber filesystem.DeviceNumber) LinkableLeaf {
return NewSpecialFile(filesystem.FileTypeCharacterDevice, &deviceNumber)
}

Expand Down Expand Up @@ -46,7 +46,7 @@ func NewHandleAllocatingCharacterDeviceFactory(base CharacterDeviceFactory, allo
return cdf
}

func (cdf *handleAllocatingCharacterDeviceFactory) LookupCharacterDevice(deviceNumber filesystem.DeviceNumber) NativeLeaf {
func (cdf *handleAllocatingCharacterDeviceFactory) LookupCharacterDevice(deviceNumber filesystem.DeviceNumber) LinkableLeaf {
// Convert the device number to a binary identifier.
major, minor := deviceNumber.ToMajorMinor()
var identifier [binary.MaxVarintLen32 * 2]byte
Expand All @@ -55,7 +55,7 @@ func (cdf *handleAllocatingCharacterDeviceFactory) LookupCharacterDevice(deviceN

return cdf.allocator.
New(bytes.NewBuffer(identifier[:length])).
AsNativeLeaf(cdf.base.LookupCharacterDevice(deviceNumber))
AsLinkableLeaf(cdf.base.LookupCharacterDevice(deviceNumber))
}

func (cdf *handleAllocatingCharacterDeviceFactory) resolve(r io.ByteReader) (DirectoryChild, Status) {
Expand Down
12 changes: 6 additions & 6 deletions pkg/filesystem/virtual/character_device_factory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ func TestHandleAllocatingCharacterDeviceFactory(t *testing.T) {
t.Run("Lookup", func(t *testing.T) {
// Look up /dev/null (on Linux: major 1, minor 3).
deviceNumber := filesystem.NewDeviceNumberFromMajorMinor(1, 3)
underlyingLeaf := mock.NewMockNativeLeaf(ctrl)
underlyingLeaf := mock.NewMockLinkableLeaf(ctrl)
baseCharacterDeviceFactory.EXPECT().LookupCharacterDevice(deviceNumber).Return(underlyingLeaf)
wrappedLeaf := mock.NewMockNativeLeaf(ctrl)
wrappedLeaf := mock.NewMockLinkableLeaf(ctrl)
leafHandleAllocation := mock.NewMockResolvableHandleAllocation(ctrl)
handleAllocator.EXPECT().New(gomock.Any()).
DoAndReturn(func(id io.WriterTo) virtual.ResolvableHandleAllocation {
Expand All @@ -45,7 +45,7 @@ func TestHandleAllocatingCharacterDeviceFactory(t *testing.T) {
require.Equal(t, []byte{1, 3}, idBuf.Bytes())
return leafHandleAllocation
})
leafHandleAllocation.EXPECT().AsNativeLeaf(underlyingLeaf).Return(wrappedLeaf)
leafHandleAllocation.EXPECT().AsLinkableLeaf(underlyingLeaf).Return(wrappedLeaf)

require.Equal(t, wrappedLeaf, characterDeviceFactory.LookupCharacterDevice(deviceNumber))
})
Expand All @@ -65,9 +65,9 @@ func TestHandleAllocatingCharacterDeviceFactory(t *testing.T) {
t.Run("ResolverTwoNumbers", func(t *testing.T) {
// Provided both a major and minor number.
deviceNumber := filesystem.NewDeviceNumberFromMajorMinor(1, 3)
underlyingLeaf := mock.NewMockNativeLeaf(ctrl)
underlyingLeaf := mock.NewMockLinkableLeaf(ctrl)
baseCharacterDeviceFactory.EXPECT().LookupCharacterDevice(deviceNumber).Return(underlyingLeaf)
wrappedLeaf := mock.NewMockNativeLeaf(ctrl)
wrappedLeaf := mock.NewMockLinkableLeaf(ctrl)
leafHandleAllocation := mock.NewMockResolvableHandleAllocation(ctrl)
handleAllocator.EXPECT().New(gomock.Any()).
DoAndReturn(func(id io.WriterTo) virtual.ResolvableHandleAllocation {
Expand All @@ -78,7 +78,7 @@ func TestHandleAllocatingCharacterDeviceFactory(t *testing.T) {
require.Equal(t, []byte{1, 3}, idBuf.Bytes())
return leafHandleAllocation
})
leafHandleAllocation.EXPECT().AsNativeLeaf(underlyingLeaf).Return(wrappedLeaf)
leafHandleAllocation.EXPECT().AsLinkableLeaf(underlyingLeaf).Return(wrappedLeaf)

actualChild, s := handleResolver(bytes.NewBuffer([]byte{1, 3}))
require.Equal(t, virtual.StatusOK, s)
Expand Down
2 changes: 1 addition & 1 deletion pkg/filesystem/virtual/file_allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ package virtual
// Files returned by this interface should have a link count of 1, and
// are opened using the provided share access mask.
type FileAllocator interface {
NewFile(isExecutable bool, size uint64, shareAccess ShareMask) (NativeLeaf, Status)
NewFile(isExecutable bool, size uint64, shareAccess ShareMask) (LinkableLeaf, Status)
}
66 changes: 33 additions & 33 deletions pkg/filesystem/virtual/fuse_handle_allocator.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ func (hn *fuseStatefulHandleAllocation) AsStatelessDirectory(directory Directory
return d
}

func (hn *fuseStatefulHandleAllocation) AsNativeLeaf(leaf NativeLeaf) NativeLeaf {
l := &fuseStatefulNativeLeaf{
NativeLeaf: leaf,
inodeNumber: hn.options.randomNumberGenerator.Uint64(),
func (hn *fuseStatefulHandleAllocation) AsLinkableLeaf(leaf LinkableLeaf) LinkableLeaf {
l := &fuseStatefulLinkableLeaf{
LinkableLeaf: leaf,
inodeNumber: hn.options.randomNumberGenerator.Uint64(),
}
l.linkCount.Store(1)
*hn = fuseStatefulHandleAllocation{}
Expand Down Expand Up @@ -189,10 +189,10 @@ func (hn *fuseStatelessHandleAllocation) AsStatelessDirectory(directory Director
return d
}

func (hn *fuseStatelessHandleAllocation) AsNativeLeaf(leaf NativeLeaf) NativeLeaf {
return &fuseStatelessNativeLeaf{
NativeLeaf: leaf,
inodeNumber: hn.currentInodeNumber,
func (hn *fuseStatelessHandleAllocation) AsLinkableLeaf(leaf LinkableLeaf) LinkableLeaf {
return &fuseStatelessLinkableLeaf{
LinkableLeaf: leaf,
inodeNumber: hn.currentInodeNumber,
}
}

Expand Down Expand Up @@ -269,17 +269,17 @@ func (d *fuseStatelessDirectory) VirtualSetAttributes(ctx context.Context, in *A
return StatusOK
}

// fuseStatefulNativeLeaf is a decorator for NativeLeaf that augments
// fuseStatefulLinkableLeaf is a decorator for LinkableLeaf that augments
// the results of VirtualGetAttributes() to contain an inode number and
// link count. Link() and Unlink() calls are intercepted, and are only
// forwarded if the link count drops to zero.
type fuseStatefulNativeLeaf struct {
NativeLeaf
type fuseStatefulLinkableLeaf struct {
LinkableLeaf
inodeNumber uint64
linkCount atomic.Uint32
}

func (l *fuseStatefulNativeLeaf) Link() Status {
func (l *fuseStatefulLinkableLeaf) Link() Status {
for {
current := l.linkCount.Load()
if current == 0 {
Expand All @@ -292,80 +292,80 @@ func (l *fuseStatefulNativeLeaf) Link() Status {
}
}

func (l *fuseStatefulNativeLeaf) Unlink() {
func (l *fuseStatefulLinkableLeaf) Unlink() {
if l.linkCount.Add(^uint32(0)) == 0 {
l.NativeLeaf.Unlink()
l.LinkableLeaf.Unlink()
}
}

func (l *fuseStatefulNativeLeaf) injectAttributes(attributes *Attributes) {
func (l *fuseStatefulLinkableLeaf) injectAttributes(attributes *Attributes) {
attributes.SetInodeNumber(l.inodeNumber)
attributes.SetLinkCount(l.linkCount.Load())
// The change ID should normally also be affected by the link
// count. We don't bother overriding the change ID here, as FUSE
// does not depend on it.
}

func (l *fuseStatefulNativeLeaf) VirtualGetAttributes(ctx context.Context, requested AttributesMask, attributes *Attributes) {
func (l *fuseStatefulLinkableLeaf) VirtualGetAttributes(ctx context.Context, requested AttributesMask, attributes *Attributes) {
if remaining := requested &^ (AttributesMaskInodeNumber | AttributesMaskLinkCount); remaining != 0 {
l.NativeLeaf.VirtualGetAttributes(ctx, remaining, attributes)
l.LinkableLeaf.VirtualGetAttributes(ctx, remaining, attributes)
}
l.injectAttributes(attributes)
}

func (l *fuseStatefulNativeLeaf) VirtualSetAttributes(ctx context.Context, in *Attributes, requested AttributesMask, attributes *Attributes) Status {
if s := l.NativeLeaf.VirtualSetAttributes(ctx, in, requested, attributes); s != StatusOK {
func (l *fuseStatefulLinkableLeaf) VirtualSetAttributes(ctx context.Context, in *Attributes, requested AttributesMask, attributes *Attributes) Status {
if s := l.LinkableLeaf.VirtualSetAttributes(ctx, in, requested, attributes); s != StatusOK {
return s
}
l.injectAttributes(attributes)
return StatusOK
}

func (l *fuseStatefulNativeLeaf) VirtualOpenSelf(ctx context.Context, shareAccess ShareMask, options *OpenExistingOptions, requested AttributesMask, attributes *Attributes) Status {
if s := l.NativeLeaf.VirtualOpenSelf(ctx, shareAccess, options, requested, attributes); s != StatusOK {
func (l *fuseStatefulLinkableLeaf) VirtualOpenSelf(ctx context.Context, shareAccess ShareMask, options *OpenExistingOptions, requested AttributesMask, attributes *Attributes) Status {
if s := l.LinkableLeaf.VirtualOpenSelf(ctx, shareAccess, options, requested, attributes); s != StatusOK {
return s
}
l.injectAttributes(attributes)
return StatusOK
}

// fuseStatelessNativeLeaf is a decorator for NativeLeaf that augments
// fuseStatelessLinkableLeaf is a decorator for LinkableLeaf that augments
// the results of VirtualGetAttributes() to contain an inode number and
// link count. For these kinds of files, the link count is just a
// constant.
type fuseStatelessNativeLeaf struct {
NativeLeaf
type fuseStatelessLinkableLeaf struct {
LinkableLeaf
inodeNumber uint64
}

func (l *fuseStatelessNativeLeaf) Link() Status {
func (l *fuseStatelessLinkableLeaf) Link() Status {
return StatusOK
}

func (l *fuseStatelessNativeLeaf) Unlink() {}
func (l *fuseStatelessLinkableLeaf) Unlink() {}

func (l *fuseStatelessNativeLeaf) injectAttributes(attributes *Attributes) {
func (l *fuseStatelessLinkableLeaf) injectAttributes(attributes *Attributes) {
attributes.SetInodeNumber(l.inodeNumber)
attributes.SetLinkCount(StatelessLeafLinkCount)
}

func (l *fuseStatelessNativeLeaf) VirtualGetAttributes(ctx context.Context, requested AttributesMask, attributes *Attributes) {
func (l *fuseStatelessLinkableLeaf) VirtualGetAttributes(ctx context.Context, requested AttributesMask, attributes *Attributes) {
if remaining := requested &^ (AttributesMaskInodeNumber | AttributesMaskLinkCount); remaining != 0 {
l.NativeLeaf.VirtualGetAttributes(ctx, remaining, attributes)
l.LinkableLeaf.VirtualGetAttributes(ctx, remaining, attributes)
}
l.injectAttributes(attributes)
}

func (l *fuseStatelessNativeLeaf) VirtualSetAttributes(ctx context.Context, in *Attributes, requested AttributesMask, attributes *Attributes) Status {
if s := l.NativeLeaf.VirtualSetAttributes(ctx, in, requested, attributes); s != StatusOK {
func (l *fuseStatelessLinkableLeaf) VirtualSetAttributes(ctx context.Context, in *Attributes, requested AttributesMask, attributes *Attributes) Status {
if s := l.LinkableLeaf.VirtualSetAttributes(ctx, in, requested, attributes); s != StatusOK {
return s
}
l.injectAttributes(attributes)
return StatusOK
}

func (l *fuseStatelessNativeLeaf) VirtualOpenSelf(ctx context.Context, shareAccess ShareMask, options *OpenExistingOptions, requested AttributesMask, attributes *Attributes) Status {
if s := l.NativeLeaf.VirtualOpenSelf(ctx, shareAccess, options, requested, attributes); s != StatusOK {
func (l *fuseStatelessLinkableLeaf) VirtualOpenSelf(ctx context.Context, shareAccess ShareMask, options *OpenExistingOptions, requested AttributesMask, attributes *Attributes) Status {
if s := l.LinkableLeaf.VirtualOpenSelf(ctx, shareAccess, options, requested, attributes); s != StatusOK {
return s
}
l.injectAttributes(attributes)
Expand Down
12 changes: 6 additions & 6 deletions pkg/filesystem/virtual/fuse_handle_allocator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,17 +75,17 @@ func TestFUSEHandleAllocator(t *testing.T) {
&attr)
})

t.Run("StatefulNativeLeaf", func(t *testing.T) {
t.Run("StatefulLinkableLeaf", func(t *testing.T) {
// Create a stateful file and wrap it. A link count and
// inode number should be added.
baseLeaf := mock.NewMockNativeLeaf(ctrl)
baseLeaf := mock.NewMockLinkableLeaf(ctrl)
baseLeaf.EXPECT().VirtualGetAttributes(ctx, virtual.AttributesMaskSizeBytes, gomock.Any()).
Do(func(ctx context.Context, attributesMask virtual.AttributesMask, attributes *virtual.Attributes) {
attributes.SetSizeBytes(42)
}).AnyTimes()

randomNumberGenerator.EXPECT().Uint64().Return(uint64(0xf999bb2fd22421d8))
wrappedLeaf := handleAllocator.New().AsNativeLeaf(baseLeaf)
wrappedLeaf := handleAllocator.New().AsLinkableLeaf(baseLeaf)

var attr1 virtual.Attributes
wrappedLeaf.VirtualGetAttributes(ctx, attributesMask, &attr1)
Expand Down Expand Up @@ -142,15 +142,15 @@ func TestFUSEHandleAllocator(t *testing.T) {
&attr4)
})

t.Run("StatelessNativeLeaf", func(t *testing.T) {
t.Run("StatelessLinkableLeaf", func(t *testing.T) {
// Create a stateless file and wrap it. A link count and
// inode number should be added. As the file is
// stateless, the link count uses a placeholder value.
//
// The inode number of the leaf corresponds with the
// FNV-1a hash of "Hello", using 0x6aae40a05f45b861 as
// the offset basis.
baseLeaf := mock.NewMockNativeLeaf(ctrl)
baseLeaf := mock.NewMockLinkableLeaf(ctrl)
baseLeaf.EXPECT().VirtualGetAttributes(ctx, virtual.AttributesMaskSizeBytes, gomock.Any()).
Do(func(ctx context.Context, attributesMask virtual.AttributesMask, attributes *virtual.Attributes) {
attributes.SetSizeBytes(123)
Expand All @@ -161,7 +161,7 @@ func TestFUSEHandleAllocator(t *testing.T) {
New().
AsStatelessAllocator().
New(bytes.NewBuffer([]byte("Hello"))).
AsNativeLeaf(baseLeaf)
AsLinkableLeaf(baseLeaf)

var attr1 virtual.Attributes
wrappedLeaf.VirtualGetAttributes(ctx, attributesMask, &attr1)
Expand Down
Loading

0 comments on commit a590c43

Please sign in to comment.