container: strip host-dependent opts in test cases
All checks were successful
Test / Create distribution (push) Successful in 33s
Test / ShareFS (push) Successful in 40s
Test / Sandbox (push) Successful in 50s
Test / Hpkg (push) Successful in 51s
Test / Hakurei (push) Successful in 55s
Test / Sandbox (race detector) (push) Successful in 2m34s
Test / Hakurei (race detector) (push) Successful in 3m28s
Test / Flake checks (push) Successful in 1m54s
All checks were successful
Test / Create distribution (push) Successful in 33s
Test / ShareFS (push) Successful in 40s
Test / Sandbox (push) Successful in 50s
Test / Hpkg (push) Successful in 51s
Test / Hakurei (push) Successful in 55s
Test / Sandbox (race detector) (push) Successful in 2m34s
Test / Hakurei (race detector) (push) Successful in 3m28s
Test / Flake checks (push) Successful in 1m54s
This change also improves plumbing for stripping options. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -690,14 +690,22 @@ func init() {
|
|||||||
return fmt.Errorf("got more than %d entries", len(mnt))
|
return fmt.Errorf("got more than %d entries", len(mnt))
|
||||||
}
|
}
|
||||||
|
|
||||||
// ugly hack but should be reliable and is less likely to false negative than comparing by parsed flags
|
// ugly hack but should be reliable and is less likely to
|
||||||
cur.VfsOptstr = strings.TrimSuffix(cur.VfsOptstr, ",relatime")
|
//false negative than comparing by parsed flags
|
||||||
cur.VfsOptstr = strings.TrimSuffix(cur.VfsOptstr, ",noatime")
|
for _, s := range []string{
|
||||||
mnt[i].VfsOptstr = strings.TrimSuffix(mnt[i].VfsOptstr, ",relatime")
|
"relatime",
|
||||||
mnt[i].VfsOptstr = strings.TrimSuffix(mnt[i].VfsOptstr, ",noatime")
|
"noatime",
|
||||||
|
} {
|
||||||
cur.FsOptstr = strings.Replace(cur.FsOptstr, ",seclabel", "", 1)
|
cur.VfsOptstr = strings.TrimSuffix(cur.VfsOptstr, ","+s)
|
||||||
mnt[i].FsOptstr = strings.Replace(mnt[i].FsOptstr, ",seclabel", "", 1)
|
mnt[i].VfsOptstr = strings.TrimSuffix(mnt[i].VfsOptstr, ","+s)
|
||||||
|
}
|
||||||
|
for _, s := range []string{
|
||||||
|
"seclabel",
|
||||||
|
"inode64",
|
||||||
|
} {
|
||||||
|
cur.FsOptstr = strings.Replace(cur.FsOptstr, ","+s, "", 1)
|
||||||
|
mnt[i].FsOptstr = strings.Replace(mnt[i].FsOptstr, ","+s, "", 1)
|
||||||
|
}
|
||||||
|
|
||||||
if !cur.EqualWithIgnore(mnt[i], "\x00") {
|
if !cur.EqualWithIgnore(mnt[i], "\x00") {
|
||||||
fail = true
|
fail = true
|
||||||
|
|||||||
Reference in New Issue
Block a user