branch, trac-323-sos, updated. c1c84288a507f5c62d61613a0aa770418f66313e
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, trac-323-sos has been updated via c1c84288a507f5c62d61613a0aa770418f66313e (commit) from d043ef96ccf215d1f36e68fb33d14902da0665ea (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 c1c84288a507f5c62d61613a0aa770418f66313e Author: John Jenkins <[email protected]> Date: Tue Mar 24 15:37:34 2015 -0500 test for insufficient buffer condition ----------------------------------------------------------------------- Summary of changes: code/src/asg/asg-internal.ae | 6 +++++- code/tests/asg/test-asg-triton-ext.c | 15 +++++++++++++++ 2 files changed, 20 insertions(+), 1 deletions(-) Diff of changes: diff --git a/code/src/asg/asg-internal.ae b/code/src/asg/asg-internal.ae index a7039a0..9414d84 100644 --- a/code/src/asg/asg-internal.ae +++ b/code/src/asg/asg-internal.ae @@ -782,8 +782,12 @@ __blocking int asg_i_read_set( rinfo); /* TODO: handle short reads? */ - if (triton_error_equal(tret, TRITON_ERR_CONDITIONAL)) + if (triton_error_equal(tret, TRITON_ERR_NOENT)) + aret = ASG_ERR_NOENT; + else if (triton_error_equal(tret, TRITON_ERR_CONDITIONAL)) aret = ASG_ERR_UPDATE_ID; + else if (triton_error_equal(tret, TRITON_ERR_RECV_TOO_SMALL)) + aret = ASG_ERR_BUFFER_SMALL; else if (triton_is_error(tret)) { triton_error_print(tret, "remote_triton_rpc_rosd_read_set"); aret = ASG_ERR_OTHER; diff --git a/code/tests/asg/test-asg-triton-ext.c b/code/tests/asg/test-asg-triton-ext.c index 8035960..7f31c1a 100644 --- a/code/tests/asg/test-asg-triton-ext.c +++ b/code/tests/asg/test-asg-triton-ext.c @@ -158,6 +158,21 @@ int main(int argc, char **argv) if (ret != ASG_ERR_UPDATE_ID) ERR("asg_read_set: expected update-id error, got err code %d\n", ret); + /* now try to read with insufficient buffer space */ + ret = asg_read_set( + LOC, + N, + rids, + ASG_COND_UNCONDITIONAL, + 0, + buf_read, + 20, + &num_rinfos, + rinfos); + if (ret != ASG_ERR_BUFFER_SMALL) + ERR("asg_read_set: expected buffer-small error, got err code %d\n", + ret); + ret = asg_finalize(ait); if (ret != ASG_SUCCESS) ERR("asg_finalize() (return %d)\n", ret); hooks/post-receive --
participants (1)
-
noreply@mcs.anl.gov