posix: Mkdir() and OpenFile() should honor umask. (#1972)

Adds two unit tests for validation as well.

Fixes #1965
This commit is contained in:
Harshavardhana
2016-06-23 20:19:27 -07:00
committed by Anand Babu (AB) Periasamy
parent 41c089a7e0
commit ff9fc22c72
5 changed files with 215 additions and 8 deletions
+2 -2
View File
@@ -108,7 +108,7 @@ func TestUNCPathDiskName(t *testing.T) {
var err error
// Instantiate posix object to manage a disk
longPathDisk := `\\?\c:\testdisk`
err = mkdirAll(longPathDisk, 0700)
err = mkdirAll(longPathDisk, 0777)
if err != nil {
t.Fatal(err)
}
@@ -147,7 +147,7 @@ func Test32kUNCPath(t *testing.T) {
remaining := 32767 - 25 - len(longDiskName)
longDiskName = longDiskName + `\` + strings.Repeat("a", remaining)
}
err = mkdirAll(longDiskName, 0700)
err = mkdirAll(longDiskName, 0777)
if err != nil {
t.Fatal(err)
}