[netperf-dev] netperf4 commit notice r210 - in trunk/suites: disk
dns vst
burger at netperf.org
burger at netperf.org
Mon Mar 12 07:52:22 PST 2007
Author: burger
Date: 2007-03-12 07:52:21 -0800 (Mon, 12 Mar 2007)
New Revision: 210
Modified:
trunk/suites/disk/disktest.c
trunk/suites/dns/nettest_dns.c
trunk/suites/vst/nettest_vst.c
Log:
Changed errno to GET_ERRNO so test would report correct error conditions
on windows. Fixed a few minor problems with disktest and vst test.
Now disktest and vst test can be removed from src and left only in suites.
Stephen Burger
Modified: trunk/suites/disk/disktest.c
===================================================================
--- trunk/suites/disk/disktest.c 2007-03-09 22:22:30 UTC (rev 209)
+++ trunk/suites/disk/disktest.c 2007-03-12 15:52:21 UTC (rev 210)
@@ -102,7 +102,8 @@
{
int loc_debug = 1;
if (test->debug || loc_debug) {
- fprintf(test->where,"%s: called report_test_failure:",function);
+ fprintf(test->where,"%s - %s: called report_test_failure:",
+ (char *)test->id,function);
fprintf(test->where,"reporting %s errno = %d\n",err_string,GET_ERRNO);
fflush(test->where);
}
@@ -966,6 +967,7 @@
DISK_TEST_RDWR_OPEN_FAILED,
"read/write open of file_name failed");
}
+ my_data->fd = fd;
}
/* seek to the starting location on the disk */
@@ -1137,7 +1139,7 @@
outfd = stdout;
}
/* allocate and initialize report data */
- malloc_size = sizeof(disk_results_t) + 7 * max_count * sizeof(double);
+ malloc_size = sizeof(disk_results_t) + 8 * max_count * sizeof(double);
rd = malloc(malloc_size);
if (rd) {
@@ -1268,15 +1270,15 @@
seek_call_rate = test_cntr[TST_S_CALLS] / elapsed_seconds;
iops = read_call_rate + write_call_rate;
if (test_set->debug) {
- fprintf(test_set->where,"\tread_rate = %7g\t%7g\n",
+ fprintf(test_set->where,"\tread_rate = %7g\t%7g\n",
read_rate, test_cntr[TST_R_BYTES]);
- fprintf(test_set->where,"\twrite_rate = %7g\t%7g\n",
+ fprintf(test_set->where,"\twrite_rate = %7g\t%7g\n",
write_rate, test_cntr[TST_W_BYTES]);
- fprintf(test_set->where,"\tread_call_rate = %7g\t%7g\n",
+ fprintf(test_set->where,"\tread_call_rate = %7g\t%7g\n",
read_call_rate, test_cntr[TST_R_CALLS]);
fprintf(test_set->where,"\twrite_call_rate = %7g\t%7g\n",
write_call_rate, test_cntr[TST_W_CALLS]);
- fprintf(test_set->where,"\tseek_call_rate = %7g\t%7g\n",
+ fprintf(test_set->where,"\tseek_call_rate = %7g\t%7g\n",
seek_call_rate, test_cntr[TST_S_CALLS]);
fflush(test_set->where);
}
@@ -1295,6 +1297,21 @@
rd->write_iops[index] += write_call_rate;
rd->iops[index] += iops;
+ if (test_set->debug) {
+ fprintf(test_set->where,"\trun_time[%d] = %7g\n",
+ index, rd->run_time[index]);
+ fprintf(test_set->where,"\tread_results[%d] = %7g\n",
+ index, rd->read_results[index]);
+ fprintf(test_set->where,"\twrite_results[%d] = %7g\n",
+ index, rd->write_results[index]);
+ fprintf(test_set->where,"\tread_iops[%d] = %7g\n",
+ index, rd->read_iops[index]);
+ fprintf(test_set->where,"\twrite_iops[%d] = %7g\n",
+ index, rd->write_iops[index]);
+ fprintf(test_set->where,"\tiops[%d] = %7g\n",
+ index, rd->iops[index]);
+ fflush(test_set->where);
+ }
if (rd->print_hist) {
xmlNodePtr hist;
hist = stats->xmlChildrenNode;
@@ -1517,7 +1534,7 @@
while (stats != NULL) {
/* process all the statistics records for this test */
if (test_set->debug) {
- fprintf(test_set->where,"\tfound some statistics");
+ fprintf(test_set->where,"\tfound some statistics\n");
fflush(test_set->where);
}
if(!xmlStrcmp(stats->name,(const xmlChar *)"sys_stats")) {
Modified: trunk/suites/dns/nettest_dns.c
===================================================================
--- trunk/suites/dns/nettest_dns.c 2007-03-09 22:22:30 UTC (rev 209)
+++ trunk/suites/dns/nettest_dns.c 2007-03-12 15:52:21 UTC (rev 210)
@@ -534,7 +534,7 @@
&sock_opt_len) < 0) {
fprintf(test->where,
"nettest_dns: create_data_socket: getsockopt SO_SNDBUF: errno %d\n",
- errno);
+ GET_ERRNO);
fflush(test->where);
lss_size = -1;
}
@@ -545,7 +545,7 @@
&sock_opt_len) < 0) {
fprintf(test->where,
"nettest_dns: create_data_socket: getsockopt SO_RCVBUF: errno %d\n",
- errno);
+ GET_ERRNO);
fflush(test->where);
lsr_size = -1;
}
@@ -587,7 +587,7 @@
sizeof(one)) < 0) {
fprintf(test->where,
"netperf: create_data_socket: nodelay: errno %d\n",
- errno);
+ GET_ERRNO);
fflush(test->where);
}
@@ -1110,7 +1110,7 @@
my_data->remaddr->ai_addr,
my_data->remaddr->ai_addrlen) < 0) {
report_test_failure(test,
- __func__,
+ (char *)__func__,
DNSE_CONNECT_FAILED,
"data socket connect failed");
} else {
@@ -1149,7 +1149,7 @@
connection in TIME_WAIT when TCP connections are being used. */
if (close(my_data->query_socket) == -1) {
report_test_failure(test,
- __func__,
+ (char *)__func__,
DNSE_SOCKET_SHUTDOWN_FAILED,
"failure shuting down data socket");
}
@@ -1160,7 +1160,7 @@
/* a transition to a state other than TEST_IDLE was requested
after the link was closed in the TEST_LOADED state */
report_test_failure(test,
- __func__,
+ (char *)__func__,
DNSE_DATA_CONNECTION_CLOSED_ERROR,
"data connection closed and non idle state requested");
Modified: trunk/suites/vst/nettest_vst.c
===================================================================
--- trunk/suites/vst/nettest_vst.c 2007-03-09 22:22:30 UTC (rev 209)
+++ trunk/suites/vst/nettest_vst.c 2007-03-12 15:52:21 UTC (rev 210)
@@ -1029,7 +1029,7 @@
&sock_opt_len) < 0) {
fprintf(test->where,
"%s: %s: getsockopt SO_SNDBUF: errno %d\n",
- __FILE__, __func__, errno);
+ __FILE__, __func__, GET_ERRNO);
fflush(test->where);
lss_size = -1;
}
@@ -1040,7 +1040,7 @@
&sock_opt_len) < 0) {
fprintf(test->where,
"%s: %s: getsockopt SO_RCVBUF: errno %d\n",
- __FILE__, __func__, errno);
+ __FILE__, __func__, GET_ERRNO);
fflush(test->where);
lsr_size = -1;
}
@@ -1120,7 +1120,7 @@
sizeof(one)) < 0) {
fprintf(test->where,
"%s: %s: nodelay: errno %d\n",
- __FILE__, __func__, errno);
+ __FILE__, __func__, GET_ERRNO);
fflush(test->where);
}
@@ -1541,7 +1541,7 @@
if (test->debug) {
fprintf(test->where,
"%s:bind returned %d errno=%d\n",
- __func__, rc, errno);
+ __func__, rc, GET_ERRNO);
fflush(test->where);
}
if (rc == -1) {
More information about the netperf-dev
mailing list