syscallcompat: fix FchmodatNofollow tests
FchmodatNofollow dropped the flags parameter.
This commit is contained in:
parent
a7d59032d3
commit
6542ddd2f9
@ -175,7 +175,7 @@ func TestFchmodat(t *testing.T) {
|
|||||||
defer syscall.Close(dirfd)
|
defer syscall.Close(dirfd)
|
||||||
|
|
||||||
// Check that chmod on a regular file works ok
|
// Check that chmod on a regular file works ok
|
||||||
err = FchmodatNofollow(dirfd, regular, 0111, 0)
|
err = FchmodatNofollow(dirfd, regular, 0111)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@ -185,7 +185,7 @@ func TestFchmodat(t *testing.T) {
|
|||||||
if st.Mode != 0111 {
|
if st.Mode != 0111 {
|
||||||
t.Errorf("wrong mode: %#0o", st.Mode)
|
t.Errorf("wrong mode: %#0o", st.Mode)
|
||||||
}
|
}
|
||||||
err = FchmodatNofollow(dirfd, regular, 0000, 0)
|
err = FchmodatNofollow(dirfd, regular, 0000)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Error(err)
|
t.Error(err)
|
||||||
}
|
}
|
||||||
@ -196,7 +196,7 @@ func TestFchmodat(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check what happens on a symlink
|
// Check what happens on a symlink
|
||||||
err = FchmodatNofollow(dirfd, symlink, 0333, 0)
|
err = FchmodatNofollow(dirfd, symlink, 0333)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
syscall.Lstat(tmpDir+"/"+symlink, &st)
|
syscall.Lstat(tmpDir+"/"+symlink, &st)
|
||||||
st.Mode &= 0777
|
st.Mode &= 0777
|
||||||
|
Loading…
x
Reference in New Issue
Block a user