diff mbox series

open_posix_testsuite/lio_listio/2-1: remove check for individual completion

Message ID 2539516b566aca2a2f419131c7ad28fcdd7a8fcd.1650365029.git.jstancek@redhat.com
State Accepted
Headers show
Series open_posix_testsuite/lio_listio/2-1: remove check for individual completion | expand

Commit Message

Jan Stancek April 19, 2022, 10:44 a.m. UTC
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(-)

Comments

Cyril Hrubis April 19, 2022, 11:36 a.m. UTC | #1
Hi!
Agree.

Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
Jan Stancek April 20, 2022, 6:19 a.m. UTC | #2
Thanks, pushed.

On Tue, Apr 19, 2022 at 1:34 PM Cyril Hrubis <chrubis@suse.cz> wrote:
>
> Hi!
> Agree.
>
> Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
>
> --
> Cyril Hrubis
> chrubis@suse.cz
>
diff mbox series

Patch

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");