[LTP] [PATCH] open_posix_testsuite/lio_listio/2-1: remove check for individual completion
Jan Stancek
jstancek@redhat.com
Tue Apr 19 12:44:10 CEST 2022
lio_listio() operations are executed in an unspecified order and
checking if any specific one from list already completed appears
meaningless. Remove it.
Signed-off-by: Jan Stancek <jstancek@redhat.com>
---
.../conformance/interfaces/lio_listio/2-1.c | 28 -------------------
1 file changed, 28 deletions(-)
diff --git a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/2-1.c b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/2-1.c
index 72a1113e06a3..efcd5b3fcb39 100644
--- a/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/2-1.c
+++ b/testcases/open_posix_testsuite/conformance/interfaces/lio_listio/2-1.c
@@ -37,16 +37,8 @@
#define NUM_AIOCBS 256
#define BUF_SIZE 1024
-static volatile int received_selected;
static volatile int received_all;
-static void sigrt1_handler(int signum PTS_ATTRIBUTE_UNUSED,
- siginfo_t *info,
- void *context PTS_ATTRIBUTE_UNUSED)
-{
- received_selected = info->si_value.sival_int;
-}
-
static void sigrt2_handler(int signum PTS_ATTRIBUTE_UNUSED,
siginfo_t *info PTS_ATTRIBUTE_UNUSED,
void *context PTS_ATTRIBUTE_UNUSED)
@@ -102,11 +94,6 @@ int main(void)
aiocbs[i]->aio_buf = &bufs[i * BUF_SIZE];
aiocbs[i]->aio_nbytes = BUF_SIZE;
aiocbs[i]->aio_lio_opcode = LIO_WRITE;
-
- /* Use SIRTMIN+1 for individual completions */
- aiocbs[i]->aio_sigevent.sigev_notify = SIGEV_SIGNAL;
- aiocbs[i]->aio_sigevent.sigev_signo = SIGRTMIN + 1;
- aiocbs[i]->aio_sigevent.sigev_value.sival_int = i;
}
/* Use SIGRTMIN+2 for list completion */
@@ -114,12 +101,6 @@ int main(void)
event.sigev_signo = SIGRTMIN + 2;
event.sigev_value.sival_ptr = NULL;
- /* Setup handler for individual operation completion */
- action.sa_sigaction = sigrt1_handler;
- sigemptyset(&action.sa_mask);
- action.sa_flags = SA_SIGINFO | SA_RESTART;
- sigaction(SIGRTMIN + 1, &action, NULL);
-
/* Setup handler for list completion */
action.sa_sigaction = sigrt2_handler;
sigemptyset(&action.sa_mask);
@@ -139,15 +120,6 @@ int main(void)
exit(PTS_FAIL);
}
- if (received_selected == NUM_AIOCBS - 1) {
- printf(TNAME " lio_listio() waited\n");
- for (i = 0; i < NUM_AIOCBS; i++)
- free(aiocbs[i]);
- free(bufs);
- close(fd);
- exit(PTS_FAIL);
- }
-
if (received_all != 0) {
printf(TNAME
" Error lio_listio() waited for list completion\n");
--
2.27.0
More information about the ltp
mailing list