Don't ignore permissions in benchmark tests

This commit is contained in:
Caleb Gardner
2025-04-16 16:22:32 -05:00
parent 4c8c9f0b47
commit f991ddb1d4
+2 -6
View File
@@ -76,13 +76,11 @@ func BenchmarkExtract(b *testing.B) {
}
libPath := filepath.Join(tmpDir, "ExtractLib")
os.RemoveAll(libPath)
op := FastOptions()
op.IgnorePerm = true
rdr, err := NewReader(fil)
if err != nil {
b.Fatal(err)
}
err = rdr.ExtractWithOptions(libPath, op)
err = rdr.ExtractWithOptions(libPath, FastOptions())
if err != nil {
b.Fatal(err)
}
@@ -99,14 +97,12 @@ func BenchmarkRace(b *testing.B) {
os.RemoveAll(libPath)
os.RemoveAll(unsquashPath)
var libTime, unsquashTime time.Duration
op := FastOptions()
op.IgnorePerm = true
start := time.Now()
rdr, err := NewReader(fil)
if err != nil {
b.Fatal(err)
}
err = rdr.ExtractWithOptions(libPath, op)
err = rdr.ExtractWithOptions(libPath, FastOptions())
if err != nil {
b.Fatal(err)
}