branch, devel, updated. d4e60138262f9525e6b6a005298fcf5ec45d1daa
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "". The branch, devel has been updated via d4e60138262f9525e6b6a005298fcf5ec45d1daa (commit) from 2fd74ae9562001eff1c999c340dd33f1d0d8da21 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit d4e60138262f9525e6b6a005298fcf5ec45d1daa Author: Phil Carns <[email protected]> Date: Wed Feb 27 16:40:10 2013 -0500 new test program for ae_op_complete() issue ----------------------------------------------------------------------- Summary of changes: parser/tests/blocking/btest-impl.c | 56 +++++++++++++++++++- parser/tests/blocking/btest.hae | 5 ++ ...sted.ae => consecutive-resource-completions.ae} | 25 ++++----- parser/tests/blocking/module.mk.in | 1 + 4 files changed, 70 insertions(+), 17 deletions(-) copy parser/tests/blocking/{nested.ae => consecutive-resource-completions.ae} (67%) Diff of changes: diff --git a/parser/tests/blocking/btest-impl.c b/parser/tests/blocking/btest-impl.c index 78453b0..1f89ddd 100644 --- a/parser/tests/blocking/btest-impl.c +++ b/parser/tests/blocking/btest-impl.c @@ -36,6 +36,7 @@ struct btest_op static ae_ops_t list1; static ae_ops_t list2; static ae_ops_t list3; +static ae_ops_t list_consec; static ae_ops_t list_fail10; static ae_ops_t slist; static ae_ops_t srlist; @@ -177,6 +178,26 @@ ae_define_post(int, btest_fail10, int *a) return 0; } +ae_define_post(int, btest_consec) +{ + struct ae_op *op; + struct btest_op *bop; + ae_debug(btest_resource_id, "btest_consec called.\n"); + + bop = malloc(sizeof(*bop)); + assert(bop); + op = &bop->op; + ae_op_fill(op); + ae_ops_link_init(op); + bop->value = 0; + bop->id = ae_id_gen(btest_resource_id, (intptr_t) op); + *__ae_op_id = bop->id; + ae_ops_enqueue(op, &list_consec); + ae_resource_request_poll(op->ctx, btest_resource_id); + + return 0; +} + ae_define_post(int, btest1, int *a) { struct ae_op *op; @@ -371,14 +392,14 @@ static struct btest_op * poll_list(ae_ops_t *list, int *more) return NULL; } +static int consec_count = 0; + static int btest_poll(ae_context_t context, void *user_data) { int more, request; struct btest_op *b; struct bsleep_op *s; -#if 0 int normal_completion; -#endif more = 0; request = 0; @@ -422,6 +443,36 @@ static int btest_poll(ae_context_t context, void *user_data) } request = request | more; + /* TODO: update the remainder of this resource to use ae_op_complete() + * once the consecutive-resource-completions.ae test program issue is + * resolved. + */ + b = poll_list(&list_consec, &more); + if(b) + { + normal_completion = ae_op_complete(&b->op); + printf("DEBUG: iteration %d of btest_consec(): op: %p, op->user_ptr (ctl): %p, return code from ae_op_complete(op): %d\n", consec_count, &b->op, b->op.user_ptr, normal_completion); + consec_count++; + assert(normal_completion); + ae_op_execute(&b->op, int, 0); + free(b); + } + request = request | more; + + b = poll_list(&list3, &more); + if(b) + { + *(b->value) += 3; +#if 0 + normal_completion = ae_op_complete(&b->op); + assert(normal_completion); +#endif + ae_op_execute(&b->op, int, 0); + free(b); + } + request = request | more; + + b = poll_list(&list_fail10, &more); if(b) { @@ -599,6 +650,7 @@ int btest_init(void) ae_ops_init(&list1); ae_ops_init(&list2); ae_ops_init(&list3); + ae_ops_init(&list_consec); ae_ops_init(&list_fail10); ae_ops_init(&slist); ae_ops_init(&srlist); diff --git a/parser/tests/blocking/btest.hae b/parser/tests/blocking/btest.hae index a493378..a3c365e 100644 --- a/parser/tests/blocking/btest.hae +++ b/parser/tests/blocking/btest.hae @@ -31,6 +31,11 @@ __blocking int btest1(int *a); __blocking int btest2(int *b); __blocking int btest3(int *c); +/* This function is instrumented to look for a particular bug in aesop + * resource operation completion, see consecutive-resource-completions.ae + */ +__blocking int btest_consec(void); + /* This function increments the integer by one each time it is called. The * first 9 times it will return -EAGAIN, the 10th time (and * subsequent times) it will return 0 diff --git a/parser/tests/blocking/nested.ae b/parser/tests/blocking/consecutive-resource-completions.ae similarity index 67% copy from parser/tests/blocking/nested.ae copy to parser/tests/blocking/consecutive-resource-completions.ae index 0319bdd..27ea577 100644 --- a/parser/tests/blocking/nested.ae +++ b/parser/tests/blocking/consecutive-resource-completions.ae @@ -4,37 +4,32 @@ * See COPYRIGHT in top-level directory. */ + +#include <assert.h> #include <aesop/aesop.h> #include "parser/tests/blocking/btest.hae" -static int here = 0; - -static __blocking int run_inner(void) +static __blocking void run_basic(void) { int ret; - int a = 0; - - ret = btest1(&a); + + ret = btest_consec(); + assert(ret == 0); + + ret = btest_consec(); assert(ret == 0); - assert(a == 1); - return 0; -} - -static __blocking void run_outer(void) -{ - run_inner(); - here = 1; } __blocking int aesop_main(int argc, char **argv) { btest_init(); - run_outer(); + run_basic(); btest_finalize(); return 0; } aesop_main_set(aesop_main); + /* * Local variables: * c-indent-level: 4 diff --git a/parser/tests/blocking/module.mk.in b/parser/tests/blocking/module.mk.in index b5fd4b0..df5d981 100644 --- a/parser/tests/blocking/module.mk.in +++ b/parser/tests/blocking/module.mk.in @@ -63,6 +63,7 @@ AETESTSRC += \ $(DIR)/pwait-in-while.ae \ $(DIR)/pwait-in-for.ae \ $(DIR)/pbranch-completion.ae \ + $(DIR)/consecutive-resource-completions.ae \ $(DIR)/minimal.ae # This should not compile hooks/post-receive --
participants (1)
-
noreply@mcs.anl.gov