Skip to content

Commit

Permalink
Replaced PIPE with DEVNULL (buffer overflow leading to deadlock)
Browse files Browse the repository at this point in the history
  • Loading branch information
jchabloz committed Oct 10, 2023
1 parent 2c590ac commit ac923a0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions python/test/test_verisocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ def setup_iverilog(port, src_file):
subprocess.check_call(cmd)
libvpi_path = get_abspath(LIBVPI)
cmd = [shutil.which("vvp"), "-lvvp.log", "-m", libvpi_path, vvp_file_path]
pop = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
pop = subprocess.Popen(
cmd, stdout=subprocess.DEVNULL, stderr=subprocess.DEVNULL)
print(f"Launched Icarus with PID {pop.pid}")
# Some delay is required for Icarus to launch the Verisocks server before
# being able to connect - Please adjust CONNECT_DELAY if required.
Expand Down Expand Up @@ -314,7 +315,7 @@ def test_read_not_expected(vs):

def test_sim_finishes(vs):
with pytest.raises(VerisocksError):
answer = vs.run(cb="until_time", time=1200, time_unit="us")
_ = vs.run(cb="until_time", time=1200, time_unit="us")


def test_context_manager():
Expand Down

0 comments on commit ac923a0

Please sign in to comment.