func tempAllocDir(t testing.TB) *allocdir.AllocDir {
	dir, err := ioutil.TempDir("", "")
	if err != nil {
		t.Fatalf("TempDir() failed: %v", err)
	}

	if err := os.Chmod(dir, 0777); err != nil {
		t.Fatalf("failed to chmod dir: %v", err)
	}

	return allocdir.NewAllocDir(log.New(os.Stderr, "", log.LstdFlags), dir)
}
// tempAllocDir returns a new alloc dir that is rooted in a temp dir. The caller
// should destroy the temp dir.
tempAllocDir returns a new alloc dir that is rooted in a temp dir. The caller
should destroy the temp dir.
// tempAllocDir returns a new alloc dir that is rooted in a temp dir . The caller // should destroy the temp dir .
func tempAllocDir(t testing.TB) *allocdir.AllocDir {
	dir, err := ioutil.TempDir("", "")
	if err != nil {
		t.Fatalf("TempDir() failed: %v", err)
	}
	if err := os.Chmod(dir, 0777); err != nil {
		t.Fatalf("failed to chmod dir: %v", err)
	}
	return allocdir.NewAllocDir(log.New(os.Stderr, "", log.LstdFlags), dir)
}
func tempAllocDir ( t testing . TB ) * allocdir . AllocDir { dir , err := ioutil . TempDir ( " " , " " ) if err != nil { t . Fatalf ( " " , err ) } if err := os . Chmod ( dir , 0777 ) ; err != nil { t . Fatalf ( " " , err ) } return allocdir . NewAllocDir ( log . New ( os . Stderr , " " , log . LstdFlags ) , dir ) }
tempAllocDir returns a new alloc dir that is rooted in a temp dir.
tempAllocDir returns a new alloc dir that is rooted in a temp dir .