aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore10
-rwxr-xr-xbenchmark.bash (renamed from main_benchmark.bash)0
-rw-r--r--main_test.go10
3 files changed, 9 insertions, 11 deletions
diff --git a/.gitignore b/.gitignore
index 0929506..6072ebf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,9 +1,5 @@
-# Binary
+# binary
/gocryptfs
-# Manual test mounts
-/cipherdir
-/mountpoint
-
-# main_test.go temporary files
-/main_test_tmp
+# temporary files created by the tests
+/tmp
diff --git a/main_benchmark.bash b/benchmark.bash
index 447581a..447581a 100755
--- a/main_benchmark.bash
+++ b/benchmark.bash
diff --git a/main_test.go b/main_test.go
index 16b9619..2f606bc 100644
--- a/main_test.go
+++ b/main_test.go
@@ -13,7 +13,7 @@ import (
"time"
)
-const tmpDir = "main_test_tmp/"
+const tmpDir = "tmp/"
const plainDir = tmpDir + "plain/"
const cipherDir = tmpDir + "cipher/"
@@ -37,7 +37,9 @@ func md5fn(filename string) string {
func TestMain(m *testing.M) {
- unmount()
+ fu := exec.Command("fusermount", "-z", "-u", plainDir)
+ fu.Run()
+
os.RemoveAll(tmpDir)
err := os.MkdirAll(plainDir, 0777)
@@ -226,7 +228,7 @@ func BenchmarkStreamRead(t *testing.B) {
if t.N > mb {
// Grow file so we can satisfy the test
- fmt.Printf("Growing file to %d MB... ", t.N)
+ //fmt.Printf("Growing file to %d MB... ", t.N)
f2, err := os.OpenFile(fn, os.O_WRONLY|os.O_APPEND, 0666)
if err != nil {
fmt.Println(err)
@@ -240,7 +242,7 @@ func BenchmarkStreamRead(t *testing.B) {
}
}
f2.Close()
- fmt.Printf("done\n")
+ //fmt.Printf("done\n")
}
file, err := os.Open(plainDir + "BenchmarkWrite")