Commit c7cf8409 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

nodefs: check that default Create returns EROFS

parent eed6a9d3
// Copyright 2019 the Go-FUSE Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package nodefs
import (
"syscall"
"testing"
)
func TestReadonlyCreate(t *testing.T) {
root := &Inode{}
mntDir, clean := testMount(t, root, nil)
defer clean()
_, err := syscall.Creat(mntDir+"/test", 0644)
if want := syscall.EROFS; want != err {
t.Fatalf("got err %v, want %v", err, want)
}
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment