Skip to content

Commit 5465956

Browse files
committed
Add test for long prefix
Signed-off-by: Derek McGowan <derek@mcg.dev>
1 parent 9629ce7 commit 5465956

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

erofs_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,17 @@ func TestBasic(t *testing.T) {
5858
"user.xdg.comment": "comment for f4",
5959
"user.common": "same-value",
6060
})
61+
// Value is defined in /usr/lib/generated/generate.sh of testdata
62+
longPrefix := "user.long.prefix.vfvzyrvujoemkjztekxczhyyqpzncyav.xiksvigqpjttnvcvxgaxpnrghppufylkopprkdsfncibznsvmbicfknlkbnuntpuqmwffxkrnuhtpucxwllkxrfzmbvmdcluahylidncngjrxnlipwikplkxgfpiiiqtzsnigpcojpkxtzbzqcosttdxhtspbxltuezcakskakmskmaznvpwcqjakbyapaglwd."
63+
longValue := "value1-ppufylkopprkdsfncibznsvmbicfknlkbnuntpuqmwffxkrnuhtpucxwllkxrfzmbvmdcluahylidncngjrxnlipwikplkxgfpiiiqtzsnigpcojpkxtzbzqcosttdxhtspbxltuezcakskakmskmaznvpwcqjakbyapaglwdqfgvgkrgdwcegjpfmelrejllrjkpbwindlfynuzjgvcgygyayjvmtxgsbjkzrydoswbsknrrwjkwzxhasowuzdoxlhbxso"
64+
checkXattrs(t, efs, "/usr/lib/generated/xattrs/long-prefix-xattrs", map[string]string{
65+
longPrefix + "long-value": longValue,
66+
longPrefix + "shortvalue": "y",
67+
})
68+
checkXattrs(t, efs, "/usr/lib/generated/xattrs/short-prefix-xattrs", map[string]string{
69+
"user.short.long-value": longValue,
70+
"user.short.shortvalue": "y",
71+
})
6172
checkDevice(t, efs, "/dev/block0", fs.ModeDevice, 0x00000101)
6273
checkDevice(t, efs, "/dev/block1", fs.ModeDevice, 0)
6374
checkDevice(t, efs, "/dev/char0", fs.ModeCharDevice, 0x00000202)

testdata/basic-chunk-4096.erofs

8 KB
Binary file not shown.

testdata/basic-chunk-8192.erofs

8 KB
Binary file not shown.

testdata/basic-default.erofs

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)