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) {
}
}
func DisabledTestRmRf(t *testing.T) {
func TestRmRf(t *testing.T) {
t.Log("TestRmRf")
wd, clean := setupUfs(t)
defer clean()
......@@ -686,8 +686,9 @@ func DisabledTestRmRf(t *testing.T) {
fn := wd + "/ro/dir/subdir/y"
err = ioutil.WriteFile(fn, []byte(contents), 0644)
CheckSuccess(err)
cmd := exec.Command("/bin/rm", "-rf", wd + "/mount/dir")
bin, err := exec.LookPath("rm")
CheckSuccess(err)
cmd := exec.Command(bin, "-rf", wd + "/mount/dir")
err = cmd.Run()
if err != nil {
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