]> Cypherpunks repositories - gostls13.git/commit
os: use an actual RemoveAll failure in TestRemoveAllWithMoreErrorThanReqSize
authorBryan C. Mills <bcmills@google.com>
Fri, 25 Oct 2019 19:37:00 +0000 (15:37 -0400)
committerBryan C. Mills <bcmills@google.com>
Sat, 26 Oct 2019 01:46:02 +0000 (01:46 +0000)
commit06bdd52f7540eca9e3ade6e78234d00703f3ee23
tree4614692f28c6808b592e8eb7d60710bd6f810555
parent66f78e9d885e9a8ed7f8d2432d9f08bb586dd7cb
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.

Fixes #35117
Updates #29921

Change-Id: Ica4e2818566f8c14df3eed7c3b8de5c0abeb6963
Reviewed-on: https://go-review.googlesource.com/c/go/+/203502
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/os/export_test.go
src/os/removeall_at.go
src/os/removeall_noat.go
src/os/removeall_test.go