Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 1 | From f4fafbdffae3a63c81f65cef98c72dda26283e06 Mon Sep 17 00:00:00 2001 |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 2 | From: Dengke Du <dengke.du@windriver.com> |
| 3 | Date: Wed, 8 Feb 2017 16:17:17 +0800 |
Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 4 | Subject: [PATCH] Fix test_proc_kill hanging |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 5 | |
| 6 | Sometimes the signal is delivered to memcg_process before the framework took |
| 7 | into consideration its pid entered in the tasks. Fixed by delaying the signal |
| 8 | send command. |
| 9 | |
Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 10 | Upstream-Status: Pending |
| 11 | |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 12 | Signed-off-by: George Nita <george.nita@enea.com> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 13 | Signed-off-by: Dengke Du <dengke.du@windriver.com> |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 14 | --- |
| 15 | testcases/kernel/controllers/memcg/functional/memcg_lib.sh | 1 + |
| 16 | 1 file changed, 1 insertion(+) |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 17 | |
| 18 | diff --git a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh |
Brad Bishop | 96ff198 | 2019-08-19 13:50:42 -0400 | [diff] [blame] | 19 | index aadaae4..deea5d6 100755 |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 20 | --- a/testcases/kernel/controllers/memcg/functional/memcg_lib.sh |
| 21 | +++ b/testcases/kernel/controllers/memcg/functional/memcg_lib.sh |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 22 | @@ -291,6 +291,7 @@ test_proc_kill() |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 23 | pid=$! |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 24 | TST_CHECKPOINT_WAIT 0 |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 25 | echo $pid > tasks |
| 26 | + sleep 1 |
| 27 | |
Brad Bishop | 6e60e8b | 2018-02-01 10:27:11 -0500 | [diff] [blame] | 28 | signal_memcg_process $pid $3 |
| 29 | |
| 30 | -- |
| 31 | 2.7.4 |
| 32 | |