3 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
4 * PROPRIETARY/CONFIDENTIAL
6 * This software is the confidential and proprietary information of SAMSUNG
7 * ELECTRONICS ("Confidential Information"). You agree and acknowledge that
8 * this software is owned by Samsung and you shall not disclose such
9 * Confidential Information and shall use it only in accordance with the terms
10 * of the license agreement you entered into with SAMSUNG ELECTRONICS. SAMSUNG
11 * make no representations or warranties about the suitability of the software,
12 * either express or implied, including but not limited to the implied
13 * warranties of merchantability, fitness for a particular purpose, or
14 * non-infringement. SAMSUNG shall not be liable for any damages suffered by
15 * licensee arising out of or related to this software.
19 #include <dd-storage.h>
21 #define API_NAME_STORAGE_GET_PATH "storage_get_path"
23 static void startup(void);
24 static void cleanup(void);
26 void (*tet_startup)(void) = startup;
27 void (*tet_cleanup)(void) = cleanup;
30 static void utc_system_deviced_storage_get_path_p_1(void);
31 static void utc_system_deviced_storage_get_path_p_2(void);
32 static void utc_system_deviced_storage_get_path_p_3(void);
33 static void utc_system_deviced_storage_get_path_n_1(void);
34 static void utc_system_deviced_storage_get_path_n_2(void);
35 static void utc_system_deviced_storage_get_path_n_3(void);
38 POSITIVE_TC_IDX = 0x01,
42 struct tet_testlist tet_testlist[] = {
43 { utc_system_deviced_storage_get_path_p_1, POSITIVE_TC_IDX },
44 { utc_system_deviced_storage_get_path_p_2, POSITIVE_TC_IDX },
45 { utc_system_deviced_storage_get_path_p_3, POSITIVE_TC_IDX },
46 { utc_system_deviced_storage_get_path_n_1, NEGATIVE_TC_IDX },
47 { utc_system_deviced_storage_get_path_n_2, NEGATIVE_TC_IDX },
48 { utc_system_deviced_storage_get_path_n_3, NEGATIVE_TC_IDX },
53 static void startup(void)
57 static void cleanup(void)
62 * @brief Positive test case of storage_get_path()
64 static void utc_system_deviced_storage_get_path_p_1(void)
69 ret = storage_get_path(STORAGE_DEFAULT, path, sizeof(path));
70 dts_check_eq(API_NAME_STORAGE_GET_PATH, ret, 0, "Default storage");
74 * @brief Positive test case of storage_get_path()
76 static void utc_system_deviced_storage_get_path_p_2(void)
81 ret = storage_get_path(STORAGE_INTERNAL, path, sizeof(path));
82 dts_check_eq(API_NAME_STORAGE_GET_PATH, ret, 0, "Internal storage");
86 * @brief Positive test case of storage_get_path()
88 static void utc_system_deviced_storage_get_path_p_3(void)
93 ret = storage_get_path(STORAGE_EXTERNAL, path, sizeof(path));
94 dts_check_eq(API_NAME_STORAGE_GET_PATH, ret, 0, "External storage");
98 * @brief Negative test case of storage_get_path()
100 static void utc_system_deviced_storage_get_path_n_1(void)
105 ret = storage_get_path(-1, path, sizeof(path));
106 dts_check_ne(API_NAME_STORAGE_GET_PATH, ret, 0);
110 * @brief Negative test case of storage_get_path()
112 static void utc_system_deviced_storage_get_path_n_2(void)
117 ret = storage_get_path(STORAGE_DEFAULT, NULL, sizeof(path));
118 dts_check_ne(API_NAME_STORAGE_GET_PATH, ret, 0);
122 * @brief Negative test case of storage_get_path()
124 static void utc_system_deviced_storage_get_path_n_3(void)
129 ret = storage_get_path(STORAGE_DEFAULT, path, -1);
130 dts_check_ne(API_NAME_STORAGE_GET_PATH, ret, 0);