aboutsummaryrefslogtreecommitdiff
path: root/testing/sg_tst_async.cpp
diff options
context:
space:
mode:
authorDouglas Gilbert <dgilbert@interlog.com>2021-04-01 04:53:56 +0000
committerDouglas Gilbert <dgilbert@interlog.com>2021-04-01 04:53:56 +0000
commit3eca65ae2a191c8a94138c4dea4286a9a9011ff0 (patch)
tree92d130fd2fdc246bf1a7b37c1f07a2426ce4a186 /testing/sg_tst_async.cpp
parent02bb2aad7c96e908c56e7416290487a6afb80fba (diff)
downloadsg3_utils-3eca65ae2a191c8a94138c4dea4286a9a9011ff0.tar.gz
move some hex file from examples to inhex directory; add testing/sg_take_snap; remove no_waitq from testing
git-svn-id: https://svn.bingwo.ca/repos/sg3_utils/trunk@893 6180dd3e-e324-4e3e-922d-17de1ae2f315
Diffstat (limited to 'testing/sg_tst_async.cpp')
-rw-r--r--testing/sg_tst_async.cpp21
1 files changed, 4 insertions, 17 deletions
diff --git a/testing/sg_tst_async.cpp b/testing/sg_tst_async.cpp
index e8203a10..2a3b54a8 100644
--- a/testing/sg_tst_async.cpp
+++ b/testing/sg_tst_async.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014-2019 Douglas Gilbert.
+ * Copyright (c) 2014-2021 Douglas Gilbert.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -89,7 +89,7 @@
#include "sg_pt.h"
#include "sg_cmds.h"
-static const char * version_str = "1.40 20190917";
+static const char * version_str = "1.41 20210331";
static const char * util_name = "sg_tst_async";
/* This is a test program for checking the async usage of the Linux sg
@@ -191,7 +191,6 @@ struct opts_t {
bool generic_sync;
bool masync;
bool mmap_io;
- bool no_waitq;
bool no_xfer;
bool pack_id_force;
bool sg_vn_ge_40000;
@@ -285,9 +284,6 @@ static struct option long_options[] = {
{"numpt", required_argument, 0, 'n'},
{"num-pt", required_argument, 0, 'n'},
{"num_pt", required_argument, 0, 'n'},
- {"nowaitq", no_argument, 0, 'z'},
- {"no_waitq", no_argument, 0, 'z'},
- {"no-waitq", no_argument, 0, 'z'},
{"noxfer", no_argument, 0, 'N'},
{"override", required_argument, 0, 'O'},
{"pack-id", no_argument, 0, 'p'},
@@ -351,8 +347,6 @@ usage(void)
printf(" --maxqpt=QPT|-M QPT maximum commands queued per thread "
"(def:%d)\n", MAX_Q_PER_FD);
printf(" --mmap-io|-m mmap-ed IO (1 cmd outstanding per thread)\n");
- printf(" --no-waitq|-z set SGV4_FLAG_NO_WAITQ, bypass poll() if "
- "requested\n");
printf(" --noxfer|-N no data xfer (def: xfer on READ and "
"WRITE)\n");
printf(" --numpt=NPT|-n NPT number of commands per thread "
@@ -882,8 +876,6 @@ work_sync_thread(int id, const char * dev_name, unsigned int /* hi_lba */,
pr2serr_lk("id=%d: only support TUR here for now\n", id);
goto err_out;
}
- if (op->no_waitq)
- pr2serr_lk("id=%d: ignoring --no-waitq option\n", id);
if (op->verbose)
pr2serr_lk("id=%d: using libsgutils generic sync passthrough\n", id);
@@ -1145,8 +1137,6 @@ work_thread(int id, struct opts_t * op)
sg_flags |= SG_FLAG_MMAP_IO;
if (op->no_xfer)
sg_flags |= SG_FLAG_NO_DXFER;
- if (op->no_waitq)
- sg_flags |= SGV4_FLAG_NO_WAITQ;
if (vb > 1)
pr2serr_lk(" id=%d, sg_flags=0x%x, %s cmds\n", id, sg_flags,
((SCSI_TUR == op->c2e) ? "TUR":
@@ -1421,7 +1411,7 @@ work_thread(int id, struct opts_t * op)
}
}
n = (op->wait_ms > 0) ? op->wait_ms : 0;
- if ((n > 0) && (! op->no_waitq)) {
+ if (n > 0) {
for (j = 0; (j < 1000000) &&
(0 == (res = poll(pfd, 1, n)));
++j)
@@ -1787,7 +1777,7 @@ main(int argc, char * argv[])
int option_index = 0;
c = getopt_long(argc, argv,
- "34acdefghl:L:mM:n:NO:pq:Q:Rs:St:TuvVw:Wz",
+ "34acdefghl:L:mM:n:NO:pq:Q:Rs:St:TuvVw:W",
long_options, &option_index);
if (c == -1)
break;
@@ -1995,9 +1985,6 @@ main(int argc, char * argv[])
case 'W':
op->c2e = SCSI_WRITE16;
break;
- case 'z':
- op->no_waitq = true;
- break;
default:
pr2serr_lk("unrecognised option code 0x%x ??\n", c);
usage();