Skip to Content.
Sympa Menu

ndt-dev - [ndt-dev] [ndt] r1045 committed - Consolidate the number of times initialize_tests is called.

Subject: NDT-DEV email list created

List archive

[ndt-dev] [ndt] r1045 committed - Consolidate the number of times initialize_tests is called.


Chronological Thread 
  • From:
  • To:
  • Subject: [ndt-dev] [ndt] r1045 committed - Consolidate the number of times initialize_tests is called.
  • Date: Wed, 02 Apr 2014 23:00:34 +0000

Revision: 1045
Author:

Date: Wed Apr 2 23:00:11 2014 UTC
Log: Consolidate the number of times initialize_tests is called.
http://code.google.com/p/ndt/source/detail?r=1045

Modified:
/branches/Issue143/src/web100srv.c

=======================================
--- /branches/Issue143/src/web100srv.c Fri Mar 21 07:54:57 2014 UTC
+++ /branches/Issue143/src/web100srv.c Wed Apr 2 23:00:11 2014 UTC
@@ -2224,24 +2224,17 @@
close(ctlsockfd);
goto mainloop;
}
+ }

- log_println(6, "xxx, calling initialize_tests()");
- t_opts = initialize_tests(ctlsockfd, &testopt, test_suite,
- sizeof(test_suite));
+ t_opts = initialize_tests(ctlsockfd, &testopt, test_suite,
+ sizeof(test_suite));
+ if (t_opts < 1) { // some error in initialization routines
+ log_println(3, "Invalid test suite received, terminate child");
+ close(ctlsockfd);
+ shutdown(ctlsockfd, SHUT_WR);
+ goto mainloop;
+ }

- if (t_opts < 1) {
- log_println(
- 3,
- "Invalid test suite string '%s' received, terminate child",
- test_suite);
- close(chld_pipe[0]);
- close(chld_pipe[1]);
- shutdown(ctlsockfd, SHUT_WR);
- close(ctlsockfd);
-
- /* todo: handle other error contitions */
- }
- }
new_child = (struct ndtchild *) malloc(sizeof(struct ndtchild));
memset(new_child, 0, sizeof(struct ndtchild));
tt = time(0);
@@ -2304,24 +2297,6 @@
}
continue;
}
-
- t_opts = initialize_tests(ctlsockfd, &testopt, test_suite,
- sizeof(test_suite));
- if (t_opts < 1) { // some error in initialization routines
- log_println(3, "Invalid test suite received, terminate child");
- close(chld_pipe[0]);
- close(chld_pipe[1]);
- shutdown(ctlsockfd, SHUT_WR);
- close(ctlsockfd);
- kill(chld_pid, SIGTERM);
- if (new_child != NULL) {
- log_println(6, "Freeing new_child=0x%x because of "
- "invalid test suite",
- new_child);
- free(new_child);
- }
- continue;
- }
// socket interrupt, retry
while ((retcode = sem_wait(&ndtq)) == -1 && errno == EINTR) {
log_println(6, "Waiting for ndtq semaphore to free - 1");


  • [ndt-dev] [ndt] r1045 committed - Consolidate the number of times initialize_tests is called., ndt, 04/02/2014

Archive powered by MHonArc 2.6.16.

Top of Page