From 5144470e3d30499fa42af84927fa8adc27b51e68 Mon Sep 17 00:00:00 2001
From: Jakob Unterwurzacher
Date: Sun, 16 Oct 2016 15:02:44 +0200
Subject: fusefrontend: Utimens: ugly band-aid for nil pointer crash in go-fuse

Crash is described at https://github.com/rfjakob/gocryptfs/issues/48 .
Revert this once https://github.com/hanwen/go-fuse/pull/131 is merged.
---
 tests/matrix/matrix_test.go | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'tests/matrix')

diff --git a/tests/matrix/matrix_test.go b/tests/matrix/matrix_test.go
index 5c09d26..774a7ae 100644
--- a/tests/matrix/matrix_test.go
+++ b/tests/matrix/matrix_test.go
@@ -25,6 +25,7 @@ import (
 	"testing"
 
 	"github.com/rfjakob/gocryptfs/internal/cryptocore"
+	"github.com/rfjakob/gocryptfs/internal/fusefrontend"
 	"github.com/rfjakob/gocryptfs/internal/syscallcompat"
 	"github.com/rfjakob/gocryptfs/tests/test_helpers"
 )
@@ -698,6 +699,11 @@ func doTestUtimesNano(t *testing.T, path string) {
 			out: [2]syscall.Timespec{{Sec: 1, Nsec: 2}, {Sec: 5, Nsec: 6}},
 		},
 	}
+	if fusefrontend.BrokenAtimeOmit {
+		// TODO remove this once the pull request is merged:
+		// https://github.com/hanwen/go-fuse/pull/131
+		utimeTestcases = utimeTestcases[:1]
+	}
 	for i, tc := range utimeTestcases {
 		err := syscall.UtimesNano(path, tc.in[:])
 		if err != nil {
-- 
cgit v1.2.3