Commit 7aa7dde6 authored by Han-Wen Nienhuys's avatar Han-Wen Nienhuys

Reinstate rm -rf test.

rm from coreutils < 8.0 is relying on synchronization between a read
of and unlink within a directory.  Posix does not require such
synchronization.

For making the test pass, install coreutils 8.0 or later.
parent a3528b6d
...@@ -674,7 +674,7 @@ func TestRemoveAll(t *testing.T) { ...@@ -674,7 +674,7 @@ func TestRemoveAll(t *testing.T) {
} }
} }
func DisabledTestRmRf(t *testing.T) { func TestRmRf(t *testing.T) {
t.Log("TestRmRf") t.Log("TestRmRf")
wd, clean := setupUfs(t) wd, clean := setupUfs(t)
defer clean() defer clean()
...@@ -686,8 +686,9 @@ func DisabledTestRmRf(t *testing.T) { ...@@ -686,8 +686,9 @@ func DisabledTestRmRf(t *testing.T) {
fn := wd + "/ro/dir/subdir/y" fn := wd + "/ro/dir/subdir/y"
err = ioutil.WriteFile(fn, []byte(contents), 0644) err = ioutil.WriteFile(fn, []byte(contents), 0644)
CheckSuccess(err) CheckSuccess(err)
bin, err := exec.LookPath("rm")
cmd := exec.Command("/bin/rm", "-rf", wd + "/mount/dir") CheckSuccess(err)
cmd := exec.Command(bin, "-rf", wd + "/mount/dir")
err = cmd.Run() err = cmd.Run()
if err != nil { if err != nil {
t.Fatal("rm -rf returned error:", err) t.Fatal("rm -rf returned error:", err)
......
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