aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-09 20:01:01 +0000
committertilghman <tilghman@f38db490-d61c-443f-a65b-d21fe96a405b>2010-07-09 20:01:01 +0000
commitaf4ffb86d02789de4dcda6ed9bf2543792517105 (patch)
treefc2ee50b8b3840d6477b2537f78192606b20a636
parent43dbac80653d505e7af5c6f48d28eb1db6a5dc41 (diff)
Get more information about the Bamboo test failures
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@275312 f38db490-d61c-443f-a65b-d21fe96a405b
-rw-r--r--apps/app_meetme.c27
-rw-r--r--channels/chan_iax2.c5
2 files changed, 18 insertions, 14 deletions
diff --git a/apps/app_meetme.c b/apps/app_meetme.c
index 4d2c73117..eb9aabead 100644
--- a/apps/app_meetme.c
+++ b/apps/app_meetme.c
@@ -1149,7 +1149,7 @@ static void conf_play(struct ast_channel *chan, struct ast_conference *conf, enu
*/
static struct ast_conference *build_conf(const char *confno, const char *pin,
const char *pinadmin, int make, int dynamic, int refcount,
- const struct ast_channel *chan)
+ const struct ast_channel *chan, struct ast_test *test)
{
struct ast_conference *cnf;
struct dahdi_confinfo dahdic = { 0, };
@@ -1185,6 +1185,9 @@ static struct ast_conference *build_conf(const char *confno, const char *pin,
dahdic.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
cnf->fd = open("/dev/dahdi/pseudo", O_RDWR);
if (cnf->fd < 0 || ioctl(cnf->fd, DAHDI_SETCONF, &dahdic)) {
+ if (test) {
+ ast_test_status_update(test, "Unable to open pseudo device\n");
+ }
ast_log(LOG_WARNING, "Unable to open pseudo device\n");
if (cnf->fd >= 0)
close(cnf->fd);
@@ -1204,6 +1207,9 @@ static struct ast_conference *build_conf(const char *confno, const char *pin,
dahdic.confno = cnf->dahdiconf;
dahdic.confmode = DAHDI_CONF_CONFANN | DAHDI_CONF_CONFANNMON;
if (ioctl(cnf->chan->fds[0], DAHDI_SETCONF, &dahdic)) {
+ if (test) {
+ ast_test_status_update(test, "Error setting conference on pseudo channel\n");
+ }
ast_log(LOG_WARNING, "Error setting conference\n");
if (cnf->chan)
ast_hangup(cnf->chan);
@@ -3772,7 +3778,7 @@ static struct ast_conference *find_conf_realtime(struct ast_channel *chan, char
ast_variables_destroy(origvar);
- cnf = build_conf(confno, pin ? pin : "", pinadmin ? pinadmin : "", make, dynamic, refcount, chan);
+ cnf = build_conf(confno, pin ? pin : "", pinadmin ? pinadmin : "", make, dynamic, refcount, chan, NULL);
if (cnf) {
cnf->maxusers = maxusers;
@@ -3871,9 +3877,9 @@ static struct ast_conference *find_conf(struct ast_channel *chan, char *confno,
if (ast_app_getdata(chan, "conf-getpin", dynamic_pin, pin_buf_len - 1, 0) < 0)
return NULL;
}
- cnf = build_conf(confno, dynamic_pin, "", make, dynamic, refcount, chan);
+ cnf = build_conf(confno, dynamic_pin, "", make, dynamic, refcount, chan, NULL);
} else {
- cnf = build_conf(confno, "", "", make, dynamic, refcount, chan);
+ cnf = build_conf(confno, "", "", make, dynamic, refcount, chan, NULL);
}
} else {
/* Check the config */
@@ -3901,7 +3907,7 @@ static struct ast_conference *find_conf(struct ast_channel *chan, char *confno,
cnf = build_conf(args.confno,
S_OR(args.pin, ""),
S_OR(args.pinadmin, ""),
- make, dynamic, refcount, chan);
+ make, dynamic, refcount, chan, NULL);
break;
}
}
@@ -4987,7 +4993,7 @@ static void *run_station(void *data)
ast_set_flag64(&conf_flags,
CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_PASS_DTMF | CONFFLAG_SLA_STATION);
answer_trunk_chan(trunk_ref->chan);
- conf = build_conf(ast_str_buffer(conf_name), "", "", 0, 0, 1, trunk_ref->chan);
+ conf = build_conf(ast_str_buffer(conf_name), "", "", 0, 0, 1, trunk_ref->chan, NULL);
if (conf) {
conf_run(trunk_ref->chan, conf, &conf_flags, NULL);
dispose_conf(conf);
@@ -5868,7 +5874,7 @@ static void *dial_trunk(void *data)
ast_set_flag64(&conf_flags,
CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_MARKEDUSER |
CONFFLAG_PASS_DTMF | CONFFLAG_SLA_TRUNK);
- conf = build_conf(conf_name, "", "", 1, 1, 1, trunk_ref->trunk->chan);
+ conf = build_conf(conf_name, "", "", 1, 1, 1, trunk_ref->trunk->chan, NULL);
ast_mutex_lock(args->cond_lock);
ast_cond_signal(args->cond);
@@ -6044,7 +6050,7 @@ static int sla_station_exec(struct ast_channel *chan, const char *data)
ast_set_flag64(&conf_flags,
CONFFLAG_QUIET | CONFFLAG_MARKEDEXIT | CONFFLAG_PASS_DTMF | CONFFLAG_SLA_STATION);
ast_answer(chan);
- conf = build_conf(conf_name, "", "", 0, 0, 1, chan);
+ conf = build_conf(conf_name, "", "", 0, 0, 1, chan, NULL);
if (conf) {
conf_run(chan, conf, &conf_flags, NULL);
dispose_conf(conf);
@@ -6175,7 +6181,7 @@ static int sla_trunk_exec(struct ast_channel *chan, const char *data)
}
snprintf(conf_name, sizeof(conf_name), "SLA_%s", args.trunk_name);
- conf = build_conf(conf_name, "", "", 1, 1, 1, chan);
+ conf = build_conf(conf_name, "", "", 1, 1, 1, chan, NULL);
if (!conf) {
pbx_builtin_setvar_helper(chan, "SLATRUNK_STATUS", "FAILURE");
ast_atomic_fetchadd_int((int *) &trunk->ref_count, -1);
@@ -6864,7 +6870,7 @@ AST_TEST_DEFINE(test_meetme_data_provider)
return AST_TEST_FAIL;
}
- cnf = build_conf("9898", "", "1234", 1, 1, 1, chan);
+ cnf = build_conf("9898", "", "1234", 1, 1, 1, chan, test);
if (!cnf) {
ast_test_status_update(test, "Build of test conference 9898 failed\n");
ast_hangup(chan);
@@ -6891,7 +6897,6 @@ AST_TEST_DEFINE(test_meetme_data_provider)
dispose_conf(cnf);
ast_hangup(chan);
- ast_test_status_update(test, "If this message prints and a failure is still recorded, then something is really wrong with the test framework\n");
return AST_TEST_PASS;
}
#endif
diff --git a/channels/chan_iax2.c b/channels/chan_iax2.c
index e43758333..e6bce413d 100644
--- a/channels/chan_iax2.c
+++ b/channels/chan_iax2.c
@@ -13981,8 +13981,8 @@ AST_TEST_DEFINE(test_iax2_users_get)
return AST_TEST_FAIL;
}
- if (ast_data_retrieve_int(node, "user/amaflags") != 1010) {
- ast_test_status_update(test, "The amaflags field in our test user was not the expected value\n");
+ if (ast_data_retrieve_int(node, "user/amaflags/value") != 1010) {
+ ast_test_status_update(test, "The amaflags field in our test user was '%d' not the expected value '1010'\n", ast_data_retrieve_int(node, "user/amaflags/value"));
ao2_unlink(users, user);
user_unref(user);
ast_data_free(node);
@@ -13994,7 +13994,6 @@ AST_TEST_DEFINE(test_iax2_users_get)
ao2_unlink(users, user);
user_unref(user);
- ast_test_status_update(test, "If this message prints and a failure is still recorded, then something is really wrong with the test framework\n");
return AST_TEST_PASS;
}
#endif