[LTP] [PATCH 4/6] sched_football: Add a sleep before the game begins to get into steady state

John Stultz jstultz@google.com
Wed Apr 24 00:58:01 CEST 2024


Before we begin the game, lets give a little extra time for any
odd initial placement to get sorted before we start testing the
RT scheduling invariant.

Cc: kernel-team@android.com
Cc: Darren Hart <darren@os.amperecomputing.com>
Signed-off-by: John Stultz <jstultz@google.com>
---
 testcases/realtime/func/sched_football/sched_football.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/testcases/realtime/func/sched_football/sched_football.c b/testcases/realtime/func/sched_football/sched_football.c
index ed3c5cadf..7686ce3e6 100644
--- a/testcases/realtime/func/sched_football/sched_football.c
+++ b/testcases/realtime/func/sched_football/sched_football.c
@@ -246,6 +246,8 @@ int main(int argc, char *argv[])
 	while (atomic_get(&players_ready) < players_per_team * 4)
 		usleep(100);
 
+	/* let things get into steady state */
+	sleep(2);
 	/* Ok, everyone is on the field, bring out the ref */
 	printf("Starting referee thread\n");
 	result = referee(game_length);
-- 
2.44.0.769.g3c40516874-goog



More information about the ltp mailing list