summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoroci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-08-17 18:36:25 +0000
committeroci <oci@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>2001-08-17 18:36:25 +0000
commit508ca3e65c6f13e83ada12b181b4bd723a3bdc93 (patch)
tree97f8d6dfabb1cd894f210f2a36f89e4ed8d96c19
parent5638a6b6d62434a5aead906c4eee9a0e687a67ca (diff)
downloadATCD-508ca3e65c6f13e83ada12b181b4bd723a3bdc93.tar.gz
ChangeLogTag: Fri Aug 17 13:31:45 2001 Chad Elliott <elliott_c@ociweb.com>
-rw-r--r--ChangeLog27
-rw-r--r--ChangeLogs/ChangeLog-02a27
-rw-r--r--ChangeLogs/ChangeLog-03a27
-rw-r--r--tests/Makefile7
-rw-r--r--tests/run_test.lst24
-rwxr-xr-xtests/run_test.pl56
-rw-r--r--tests/run_tests.vxworks276
-rw-r--r--tests/test_config.h7
8 files changed, 154 insertions, 297 deletions
diff --git a/ChangeLog b/ChangeLog
index aa5ad7b4492..efc7607e58a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,30 @@
+Fri Aug 17 13:31:45 2001 Chad Elliott <elliott_c@ociweb.com>
+
+ * tests/run_test.pl:
+
+ Added the ability to generate windsh commands to load and run
+ the ace tests.
+
+ * tests/Makefile:
+
+ Added a rule to generate run_test.vxworks, using run_test.pl,
+ which can be used to run the tests selected for the VxWorks OS.
+
+ * tests/run_test.lst:
+
+ Update this list to take into account the limitations of VxWorks.
+
+ * tests/test_config.h:
+
+ Change the permissions of the log file open (for VxWorks only) to
+ use the symbolic permission names instead of 0x644. The
+ permissions differ from the standard UNIX modes.
+
+ * tests/run_tests.vxworks:
+
+ This file was out of date and no longer needs to be maintained.
+ So, it has been removed.
+
Fri Aug 17 09:44:49 2001 Balachandran Natarajan <bala@cs.wustl.edu>
* ace/Map_T.{h,i}: Reverted this change "Fri Aug 17 08:07:12 2001
diff --git a/ChangeLogs/ChangeLog-02a b/ChangeLogs/ChangeLog-02a
index aa5ad7b4492..efc7607e58a 100644
--- a/ChangeLogs/ChangeLog-02a
+++ b/ChangeLogs/ChangeLog-02a
@@ -1,3 +1,30 @@
+Fri Aug 17 13:31:45 2001 Chad Elliott <elliott_c@ociweb.com>
+
+ * tests/run_test.pl:
+
+ Added the ability to generate windsh commands to load and run
+ the ace tests.
+
+ * tests/Makefile:
+
+ Added a rule to generate run_test.vxworks, using run_test.pl,
+ which can be used to run the tests selected for the VxWorks OS.
+
+ * tests/run_test.lst:
+
+ Update this list to take into account the limitations of VxWorks.
+
+ * tests/test_config.h:
+
+ Change the permissions of the log file open (for VxWorks only) to
+ use the symbolic permission names instead of 0x644. The
+ permissions differ from the standard UNIX modes.
+
+ * tests/run_tests.vxworks:
+
+ This file was out of date and no longer needs to be maintained.
+ So, it has been removed.
+
Fri Aug 17 09:44:49 2001 Balachandran Natarajan <bala@cs.wustl.edu>
* ace/Map_T.{h,i}: Reverted this change "Fri Aug 17 08:07:12 2001
diff --git a/ChangeLogs/ChangeLog-03a b/ChangeLogs/ChangeLog-03a
index aa5ad7b4492..efc7607e58a 100644
--- a/ChangeLogs/ChangeLog-03a
+++ b/ChangeLogs/ChangeLog-03a
@@ -1,3 +1,30 @@
+Fri Aug 17 13:31:45 2001 Chad Elliott <elliott_c@ociweb.com>
+
+ * tests/run_test.pl:
+
+ Added the ability to generate windsh commands to load and run
+ the ace tests.
+
+ * tests/Makefile:
+
+ Added a rule to generate run_test.vxworks, using run_test.pl,
+ which can be used to run the tests selected for the VxWorks OS.
+
+ * tests/run_test.lst:
+
+ Update this list to take into account the limitations of VxWorks.
+
+ * tests/test_config.h:
+
+ Change the permissions of the log file open (for VxWorks only) to
+ use the symbolic permission names instead of 0x644. The
+ permissions differ from the standard UNIX modes.
+
+ * tests/run_tests.vxworks:
+
+ This file was out of date and no longer needs to be maintained.
+ So, it has been removed.
+
Fri Aug 17 09:44:49 2001 Balachandran Natarajan <bala@cs.wustl.edu>
* ace/Map_T.{h,i}: Reverted this change "Fri Aug 17 08:07:12 2001
diff --git a/tests/Makefile b/tests/Makefile
index 80b4702f69e..bd74e59659f 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -198,6 +198,13 @@ libDLL_Test.$(SOEXT): DLL_Test_Impl.cpp DLL_Test_Impl.h
libService_Config_DLL.$(SOEXT): Service_Config_DLL.cpp Service_Config_DLL.h
@$(MAKE) -f Makefile.Service_Config_DLL
+ifdef VXWORKS
+all: run_test.vxworks
+
+run_test.vxworks: run_test.lst
+ run_test.pl -v -Config STATIC -Config CHECK_RESOURCES > run_test.vxworks
+endif
+
realclean: clean
-$(RM) libDLL_Test.$(SOEXT) libService_Config_DLL.*
-$(RM) log/compilations.log*
diff --git a/tests/run_test.lst b/tests/run_test.lst
index 3279e993a6d..c49d820b114 100644
--- a/tests/run_test.lst
+++ b/tests/run_test.lst
@@ -22,16 +22,16 @@ Barrier_Test
Basic_Types_Test
Buffer_Stream_Test
Cache_Map_Manager_Test
-Cached_Conn_Test: !LynxOS
-Cached_Accept_Conn_Test
+Cached_Conn_Test: !LynxOS !VxWorks
+Cached_Accept_Conn_Test: !VxWorks
Capabilities_Test
CDR_Test
CDR_File_Test
CDR_Array_Test
Collection_Test
Config_Test
-Conn_Test: !chorus
-Dirent_Test
+Conn_Test: !chorus !VxWorks
+Dirent_Test: !VxWorks
DLL_Test: !Unicos !STATIC !KCC_Linux
DLList_Test
Dynamic_Priority_Test
@@ -45,30 +45,30 @@ Hash_Map_Bucket_Iterator_Test
High_Res_Timer_Test
IOStream_Test
Lazy_Map_Manager_Test
-Log_Msg_Test
+Log_Msg_Test: !VxWorks
Logging_Strategy_Test: !STATIC !ST
Map_Manager_Test
Map_Test
Max_Default_Port_Test: !ST
-MEM_Stream_Test
+MEM_Stream_Test: !VxWorks
Mem_Map_Test: !chorus !Unicos
Message_Block_Test: !chorus
Message_Queue_Notifications_Test
Message_Queue_Test: !chorus
Message_Queue_Test_Ex: !chorus
MM_Shared_Memory_Test: !chorus !Unicos
-MT_Reactor_Timer_Test
+MT_Reactor_Timer_Test: !VxWorks
MT_SOCK_Test: !chorus
Malloc_Test
-Naming_Test: OTHER !chorus !LynxOS !Unicos
+Naming_Test: OTHER !chorus !LynxOS !Unicos !VxWorks
New_Fail_Test: ALL !DISABLED
Notify_Performance_Test
Object_Manager_Test
OrdMultiSet_Test
OS_Test
Pipe_Test: !MSVC !chorus
-Priority_Buffer_Test
-Priority_Reactor_Test: !chorus
+Priority_Buffer_Test: !VxWorks
+Priority_Reactor_Test: !chorus !VxWorks
Priority_Task_Test: !Unicos
Process_Manager_Test: ALL MSVC !DISABLED
Process_Mutex_Test: !MSVC !chorus
@@ -81,7 +81,7 @@ Reactor_Performance_Test: !chorus
Reactor_Timer_Test
Reader_Writer_Test
Recursive_Mutex_Test: !ST
-Refcounted_Auto_Ptr_Test
+Refcounted_Auto_Ptr_Test: !VxWorks
Reverse_Lock_Test
Semaphore_Test
Service_Config_Test: !STATIC
@@ -99,7 +99,7 @@ Thread_Manager_Test: !Unicos
Thread_Mutex_Test: !chorus
Thread_Pool_Reactor_Test: OTHER
Thread_Pool_Reactor_Resume_Test: OTHER !ST
-Thread_Pool_Test: !LynxOS
+Thread_Pool_Test: !LynxOS !VxWorks
Timer_Queue_Test
Timeprobe_Test
Time_Service_Test: ALL !STATIC !DISABLED !missing_netsvcs TOKEN !chorus !Unicos
diff --git a/tests/run_test.pl b/tests/run_test.pl
index 42562c7e5a4..d69a44b8c03 100755
--- a/tests/run_test.pl
+++ b/tests/run_test.pl
@@ -49,6 +49,10 @@ sub check_for_more_configs ()
if (!-x $P->Executable ()) {
$config_list->add_one_config ('missing_netsvcs');
}
+
+ if (defined $opt_v) {
+ $config_list->add_one_config ('VxWorks');
+ }
}
################################################################################
@@ -72,13 +76,18 @@ sub record_resources ()
sub check_resources ()
{
if ($config_list->check_config ('CHECK_RESOURCES')) {
- $end_test_resources=`ipcs | egrep $user`;
+ if (defined $opt_v) {
+ print "memShow();\n";
+ }
+ else {
+ $end_test_resources=`ipcs | egrep $user`;
- if ("$start_test_resources" ne "$end_test_resources") {
- print STDERR "Warning: the ACE tests _may_ have leaked OS ".
- "resources!\n";
- print STDERR "Warning: Before: $start_test_resources\n";
- print STDERR "Warning: After: $end_test_resources\n";
+ if ("$start_test_resources" ne "$end_test_resources") {
+ print STDERR "Warning: the ACE tests _may_ have leaked OS ".
+ "resources!\n";
+ print STDERR "Warning: Before: $start_test_resources\n";
+ print STDERR "Warning: After: $end_test_resources\n";
+ }
}
}
}
@@ -122,6 +131,21 @@ sub run_program ($)
################################################################################
+sub output_vxworks_commands ($)
+{
+ my($program) = shift;
+ my($length) = length($program) + 2;
+ if ($config_list->check_config ('CHECK_RESOURCES')) {
+ print "memShow();\n";
+ }
+ print "write(2, \"\\n$program\\n\", $length);\n" .
+ "ld < $program\n" .
+ "ace_main (0, 0);\n" .
+ "unld \"$program\"\n";
+}
+
+################################################################################
+
sub purify_program ($)
{
### @todo
@@ -246,7 +270,7 @@ sub delete_temp_files ()
$config_list->load ("run_test.lst");
-if (!getopts ('dht') || $opt_h) {
+if (!getopts ('dhtv') || $opt_h) {
print "run_test.pl [-h] [-t file1 file2 ...]\n";
print "\n";
print "Runs the tests listed in run_test.lst\n";
@@ -255,6 +279,7 @@ if (!getopts ('dht') || $opt_h) {
print " -d Debug mode (do not run tests)\n";
print " -h Display this help\n";
print " -t Runs all the tests passed via the cmd line\n";
+ print " -v Generate run_test.vxworks\n";
print "\n";
print "Pass in configs using \"-Config XXXXX\"\n";
print "\n";
@@ -294,6 +319,20 @@ if ($OSNAME eq "MSWin32") {
$ENV{'PATH'} .= ':'.$PerlACE::Process::ExeSubDir;
}
+if (defined $opt_v) {
+ print "#\n" .
+ "# ACE one-button test for VxWorks 5.x.\n" .
+ "# To use: -> < run_test.vxworks > run_test.log\n" .
+ "#\n" .
+ "# NOTE: if you build with a shared ACE library, be sure to load\n" .
+ "# that first:\n" .
+ "# -> ld < ../ace/libACE.so\n" .
+ "# and unld it after running the tests.\n" .
+ "#\n" .
+ "# The output logs can be checked from a Unix host:\n" .
+ "# % ./run_tests.check log/*.log\n\n";
+}
+
foreach $test (@tests) {
if (defined $opt_d) {
print "Would run test $test now\n";
@@ -301,6 +340,9 @@ foreach $test (@tests) {
elsif ($config_list->check_config ('Purify')) {
purify_program ($test);
}
+ elsif (defined $opt_v) {
+ output_vxworks_commands ($test);
+ }
else {
run_program ($test);
}
diff --git a/tests/run_tests.vxworks b/tests/run_tests.vxworks
deleted file mode 100644
index 60d93eb1d95..00000000000
--- a/tests/run_tests.vxworks
+++ /dev/null
@@ -1,276 +0,0 @@
-# $Id$
-#
-# ACE one-button test for VxWorks 5.2/3.x.
-# To use: -> < run_tests.vxworks > run_tests.log
-#
-# NOTE: if you build with a shared ACE library, be sure to load
-# that first:
-# -> ld < ../ace/libACE.so
-# and unld it after running the tests.
-#
-# The output logs can be checked from a Unix host:
-# % ./run_tests.check log/*.log
-#
-# These tests are not run because VxWorks doesn't support their functionality:
-# Mem_Map_Test (ENOTSUP: mmap)
-# SV_Shared_Memory_Test (SYSV IPC is not supported on this platform)
-# MM_Shared_Memory_Test (ENOTSUP: mmap)
-# Reactor_Exceptions_Test (C++ exceptions not supported on this platform)
-# Notify_Performance_Test (ENOTSUP: fcntl)
-# SPIPE_Test (SPIPE is not supported on this platform)
-# UPIPE_SAP_Test (UPIPE is not supported on this platform)
-# Time_Service_Test (ENOTSUP: fork)
-# Tokens_Test (ENOTSUP: fork)
-# Pipe_Test (ENOTSUP: fork)
-# Process_Mutex_Test (ENOTSUP: fork)
-# Process_Strategy_Test (ENOTSUP: flock_wrlock)
-# Enum_Interfaces_Test (ENOTSUP: ACE::get_ip_interfaces)
-#
-# These tests are not run because they fail, catastrophically:
-# Naming_Test (page fault)
-# Reactor_Performance_Test (unknown? doesn't appear to do anything)
-# Service_Config_Test (page fault)
-# A few other tests now fail; these tests have run in previous ACE
-# versions. Their invocations are commented out below.
-
-memShow
-
-ld < Basic_Types_Test
-write 2, "Basic_Types_Test ", 17
-ace_main; unld "Basic_Types_Test"
-
-ld < CDR_Test
-write 2, "CDR_Test ", 9
-ace_main; unld "CDR_Test"
-
-##
-## @@ According to the ace config files the compiler we are
-## @@ using is pre 2.8 (i.e., ACE_HAS_GNUG_PRE_2_8 is defined).
-## @@ Therefore don't run CDR_Array_Test since the Makefile
-## @@ doesn't build it (due to the ACE_HAS_GNUG_PRE_2_8 macro).
-##
-## ld < CDR_Array_Test
-## write 2, "CDR_Array_Test ", 9
-## ace_main; unld "CDR_Array_Test"
-
-##
-## @@ I'm not sure if File_Test can run on vxworks.
-##
-## ld < CDR_File_Test
-## write 2, "CDR_File_Test ", 9
-## ace_main; unld "CDR_File_Test"
-
-ld < DLList_Test
-write 2, "DLList_Test ", 13
-ace_main; unld "DLList_Test"
-
-ld < Env_Value_Test
-write 2, "Env_Value_Test ", 15
-ace_main; unld "Env_Value_Test"
-
-ld < Atomic_Op_Test
-write 2, "Atomic_Op_Test ", 15
-ace_main; unld "Atomic_Op_Test"
-
-ld < Object_Manager_Test
-write 2, "Object_Manager_Test ", 20
-ace_main; unld "Object_Manager_Test"
-
-ld < Semaphore_Test
-write 2, "Semaphore_Test ", 15
-ace_main; unld "Semaphore_Test"
-
-ld < TSS_Test
-write 2, "TSS_Test ", 9
-ace_main; unld "TSS_Test"
-
-#### Causes page fault.
-#### ld < Timeprobe_Test
-#### write 2, "Timeprobe_Test ", 15
-#### ace_main; unld "Timeprobe_Test"
-
-ld < Time_Value_Test
-write 2, "Time_Value_Test ", 16
-ace_main; unld "Time_Value_Test"
-
-ld < High_Res_Timer_Test
-write 2, "High_Res_Timer_Test ", 20
-ace_main; unld "High_Res_Timer_Test"
-
-ld < SString_Test
-write 2, "SString_Test ", 13
-ace_main; unld "SString_Test"
-
-ld < Collection_Test
-write 2, "Collection_Test ", 16
-ace_main; unld "Collection_Test"
-
-ld < Handle_Set_Test
-write 2, "Handle_Set_Test ", 16
-ace_main; unld "Handle_Set_Test"
-
-ld < Hash_Map_Manager_Test
-write 2, "Hash_Map_Manager_Test ", 22
-ace_main; unld "Hash_Map_Manager_Test"
-
-ld < Hash_Map_Bucket_Iterator_Test
-write 2, "Hash_Map_Bucket_Iterator_Test ", 29
-ace_main; unld "Hash_Map_Bucket_Iterator_Test"
-
-ld < Sigset_Ops_Test
-write 2, "Sigset_Ops_Test ", 16
-ace_main; unld "Sigset_Ops_Test"
-
-#### ENOTSUP: semop. This could easily be done with POSIX semaphores,
-#### but ACE no longer uses them on VxWorks.
-#### ld < Thread_Mutex_Test
-#### write 2, "Thread_Mutex_Test ", 11
-#### ace_main; unld "Thread_Mutex_Test"
-
-ld < Timer_Queue_Test
-write 2, "Timer_Queue_Test ", 17
-ace_main; unld "Timer_Queue_Test"
-
-ld < SOCK_Connector_Test
-write 2, "SOCK_Connector_Test ", 20
-ace_main; unld "SOCK_Connector_Test"
-
-ld < Task_Test
-write 2, "Task_Test ", 10
-ace_main; unld "Task_Test"
-
-ld < OrdMultiSet_Test
-write 2, "OrdMultiSet_Test ", 17
-ace_main; unld "OrdMultiSet_Test"
-
-ld < Thread_Manager_Test
-write 2, "Thread_Manager_Test ", 20
-ace_main; unld "Thread_Manager_Test"
-
-ld < Thread_Pool_Test
-write 2, "Thread_Pool_Test ", 17
-ace_main; unld "Thread_Pool_Test"
-
-ld < Future_Test
-write 2, "Future_Test ", 12
-ace_main; unld "Future_Test"
-
-#### ld < Future_Set_Test
-#### write 2, "Future_Set_Test ", 12
-#### ace_main; unld "Future_Set_Test"
-
-ld < Reactors_Test
-write 2, "Reactors_Test ", 14
-ace_main; unld "Reactors_Test"
-
-ld < Reactor_Notify_Test
-write 2, "Reactor_Notify_Test ", 20
-ace_main; unld "Reactor_Notify_Test"
-
-ld < Reactor_Timer_Test
-write 2, "Reactor_Timer_Test ", 19
-ace_main; unld "Reactor_Timer_Test"
-
-ld < Reader_Writer_Test
-write 2, "Reader_Writer_Test ", 19
-ace_main; unld "Reader_Writer_Test"
-
-ld < Priority_Reactor_Test
-write 2, "Priority_Reactor_Test ", 22
-ace_main; unld "Priority_Reactor_Test"
-
-ld < SOCK_Test
-write 2, "SOCK_Test ", 10
-ace_main; unld "SOCK_Test"
-
-ld < MT_SOCK_Test
-write 2, "MT_SOCK_Test ", 13
-ace_main; unld "MT_SOCK_Test"
-
-ld < Conn_Test
-write 2, "Conn_Test ", 10
-ace_main; unld "Conn_Test"
-
-### Doesnt run with the current configuration, appears to
-### be max_handles problem. Until researched completely,
-### this test will be disabled on Vxworks.
-#ld < Cached_Conn_Test
-#write 2, "Cached_Conn_Test ", 17
-#ace_main; unld "Cached_Conn_Test"
-
-ld < Cached_Accept_Conn_Test
-write 2, "Cached_Accept_Conn_Test ", 24
-ace_main; unld "Cached_Accept_Conn_Test"
-
-ld < Barrier_Test
-write 2, "Barrier_Test ", 13
-ace_main; unld "Barrier_Test"
-
-ld < Buffer_Stream_Test
-write 2, "Buffer_Stream_Test ", 19
-ace_main; unld "Buffer_Stream_Test"
-
-ld < Priority_Buffer_Test
-write 2, "Priority_Buffer_Test ", 21
-ace_main; unld "Priority_Buffer_Test"
-
-#### Causes VxWorks to go to never-never land.
-#### ld < Dynamic_Priority_Test
-#### write 2, "Dynamic_Priority_Test ", 22
-#### ace_main; unld "Dynamic_Priority_Test"
-
-ld < Recursive_Mutex_Test
-write 2, "Recursive_Mutex_Test ", 21
-ace_main; unld "Recursive_Mutex_Test"
-
-ld < Reverse_Lock_Test
-write 2, "Reverse_Lock_Test ", 18
-ace_main; unld "Reverse_Lock_Test"
-
-ld < Map_Manager_Test
-write 2, "Map_Manager_Test ", 17
-ace_main; unld "Map_Manager_Test"
-
-ld < Cache_Map_Manager_Test
-write 2, "Cache_Map_Manager_Test ", 23
-ace_main; unld "Cache_Map_Manager_Test"
-
-ld < Map_Test
-write 2, "Map_Test ", 9
-ace_main; unld "Map_Test"
-
-ld < Message_Queue_Test
-write 2, "Message_Queue_Test ", 19
-ace_main; unld "Message_Queue_Test"
-
-ld < Message_Queue_Notifications_Test
-write 2, "Message_Queue_Notifications_Test ", 33
-ace_main; unld "Message_Queue_Notifications_Test"
-
-ld < Simple_Message_Block_Test
-write 2, "Simple_Message_Block_Test ", 26
-ace_main; unld "Simple_Message_Block_Test"
-
-ld < Message_Block_Test
-write 2, "Message_Block_Test ", 19
-ace_main; unld "Message_Block_Test"
-
-ld < Priority_Task_Test
-write 2, "Priority_Task_Test ", 19
-ace_main; unld "Priority_Task_Test"
-
-ld < IOStream_Test
-write 2, "IOStream_Test ", 14
-ace_main; unld "IOStream_Test"
-
-ld < Upgradable_RW_Test
-write 2, "Upgradable_RW_Test ", 19
-ace_main; unld "Upgradable_RW_Test"
-
-ld < Svc_Handler_Test
-write 2, "Svc_Handler_Test ", 17
-ace_main; unld "Svc_Handler_Test"
-
-write 2, "\n", 1
-
-memShow
diff --git a/tests/test_config.h b/tests/test_config.h
index 2d65f9a28c6..a8607168076 100644
--- a/tests/test_config.h
+++ b/tests/test_config.h
@@ -123,7 +123,8 @@ const size_t ACE_MAX_THREADS = 4;
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Deleting old log file %s (if any)\n\n"), temp)); \
int fd_init_log; \
if ((fd_init_log = ACE_OS::open (temp, \
- O_WRONLY | O_CREAT, 0x644)) != ERROR) \
+ O_WRONLY|O_CREAT, \
+ S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH)) != ERROR) \
{ \
ACE_OS::close (fd_init_log); \
ACE_OS::unlink (temp); \
@@ -224,7 +225,9 @@ ACE_Test_Output::set_output (const ACE_TCHAR *filename, int append)
// This is the only way I could figure out to avoid a console
// warning about opening an existing file (w/o O_CREAT), or
// attempting to unlink a non-existant one.
- ACE_HANDLE fd = ACE_OS::open (temp, O_WRONLY | O_CREAT, 0x644);
+ ACE_HANDLE fd = ACE_OS::open (temp,
+ O_WRONLY|O_CREAT,
+ S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH);
if (fd != ERROR)
{
ACE_OS::close (fd);