Commit f3536629 authored by Bryan C. Mills's avatar Bryan C. Mills Committed by Dmitri Shuralyov
Browse files

[release-branch.go1.13] os: use an actual RemoveAll failure in...

[release-branch.go1.13] os: use an actual RemoveAll failure in TestRemoveAllWithMoreErrorThanReqSize

Previously we injected an error, and the injection points were
(empirically) not realistic on some platforms.

Instead, we now make the directory read-only, which (on most
platforms) suffices to prevent the removal of its files.

Also remove unused test hook, as was done in CL 204060.

For #35117.
For #29921.
Fixes #37895.

Change-Id: Ica4e2818566f8c14df3eed7c3b8de5c0abeb6963
Reviewed-on: https://go-review.googlesource.com/c/go/+/203502


Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
(cherry picked from commit 06bdd52f)
Reviewed-on: https://go-review.googlesource.com/c/go/+/223700


Run-TryBot: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: default avatarAlexander Rakoczy <alex@golang.org>
parent 72616191
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment