diff options
author | Jackie Huang <jackie.huang@windriver.com> | 2017-11-01 09:23:39 -0400 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2018-01-08 11:54:16 -0500 |
commit | ba8543aeee6b97b31e66c261563a197cd0be87e3 (patch) | |
tree | a87ef0ec6ebfe242322ffc1f91527a4f95c84641 /meta-networking/recipes-protocols/freediameter/files/pass-ptest-env.patch | |
parent | 72657d7a16f713711a7305d906d9704100a6c629 (diff) | |
download | meta-openembedded-ba8543aeee6b97b31e66c261563a197cd0be87e3.tar.gz |
freediameter: add new recipe
freeDiameter is an open source Diameter protocol
implementation. It provides an extensible platform
for deploying a Diameter network for your Authentication,
Authorization and Accounting needs.
Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-protocols/freediameter/files/pass-ptest-env.patch')
-rw-r--r-- | meta-networking/recipes-protocols/freediameter/files/pass-ptest-env.patch | 72 |
1 files changed, 72 insertions, 0 deletions
diff --git a/meta-networking/recipes-protocols/freediameter/files/pass-ptest-env.patch b/meta-networking/recipes-protocols/freediameter/files/pass-ptest-env.patch new file mode 100644 index 0000000000..ea857af7d6 --- /dev/null +++ b/meta-networking/recipes-protocols/freediameter/files/pass-ptest-env.patch | |||
@@ -0,0 +1,72 @@ | |||
1 | freediameter ptest cases testmesg_stress.c and testloadext.c need load | ||
2 | extensions both build time and runtime. Then they search extensions with | ||
3 | build directory that causes runtime failures. | ||
4 | |||
5 | Pass an environment variable to define runtime extension path. | ||
6 | |||
7 | Upstream-Status: Inappropriate [OE ptest specific] | ||
8 | |||
9 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
10 | Signed-off-by: Jackie Huang <jackie.huang@windriver.com> | ||
11 | |||
12 | diff -Nur freeDiameter-1.2.0.orig/tests/testloadext.c freeDiameter-1.2.0/tests/testloadext.c | ||
13 | --- freeDiameter-1.2.0.orig/tests/testloadext.c 2014-02-19 17:33:24.785405032 +0800 | ||
14 | +++ freeDiameter-1.2.0/tests/testloadext.c 2014-02-19 20:08:03.871403924 +0800 | ||
15 | @@ -49,7 +49,7 @@ | ||
16 | { | ||
17 | DIR *dir; | ||
18 | struct dirent *dp; | ||
19 | - char fullname[512]; | ||
20 | + char fullname[1024]; | ||
21 | int pathlen; | ||
22 | |||
23 | /* First, initialize the daemon modules */ | ||
24 | @@ -57,11 +57,16 @@ | ||
25 | CHECK( 0, fd_queues_init() ); | ||
26 | CHECK( 0, fd_msg_init() ); | ||
27 | CHECK( 0, fd_rtdisp_init() ); | ||
28 | - | ||
29 | + | ||
30 | + char *ext_dir = getenv("EXTENSIONS_DIR"); | ||
31 | + if (ext_dir) | ||
32 | + pathlen = snprintf(fullname, sizeof(fullname), "%s", ext_dir); | ||
33 | + else | ||
34 | + pathlen = snprintf(fullname, sizeof(fullname), BUILD_DIR "/extensions/"); | ||
35 | + | ||
36 | /* Find all extensions which have been compiled along the test */ | ||
37 | - TRACE_DEBUG(INFO, "Loading from: '%s'", BUILD_DIR "/extensions"); | ||
38 | - CHECK( 0, (dir = opendir (BUILD_DIR "/extensions")) == NULL ? 1 : 0 ); | ||
39 | - pathlen = snprintf(fullname, sizeof(fullname), BUILD_DIR "/extensions/"); | ||
40 | + TRACE_DEBUG(INFO, "Loading from: '%s'", fullname); | ||
41 | + CHECK( 0, (dir = opendir (fullname)) == NULL ? 1 : 0 ); | ||
42 | |||
43 | while ((dp = readdir (dir)) != NULL) { | ||
44 | char * dot = strrchr(dp->d_name, '.'); | ||
45 | diff -Nur freeDiameter-1.2.0.orig/tests/testmesg_stress.c freeDiameter-1.2.0/tests/testmesg_stress.c | ||
46 | --- freeDiameter-1.2.0.orig/tests/testmesg_stress.c 2014-02-19 17:33:24.785405032 +0800 | ||
47 | +++ freeDiameter-1.2.0/tests/testmesg_stress.c 2014-02-19 20:08:03.928403924 +0800 | ||
48 | @@ -67,15 +67,20 @@ | ||
49 | { | ||
50 | DIR *dir; | ||
51 | struct dirent *dp; | ||
52 | - char fullname[512]; | ||
53 | + char fullname[1024]; | ||
54 | int pathlen; | ||
55 | struct fd_list all_extensions = FD_LIST_INITIALIZER(all_extensions); | ||
56 | struct fd_list ext_with_depends = FD_LIST_INITIALIZER(ext_with_depends); | ||
57 | |||
58 | + char *ext_dir = getenv("EXTENSIONS_DIR"); | ||
59 | + if (ext_dir) | ||
60 | + pathlen = snprintf(fullname, sizeof(fullname), "%s", ext_dir); | ||
61 | + else | ||
62 | + pathlen = snprintf(fullname, sizeof(fullname), BUILD_DIR "/extensions/"); | ||
63 | + | ||
64 | /* Find all extensions which have been compiled along the test */ | ||
65 | - LOG_D("Loading %s*.fdx from: '%s'", BUILD_DIR "/extensions", prefix ?: ""); | ||
66 | - CHECK( 0, (dir = opendir (BUILD_DIR "/extensions")) == NULL ? 1 : 0 ); | ||
67 | - pathlen = snprintf(fullname, sizeof(fullname), BUILD_DIR "/extensions/"); | ||
68 | + TRACE_DEBUG(INFO, "Loading from: '%s'", fullname); | ||
69 | + CHECK( 0, (dir = opendir (fullname)) == NULL ? 1 : 0 ); | ||
70 | |||
71 | while ((dp = readdir (dir)) != NULL) { | ||
72 | char * dot = strrchr(dp->d_name, '.'); | ||