-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: initial commit for erofs support
Before this commit, only squashfs was supported. However, there are other filesystems such as erofs that fit the same theme, and additional filesystem support requires refactoring and exposing a more generic filesystem interface. pkg/fs/fs.go - Filesystem interface pkg/squashfs - squashfs pkg/erofs - erofs pkg/common - filesystem-agnostic common routines pkg/verity - verity routines Signed-off-by: Ramkumar Chinchani <[email protected]>
- Loading branch information
Showing
35 changed files
with
1,652 additions
and
423 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
package atomfs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
package common | ||
|
||
import ( | ||
"testing" | ||
|
||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
type uidmapTestcase struct { | ||
uidmap string | ||
expected bool | ||
} | ||
|
||
var uidmapTests = []uidmapTestcase{ | ||
{ | ||
uidmap: ` 0 0 4294967295`, | ||
expected: true, | ||
}, | ||
{ | ||
uidmap: ` 0 0 1000 | ||
2000 2000 1`, | ||
expected: false, | ||
}, | ||
{ | ||
uidmap: ` 0 0 1000`, | ||
expected: false, | ||
}, | ||
{ | ||
uidmap: ` 10 0 4294967295`, | ||
expected: false, | ||
}, | ||
{ | ||
uidmap: ` 0 10 4294967295`, | ||
expected: false, | ||
}, | ||
{ | ||
uidmap: ` 0 0 1`, | ||
expected: false, | ||
}, | ||
} | ||
|
||
func TestAmHostRoot(t *testing.T) { | ||
t.Parallel() | ||
assert := assert.New(t) | ||
for _, testcase := range uidmapTests { | ||
v := uidmapIsHost(testcase.uidmap) | ||
assert.Equal(v, testcase.expected) | ||
} | ||
} |
Oops, something went wrong.