mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
test: fix socket issue in iperf example test
This commit is contained in:
parent
7be1a8d689
commit
bc65641ac4
@ -149,6 +149,7 @@ static esp_err_t IRAM_ATTR iperf_run_tcp_server(void)
|
||||
return ESP_FAIL;
|
||||
}
|
||||
|
||||
printf("iperf tcp server create successfully\n");
|
||||
buffer = s_iperf_ctrl.buffer;
|
||||
want_recv = s_iperf_ctrl.buffer_len;
|
||||
while (!s_iperf_ctrl.finish) {
|
||||
|
@ -358,6 +358,12 @@ class IperfTestUtility(object):
|
||||
with open(PC_IPERF_TEMP_LOG_FILE, "w") as f:
|
||||
if proto == "tcp":
|
||||
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,
|
||||
"-t", str(TEST_TIME), "-f", "m"],
|
||||
stdout=f, stderr=f)
|
||||
|
Loading…
x
Reference in New Issue
Block a user