aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-11-22 15:44:10 +0100
committerSverker Eriksson <[email protected]>2018-11-22 15:44:10 +0100
commitff913d619372024c74c93640c60032037a4a6d2e (patch)
tree2edaaa2b896ca26691c8f3dee6abec0385dea395
parentbde3ec5d818d1948e8a0008a22bcb2e247ce3cc6 (diff)
downloadotp-ff913d619372024c74c93640c60032037a4a6d2e.tar.gz
otp-ff913d619372024c74c93640c60032037a4a6d2e.tar.bz2
otp-ff913d619372024c74c93640c60032037a4a6d2e.zip
erts: Fix faulty assert in driver_SUITE
Set drv_use_singleton.fd_stop_select to -2 in start() as it's only used by driver_SUITE:driver_select_use.
-rw-r--r--erts/emulator/test/driver_SUITE_data/chkio_drv.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/erts/emulator/test/driver_SUITE_data/chkio_drv.c b/erts/emulator/test/driver_SUITE_data/chkio_drv.c
index baf0ca9f11..b9ee155b4b 100644
--- a/erts/emulator/test/driver_SUITE_data/chkio_drv.c
+++ b/erts/emulator/test/driver_SUITE_data/chkio_drv.c
@@ -387,6 +387,9 @@ chkio_drv_start(ErlDrvPort port, char *command)
cddp->id = driver_mk_port(port);
cddp->test = CHKIO_STOP;
cddp->test_data = NULL;
+
+ drv_use_singleton.fd_stop_select = -2; /* disable stop_select asserts */
+
return (ErlDrvData) cddp;
#endif
}
@@ -1041,7 +1044,6 @@ chkio_drv_control(ErlDrvData drv_data,
if (pip->wasSelected && (op & 1)) {
TRACEF(("%T: Close pipe [%d->%d]\n", cddp->id, pip->write_fd,
pip->read_fd));
- drv_use_singleton.fd_stop_select = -2; /* disable stop_select asserts */
if (driver_select(cddp->port, (ErlDrvEvent)(ErlDrvSInt)pip->read_fd,
DO_READ|ERL_DRV_USE, 0)
|| close(pip->write_fd)) {