Whamcloud - gitweb
LU-7482 tests: fix uninitialized value in llapi_hsm_test 64/17364/3
authorFrank Zago <fzago@cray.com>
Wed, 25 Nov 2015 18:15:32 +0000 (12:15 -0600)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 26 Jan 2016 20:20:10 +0000 (20:20 +0000)
llapi_hsm_user_request_alloc doesn't zero the memory, so all the
fields in the returned structure must be set.

Signed-off-by: frank zago <fzago@cray.com>
Change-Id: Ib2d99138a5bab6253c00da5d48ebb90e9679e235
Reviewed-on: http://review.whamcloud.com/17364
Reviewed-by: Aurelien Degremont <aurelien.degremont@cea.fr>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/tests/llapi_hsm_test.c

index 4f414e1..1d90e60 100644 (file)
@@ -522,6 +522,7 @@ void helper_archiving(void (*progress)
        hur->hur_request.hr_flags = 0;
        hur->hur_request.hr_itemcount = 1;
        hur->hur_request.hr_data_len = 0;
        hur->hur_request.hr_flags = 0;
        hur->hur_request.hr_itemcount = 1;
        hur->hur_request.hr_data_len = 0;
+       hur->hur_user_item[0].hui_extent.offset = 0;
        hur->hur_user_item[0].hui_extent.length = -1;
 
        rc = llapi_fd2fid(fd, &hur->hur_user_item[0].hui_fid);
        hur->hur_user_item[0].hui_extent.length = -1;
 
        rc = llapi_fd2fid(fd, &hur->hur_user_item[0].hui_fid);