mirror of
https://github.com/espressif/esp-idf.git
synced 2025-07-31 19:24:33 +02:00
test: fix socket issue in iperf example test
This commit is contained in:
@@ -149,6 +149,7 @@ static esp_err_t IRAM_ATTR iperf_run_tcp_server(void)
|
|||||||
return ESP_FAIL;
|
return ESP_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("iperf tcp server create successfully\n");
|
||||||
buffer = s_iperf_ctrl.buffer;
|
buffer = s_iperf_ctrl.buffer;
|
||||||
want_recv = s_iperf_ctrl.buffer_len;
|
want_recv = s_iperf_ctrl.buffer_len;
|
||||||
while (!s_iperf_ctrl.finish) {
|
while (!s_iperf_ctrl.finish) {
|
||||||
|
@@ -358,6 +358,12 @@ class IperfTestUtility(object):
|
|||||||
with open(PC_IPERF_TEMP_LOG_FILE, "w") as f:
|
with open(PC_IPERF_TEMP_LOG_FILE, "w") as f:
|
||||||
if proto == "tcp":
|
if proto == "tcp":
|
||||||
self.dut.write("iperf -s -i 1 -t {}".format(TEST_TIME))
|
self.dut.write("iperf -s -i 1 -t {}".format(TEST_TIME))
|
||||||
|
# wait until DUT TCP server created
|
||||||
|
try:
|
||||||
|
self.dut.expect("iperf tcp server create successfully", timeout=1)
|
||||||
|
except DUT.ExpectTimeout:
|
||||||
|
# compatible with old iperf example binary
|
||||||
|
pass
|
||||||
process = subprocess.Popen(["iperf", "-c", dut_ip,
|
process = subprocess.Popen(["iperf", "-c", dut_ip,
|
||||||
"-t", str(TEST_TIME), "-f", "m"],
|
"-t", str(TEST_TIME), "-f", "m"],
|
||||||
stdout=f, stderr=f)
|
stdout=f, stderr=f)
|
||||||
|
Reference in New Issue
Block a user