From: Robert Read Date: Sat, 3 Apr 2010 02:01:53 +0000 (-0700) Subject: b=22505 Initialize cui_tot_nregs for liblustre X-Git-Tag: 1.10.0.40~9 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=938b451886a8002972c3fd6a10ab5c5d5e68e278;ds=sidebyside b=22505 Initialize cui_tot_nregs for liblustre Change 910bf010 inadvertantly broke liblustre because cio->cui_tot_nregs was not initilized, and ccc_io_update_iov was setting cui_nregs incorrectly. i=eric.mei i=yong.fan --- diff --git a/lustre/liblustre/rw.c b/lustre/liblustre/rw.c index 2b9581e..aeff8db 100644 --- a/lustre/liblustre/rw.c +++ b/lustre/liblustre/rw.c @@ -344,6 +344,7 @@ ssize_t llu_file_prwv(const struct iovec *iovec, int iovlen, /* XXX this is not right: cio->cui_iov can be modified. */ cio->cui_iov = (struct iovec *)iovec; cio->cui_nrsegs = iovlen; + cio->cui_tot_nrsegs = iovlen; sio->sio_session = session; err = cl_io_loop(env, io); } else { diff --git a/lustre/tests/liblustre.sh b/lustre/tests/liblustre.sh index daf7f5a..638e198 100644 --- a/lustre/tests/liblustre.sh +++ b/lustre/tests/liblustre.sh @@ -28,6 +28,7 @@ test_1() { skip "$LIBLUSTRETESTS/sanity: not found" else mkdir -p $MOUNT2 + echo $LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET $LIBLUSTRETESTS/sanity --target=$LIBLUSTRE_MOUNT_TARGET if [ "$LIBLUSTRE_EXCEPT" ]; then LIBLUSTRE_OPT="$LIBLUSTRE_OPT \ @@ -38,3 +39,7 @@ test_1() { fi } run_test 1 "liblustre sanity" + +banner "test complete, cleaning up" +check_and_cleanup_lustre +[ -f "$TESTSUITELOG" ] && cat $TESTSUITELOG && grep -q FAIL $TESTSUITELOG && exit 1 || true diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index be08a46..10edcd3 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -262,7 +262,7 @@ load_module() { (($# > 0)) && shift 2 # Ensure we have accept=all for lnet - if [ $module = lnet ]; then + if [ $(basename $module) = lnet ]; then # OK, this is a bit wordy... local arg accept_all_present=false for arg in "$@"; do