binutils-gdb/gdb/unittests
Tom Tromey 36033ef57c Do not reopen temporary files
The current callers of mkostemp close the file descriptor and then
re-open it with fopen.  It seemed better to me to continue to use the
already-opened file descriptor, so this patch rearranges the code a
little in order to do so.  It takes care to ensure that the files are
only unlinked after the file descriptor in question is closed, as
before.

gdb/ChangeLog
2018-10-27  Tom Tromey  <tom@tromey.com>

	* unittests/scoped_fd-selftests.c (test_to_file): New function.
	(run_tests): Call test_to_file.
	* dwarf-index-write.c (write_psymtabs_to_index): Do not reopen
	temporary files.
	* common/scoped_fd.h (scoped_fd::to_file): New method.
2018-10-27 11:58:41 -06:00
..
basic_string_view Simple unused variable removals 2018-07-22 13:20:01 -06:00
optional Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
array-view-selftests.c Simple -Wshadow=local fixes 2018-10-04 22:51:45 -06:00
cli-utils-selftests.c Add a self-test for cli-utils.c 2018-07-12 23:10:56 +02:00
common-utils-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
environ-selftests.c Move gdb/common/diagnostics.h to include/diagnostics.h 2018-06-01 09:40:30 -07:00
format_pieces-selftests.c format_pieces-selftests.c: Silence ARI warnings 2018-05-18 15:47:56 -04:00
function-view-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
lookup_name_info-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
memory-map-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
memrange-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
mkdir-recursive-selftests.c Move mkdir_recursive to common/filestuff.c 2018-10-27 11:58:41 -06:00
observable-selftests.c Convert observers to C++ 2018-03-19 09:37:49 -06:00
offset-type-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
optional-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
parse-connection-spec-selftests.c Implement IPv6 support for GDB/gdbserver 2018-07-11 19:41:31 -04:00
ptid-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
rsp-low-selftests.c Get rid of VEC(static_tracepoint_marker_p) 2018-03-22 00:27:19 -04:00
scoped_fd-selftests.c Do not reopen temporary files 2018-10-27 11:58:41 -06:00
scoped_mmap-selftests.c Use mkostemp, not mkstemp 2018-10-27 11:58:41 -06:00
scoped_restore-selftests.c Update copyright year range in all GDB files 2018-01-02 07:38:06 +04:00
string_view-selftests.c Define GNULIB_NAMESPACE in unittests/string_view-selftests.c 2018-05-08 16:45:02 -04:00
tracepoint-selftests.c Get rid of VEC(static_tracepoint_marker_p) 2018-03-22 00:27:19 -04:00
unpack-selftests.c Sign-extend non-bit-fields in unpack_bits_as_long 2018-02-26 09:21:08 -07:00
utils-selftests.c Add selftest for substitute_path_component 2018-03-15 22:04:42 -04:00
xml-utils-selftests.c Add xml_escape_text_append and use it 2018-03-08 18:04:46 -05:00