diff options
author | Jacob Bachmeyer <jcb@gnu.org> | 2022-11-28 21:21:00 -0600 |
---|---|---|
committer | Jacob Bachmeyer <jcb@gnu.org> | 2022-11-28 21:21:00 -0600 |
commit | e940383f9d28c50559cbbf725035455b75c3ed6f (patch) | |
tree | 1936ab599a842dd9bfc733a36b25708d03cbf26f | |
parent | 23862f5b87903eb6aff695b495a0c7c687958921 (diff) | |
download | dejagnu-e940383f9d28c50559cbbf725035455b75c3ed6f.zip dejagnu-e940383f9d28c50559cbbf725035455b75c3ed6f.tar.gz dejagnu-e940383f9d28c50559cbbf725035455b75c3ed6f.tar.bz2 |
Remove wait() function in dejagnu.h to resolve PR59586
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | dejagnu.h | 36 |
2 files changed, 10 insertions, 32 deletions
@@ -1,5 +1,11 @@ 2022-11-28 Jacob Bachmeyer <jcb@gnu.org> + * dejagnu.h: Remove _DEJAGNU_WAIT_ conditional and revise comment + to explain improved solution to the problem for which it seems to + have been intended as a workaround. + (wait): Remove this function. It conflicted with POSIX wait(2); + this conflict was reported as PR59586. + * testsuite/runtest.main/stats.exp: Add test for UNSUPPORTED result from a unit test program. * testsuite/runtest.main/nested/testsuite/stat.test/unit-sub.awk: @@ -25,15 +25,10 @@ Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ #include <string.h> /* If you have problems with DejaGnu dropping failed, untested, or - * unresolved messages generated by a unit testcase, then: */ - -/* #define _DEJAGNU_WAIT_ */ - -#ifdef _DEJAGNU_WAIT_ -#include <sys/time.h> -#include <sys/types.h> -#include <unistd.h> -#endif + * unresolved messages generated by a unit testcase, then see the section + * "Priority of Expect Patterns" in *note (dejagnu)Writing a test case. or + * use the DejaGnu built-in unit testing support in your testsuite, which + * has been improved to resolve this issue in DejaGnu 1.6.3. */ static int passed; static int failed; @@ -45,21 +40,6 @@ static int xpassed; static char buffer[512]; -void -wait (void) -{ -#ifdef _DEJAGNU_WAIT_ - fd_set rfds; - struct timeval tv; - - FD_ZERO (&rfds); - tv.tv_sec = 0; - tv.tv_usec = 1; - - select (0, &rfds, NULL, NULL, &tv); -#endif -} - static inline void pass (const char* fmt, ...) { @@ -70,7 +50,6 @@ pass (const char* fmt, ...) vsnprintf (buffer, sizeof (buffer), fmt, ap); va_end (ap); printf ("\tPASSED: %s\n", buffer); - wait (); } static inline void @@ -83,7 +62,6 @@ xpass (const char* fmt, ...) vsnprintf (buffer, sizeof (buffer), fmt, ap); va_end (ap); printf ("\tXPASSED: %s\n", buffer); - wait (); } static inline void @@ -96,7 +74,6 @@ fail (const char* fmt, ...) vsnprintf (buffer, sizeof (buffer), fmt, ap); va_end (ap); printf ("\tFAILED: %s\n", buffer); - wait (); } static inline void @@ -109,7 +86,6 @@ xfail (const char* fmt, ...) vsnprintf (buffer, sizeof (buffer), fmt, ap); va_end (ap); printf ("\tXFAILED: %s\n", buffer); - wait (); } static inline void @@ -122,7 +98,6 @@ untested (const char* fmt, ...) vsnprintf (buffer, sizeof (buffer), fmt, ap); va_end (ap); printf ("\tUNTESTED: %s\n", buffer); - wait (); } static inline void @@ -135,7 +110,6 @@ unresolved (const char* fmt, ...) vsnprintf (buffer, sizeof (buffer), fmt, ap); va_end (ap); printf ("\tUNRESOLVED: %s\n", buffer); - wait (); } static inline void @@ -148,7 +122,6 @@ unsupported (const char* fmt, ...) vsnprintf (buffer, sizeof (buffer), fmt, ap); va_end (ap); printf ("\tUNSUPPORTED: %s\n", buffer); - wait (); } static inline void @@ -160,7 +133,6 @@ note (const char* fmt, ...) vsnprintf (buffer, sizeof (buffer), fmt, ap); va_end (ap); printf ("\tNOTE: %s\n", buffer); - wait (); } static inline void |