]> Cypherpunks.ru repositories - gostls13.git/commit
os: test that copying to append-only files doesn't fail on Linux
authorTobias Klauser <tklauser@distanz.ch>
Wed, 9 Aug 2023 14:51:10 +0000 (16:51 +0200)
committerGopher Robot <gobot@golang.org>
Wed, 9 Aug 2023 21:29:36 +0000 (21:29 +0000)
commite6637f32930c934ad3836805288aa473717ee083
tree4139c73bdec824e41d294317cca55ecb4caeaabb
parent6c5fc6d7cebf5ba6e78c2c3189621aad369bffaa
os: test that copying to append-only files doesn't fail on Linux

Before CL 494915, this test would fail on Linux in io.Copy with error
"write /dev/stdout: copy_file_range: bad file descriptor" because the
copy_file_range syscall doesn't support destination files opened with
O_APPEND, see
https://man7.org/linux/man-pages/man2/copy_file_range.2.html#ERRORS

For #60181

Change-Id: I2eb4bcac71175121821e0033eb2297a2bc4ec759
Reviewed-on: https://go-review.googlesource.com/c/go/+/517755
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
src/os/os_test.go