* Simply invoke lsm_volume_raid_info() with no additional test.

Changes in V5(No change in V2, V3, V4):

 * Sync API changes for argument name('extent_count' to 'disk_count') and data
   type.

Signed-off-by: Gris Ge <f...@redhat.com>
---
 test/tester.c | 30 ++++++++++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/test/tester.c b/test/tester.c
index 2edd18c..1622a75 100644
--- a/test/tester.c
+++ b/test/tester.c
@@ -2858,6 +2858,35 @@ START_TEST(test_volume_vpd_check)
 }
 END_TEST
 
+START_TEST(test_volume_raid_info)
+{
+    lsm_volume *volume = NULL;
+    char *job = NULL;
+    lsm_pool *pool = get_test_pool(c);
+
+    int rc = lsm_volume_create(
+        c, pool, "volume_raid_info_test", 20000000,
+        LSM_VOLUME_PROVISION_DEFAULT, &volume, &job, LSM_CLIENT_FLAG_RSVD);
+
+    fail_unless( rc == LSM_ERR_OK || rc == LSM_ERR_JOB_STARTED,
+            "lsmVolumeCreate %d (%s)", rc, error(lsm_error_last_get(c)));
+
+    if( LSM_ERR_JOB_STARTED == rc ) {
+        volume = wait_for_job_vol(c, &job);
+    }
+
+    lsm_volume_raid_type raid_type;
+    uint32_t strip_size, disk_count, min_io_size, opt_io_size;
+
+    G(
+        rc, lsm_volume_raid_info, c, volume, &raid_type, &strip_size,
+        &disk_count, &min_io_size, &opt_io_size, LSM_CLIENT_FLAG_RSVD);
+
+    G(rc, lsm_volume_record_free, volume);
+    volume = NULL;
+}
+END_TEST
+
 Suite * lsm_suite(void)
 {
     Suite *s = suite_create("libStorageMgmt");
@@ -2893,6 +2922,7 @@ Suite * lsm_suite(void)
     tcase_add_test(basic, test_ss);
     tcase_add_test(basic, test_nfs_exports);
     tcase_add_test(basic, test_invalid_input);
+    tcase_add_test(basic, test_volume_raid_info);
 
     suite_add_tcase(s, basic);
     return s;
-- 
1.8.3.1


------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Libstoragemgmt-devel mailing list
Libstoragemgmt-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libstoragemgmt-devel

Reply via email to