From b58f933cf04ddb6815a6696a6139d2ba605431ec Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 13 Sep 2024 11:36:49 +0200 Subject: sys/linux: ignore return values of lseek for fake coverage --- sys/linux/sys.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'sys/linux/sys.txt') diff --git a/sys/linux/sys.txt b/sys/linux/sys.txt index 75286af02..4ee926fd6 100644 --- a/sys/linux/sys.txt +++ b/sys/linux/sys.txt @@ -131,7 +131,11 @@ pwrite64(fd fd, buf buffer[in], count len[buf], pos fileoff) writev(fd fd, vec ptr[in, array[iovec_in]], vlen len[vec]) pwritev(fd fd, vec ptr[in, array[iovec_in]], vlen len[vec], off_low int32, off_high int32) pwritev2(fd fd, vec ptr[in, array[iovec_in]], vlen len[vec], off_low int32, off_high int32, flags flags[rwf_flags]) -lseek(fd fd, offset fileoff, whence flags[seek_whence]) +# lseek can return negative offsets when the file has FMODE_UNSIGNED_OFFSET flag: +# https://elixir.bootlin.com/linux/v6.11-rc7/source/fs/read_write.c#L56 +# It's unclear how it's then even possible to distinguish error from valid offset, but it's not our problem. +# We just have to ignore return values of lseek. +lseek(fd fd, offset fileoff, whence flags[seek_whence]) (ignore_return) copy_file_range(fd_in fd, off_in ptr[inout, fileoff[int64], opt], fd_out fd, off_out ptr[inout, fileoff[int64], opt], len intptr, flags flags[copy_file_range_flags]) rwf_flags = RWF_DSYNC, RWF_HIPRI, RWF_SYNC, RWF_NOWAIT, RWF_APPEND -- cgit mrf-deployment