summaryrefslogtreecommitdiffhomepage
path: root/pkg/safecopy/safecopy_unsafe.go
diff options
context:
space:
mode:
authorJinmou Li <jinmli@google.com>2020-06-24 19:38:47 +0000
committerJinmou Li <jinmli@google.com>2020-08-26 22:54:03 +0000
commit5c491164f90f0569de740be46984d36f25569bff (patch)
tree418d5a14b388dd639af66e5bb1d1a13a5d4ca16b /pkg/safecopy/safecopy_unsafe.go
parent983a55aa0649e48467b2e41f9550759535634854 (diff)
beef up write syscall tests
Added a few tests for write(2) and pwrite(2) 1. Regular Files For write(2) - write zero bytes should not move the offset - write non-zero bytes should increment the offset the exact amount - write non-zero bytes after a lseek() should move the offset the exact amount after the seek - write non-zero bytes with O_APPEND should move the offset the exact amount after original EOF For pwrite(2), offset is not affected when - pwrite zero bytes - pwrite non-zero bytes For EOF, added a test asserting the EOF (indicated by lseek(SEEK_END)) is updated properly after writing non-zero bytes 2. Symlink Added one pwite64() call for symlink that is written as a counterpart of the existing test using pread64()
Diffstat (limited to 'pkg/safecopy/safecopy_unsafe.go')
0 files changed, 0 insertions, 0 deletions