rt-tests/SOURCES/ssdd-remove-sleeps.patch

54 lines
1.4 KiB
Diff

From b9f812a0c49584d82c37582c7523a5808628b985 Mon Sep 17 00:00:00 2001
From: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Date: Tue, 15 Jan 2019 11:32:25 +0100
Subject: [PATCH 4/5] ssdd: remove sleeps
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
There two sleep functions which ensure that the forked function sleeps
and does not spin until everything is setup. There is no need for that,
the scheduler will take care of that anyway. Also that sleep may
complete before or after the testcase starts. If it completes afterwards
then the testcase waits to start so…
Remove the sleep, it does change the outcome of the testcase.
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: John Kacur <jkacur@redhat.com>
---
src/ssdd/ssdd.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/src/ssdd/ssdd.c b/src/ssdd/ssdd.c
index 9b85dfa9d223..68a426266dd9 100644
--- a/src/ssdd/ssdd.c
+++ b/src/ssdd/ssdd.c
@@ -132,12 +132,8 @@ static void sigchld(int sig, unused siginfo_t * info, unused void *arg)
static void child_process(void)
{
- unused volatile int i;
-
- /* wait for ptrace attach */
- usleep(100000);
while (1)
- i = 0;
+ ;
}
static int forktests(int testid)
@@ -170,9 +166,6 @@ static int forktests(int testid)
exit(1);
}
- /* give both our child and parent time to set things up */
- usleep(125000);
-
/*
* Attach to the child.
*/
--
2.20.1