diff options
Diffstat (limited to 'meta/recipes-extended/ltp/ltp/0001-setrlimit05-Use-another-method-to-get-bad-address.patch')
-rw-r--r-- | meta/recipes-extended/ltp/ltp/0001-setrlimit05-Use-another-method-to-get-bad-address.patch | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/meta/recipes-extended/ltp/ltp/0001-setrlimit05-Use-another-method-to-get-bad-address.patch b/meta/recipes-extended/ltp/ltp/0001-setrlimit05-Use-another-method-to-get-bad-address.patch deleted file mode 100644 index 4bfe2767d8..0000000000 --- a/meta/recipes-extended/ltp/ltp/0001-setrlimit05-Use-another-method-to-get-bad-address.patch +++ /dev/null | |||
@@ -1,61 +0,0 @@ | |||
1 | From c4d02b23d12b7136b5739b3075e817fc037e41d4 Mon Sep 17 00:00:00 2001 | ||
2 | From: "Hongzhi.Song" <hongzhi.song@windriver.com> | ||
3 | Date: Mon, 19 Nov 2018 23:07:01 -0800 | ||
4 | Subject: [PATCH] setrlimit05: Use another method to get bad address | ||
5 | |||
6 | This testcase fails on mips32. The process is killed by SIGBUS which | ||
7 | is not as expect. | ||
8 | |||
9 | This is because: | ||
10 | ((void *)-1) is not a legal bad address which causes the process | ||
11 | killed by SIGBUG on mips. | ||
12 | |||
13 | 'tst_get_bad_addr()' returns an address that should works on mips | ||
14 | and other arches. | ||
15 | |||
16 | Upstream-Status: Accepted [80bed467bc6ab48a6cd88a8ab74ca15d08830cb0] | ||
17 | |||
18 | Signed-off-by: Hongzhi.Song <hongzhi.song@windriver.com> | ||
19 | --- | ||
20 | testcases/kernel/syscalls/setrlimit/setrlimit05.c | 10 +++++++++- | ||
21 | 1 file changed, 9 insertions(+), 1 deletion(-) | ||
22 | |||
23 | diff --git a/testcases/kernel/syscalls/setrlimit/setrlimit05.c b/testcases/kernel/syscalls/setrlimit/setrlimit05.c | ||
24 | index e7167229b4..004a149a65 100644 | ||
25 | --- a/testcases/kernel/syscalls/setrlimit/setrlimit05.c | ||
26 | +++ b/testcases/kernel/syscalls/setrlimit/setrlimit05.c | ||
27 | @@ -26,6 +26,8 @@ | ||
28 | |||
29 | #include "tst_test.h" | ||
30 | |||
31 | +static void *bad_addr; | ||
32 | + | ||
33 | static void verify_setrlimit(void) | ||
34 | { | ||
35 | int status; | ||
36 | @@ -33,7 +35,7 @@ static void verify_setrlimit(void) | ||
37 | |||
38 | pid = SAFE_FORK(); | ||
39 | if (!pid) { | ||
40 | - TEST(setrlimit(RLIMIT_NOFILE, (void *) -1)); | ||
41 | + TEST(setrlimit(RLIMIT_NOFILE, bad_addr)); | ||
42 | if (TST_RET != -1) { | ||
43 | tst_res(TFAIL, "setrlimit() succeeded unexpectedly"); | ||
44 | exit(0); | ||
45 | @@ -67,7 +69,13 @@ static void verify_setrlimit(void) | ||
46 | tst_res(TBROK, "child %s", tst_strstatus(status)); | ||
47 | } | ||
48 | |||
49 | +static void setup(void) | ||
50 | +{ | ||
51 | + bad_addr = tst_get_bad_addr(NULL); | ||
52 | +} | ||
53 | + | ||
54 | static struct tst_test test = { | ||
55 | .test_all = verify_setrlimit, | ||
56 | .forks_child = 1, | ||
57 | + .setup = setup, | ||
58 | }; | ||
59 | -- | ||
60 | 2.11.0 | ||
61 | |||