zfs/tests/zfs-tests/cmd
Antonio Russo a7304ab9c1
ZTS: close in mmapwrite.c
mmapwrite is used during the ZTS to identify issues with mmap-ed files.
This helper program exercises this pathway by continuously writing to a
file.  ee6bf97c7 modified the writing threads to terminate after a set
amount of total data is written.  This change allows standard program
execution to reach the end of a writer thread without closing the file
descriptor, introducing a resource "leak."

This patch appeases resource leak analyses by close()-ing the file at
the end of the thread.

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Antonio Russo <aerusso@aerusso.net>
Closes #14353
2023-01-06 10:52:08 -08:00
..
checksum Fix declarations of non-global variables 2022-10-18 11:05:32 -07:00
file Handle possible null pointers from malloc/strdup/strndup() 2022-10-06 17:18:40 -07:00
linux_dos_attributes tests: cmd: don't recurse 2022-04-01 17:58:23 -07:00
.gitignore zfs_rename: support RENAME_* flags 2022-10-28 09:49:20 -07:00
Makefile.am zfs_rename: support RENAME_* flags 2022-10-28 09:49:20 -07:00
badsend.c Handle possible null pointers from malloc/strdup/strndup() 2022-10-06 17:18:40 -07:00
btree_test.c Fix declarations of non-global variables 2022-10-18 11:05:32 -07:00
chg_usr_exec.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
cp_files.c tests: move C test helpers into test cmd 2022-04-01 18:01:39 -07:00
ctime.c Cleanup: Address Clang's static analyzer's unused code complaints 2022-10-14 13:37:54 -07:00
devname2devid.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
dir_rd_update.c Fix unsafe string operations 2022-09-27 16:47:24 -07:00
dosmode_readonly_write.c tests: move C test helpers into test cmd 2022-04-01 18:01:39 -07:00
draid.c Cleanup: Address Clang's static analyzer's unused code complaints 2022-10-14 13:37:54 -07:00
ereports.c tests: move C test helpers into test cmd 2022-04-01 18:01:39 -07:00
get_diff.c Miscellaneous ZTS fixes 2022-09-29 08:56:42 -07:00
getversion.c tests: cmd: don't recurse 2022-04-01 17:58:23 -07:00
idmap_util.c Support idmapped mount in user namespace 2022-11-08 10:28:56 -08:00
libzfs_input_check.c Miscellaneous ZTS fixes 2022-09-29 08:56:42 -07:00
mkbusy.c Cleanup: Address Clang's static analyzer's unused code complaints 2022-10-14 13:37:54 -07:00
mkfile.c Fix userspace memory leaks found by Clang Static Analzyer 2022-09-26 17:18:05 -07:00
mkfiles.c Enable -Wwrite-strings 2022-06-29 14:08:54 -07:00
mktree.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
mmap_exec.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
mmap_libaio.c Fix declarations of non-global variables 2022-10-18 11:05:32 -07:00
mmap_seek.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
mmap_sync.c Fix unsafe string operations 2022-09-27 16:47:24 -07:00
mmapwrite.c ZTS: close in mmapwrite.c 2023-01-06 10:52:08 -08:00
nvlist_to_lua.c Handle possible null pointers from malloc/strdup/strndup() 2022-10-06 17:18:40 -07:00
readmmap.c Miscellaneous ZTS fixes 2022-09-29 08:56:42 -07:00
rename_dir.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
renameat2.c zfs_rename: support RENAME_* flags 2022-10-28 09:49:20 -07:00
rm_lnkcnt_zero_file.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
send_doall.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
stride_dd.c Fix multiplication converted to larger type 2022-10-28 09:30:37 -07:00
suid_write_to_file.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
threadsappend.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
truncate_test.c tests: move C test helpers into test cmd 2022-04-01 18:01:39 -07:00
user_ns_exec.c Cleanup: Address Clang's static analyzer's unused code complaints 2022-10-14 13:37:54 -07:00
xattrtest.c Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
zed_fd_spill-zedlet.c Miscellaneous ZTS fixes 2022-09-29 08:56:42 -07:00
zfs_diff-socket.c Cleanup: Switch to strlcpy from strncpy 2022-09-27 16:35:29 -07:00