Lines Matching refs:rc
55 int rc; in flash_driver_setup() local
65 rc = flash_get_page_info_by_offs(flash_dev, TEST_AREA_OFFSET, &page_info); in flash_driver_setup()
66 zassert_true(rc == 0, "flash_get_page_info_by_offs returned %d", rc); in flash_driver_setup()
78 int rc; in ZTEST() local
92 rc = flash_erase(flash_dev, (TEST_FLASH_START - page_info.size), page_info.size); in ZTEST()
93 zassert_true(rc < 0, "Invalid use of flash_erase returned %d", rc); in ZTEST()
96 rc = flash_erase(flash_dev, (TEST_FLASH_START + TEST_FLASH_SIZE), page_info.size); in ZTEST()
97 zassert_true(rc < 0, "Invalid use of flash_erase returned %d", rc); in ZTEST()
100 rc = flash_erase(flash_dev, (TEST_AREA_OFFSET + 1), (TEST_FLASH_SIZE + 1)); in ZTEST()
101 zassert_true(rc < 0, "Invalid use of flash_erase returned %d", rc); in ZTEST()
104 rc = flash_erase(flash_dev, TEST_AREA_OFFSET, 0); in ZTEST()
105 zassert_true(rc == 0, "flash_erase 0 bytes returned %d", rc); in ZTEST()
110 int rc; in ZTEST() local
125 rc = flash_fill(flash_dev, fill_val, (TEST_FLASH_START - page_info.size), page_info.size); in ZTEST()
126 zassert_true(rc < 0, "Invalid use of flash_fill returned %d", rc); in ZTEST()
129 rc = flash_fill(flash_dev, fill_val, (TEST_FLASH_START + TEST_FLASH_SIZE), page_info.size); in ZTEST()
130 zassert_true(rc < 0, "Invalid use of flash_fill returned %d", rc); in ZTEST()
133 rc = flash_fill(flash_dev, fill_val, (TEST_AREA_OFFSET + 1), page_info.size); in ZTEST()
134 zassert_true(rc < 0, "Invalid use of flash_fill returned %d", rc); in ZTEST()
135 rc = flash_fill(flash_dev, fill_val, TEST_AREA_OFFSET, (page_info.size + 1)); in ZTEST()
136 zassert_true(rc < 0, "Invalid use of flash_fill returned %d", rc); in ZTEST()
139 rc = flash_fill(flash_dev, fill_val, TEST_AREA_OFFSET, 0); in ZTEST()
140 zassert_true(rc == 0, "flash_fill 0 bytes returned %d", rc); in ZTEST()
145 int rc; in ZTEST() local
159 rc = flash_flatten(flash_dev, (TEST_FLASH_START - page_info.size), page_info.size); in ZTEST()
160 zassert_true(rc < 0, "Invalid use of flash_flatten returned %d", rc); in ZTEST()
163 rc = flash_flatten(flash_dev, (TEST_FLASH_START + TEST_FLASH_SIZE), page_info.size); in ZTEST()
164 zassert_true(rc < 0, "Invalid use of flash_flatten returned %d", rc); in ZTEST()
167 rc = flash_flatten(flash_dev, (TEST_AREA_OFFSET + 1), page_info.size); in ZTEST()
168 zassert_true(rc < 0, "Invalid use of flash_flatten returned %d", rc); in ZTEST()
169 rc = flash_flatten(flash_dev, TEST_AREA_OFFSET, (page_info.size + 1)); in ZTEST()
170 zassert_true(rc < 0, "Invalid use of flash_flatten returned %d", rc); in ZTEST()
173 rc = flash_flatten(flash_dev, TEST_AREA_OFFSET, 0); in ZTEST()
174 zassert_true(rc == 0, "flash_flatten 0 bytes returned %d", rc); in ZTEST()
179 int rc; in ZTEST() local
194 rc = flash_read(flash_dev, (TEST_FLASH_START - page_info.size), read_buf, EXPECTED_SIZE); in ZTEST()
195 zassert_true(rc < 0, "Invalid use of flash_read returned %d", rc); in ZTEST()
198 rc = flash_read(flash_dev, (TEST_FLASH_START + TEST_FLASH_SIZE), read_buf, EXPECTED_SIZE); in ZTEST()
199 zassert_true(rc < 0, "Invalid use of flash_read returned %d", rc); in ZTEST()
202 rc = flash_read(flash_dev, TEST_AREA_OFFSET, read_buf, (TEST_FLASH_SIZE + page_info.size)); in ZTEST()
203 zassert_true(rc < 0, "Invalid use of flash_read returned %d", rc); in ZTEST()
206 rc = flash_read(flash_dev, TEST_AREA_OFFSET, read_buf, 0); in ZTEST()
207 zassert_true(rc == 0, "flash_read 0 bytes returned %d", rc); in ZTEST()
212 int rc; in ZTEST() local
226 rc = flash_write(flash_dev, (TEST_FLASH_START - page_info.size), expected, page_info.size); in ZTEST()
227 zassert_true(rc < 0, "Invalid use of flash_write returned %d", rc); in ZTEST()
230 rc = flash_write(flash_dev, (TEST_FLASH_START + TEST_FLASH_SIZE), expected, page_info.size); in ZTEST()
231 zassert_true(rc < 0, "Invalid use of flash_write returned %d", rc); in ZTEST()
234 rc = flash_write(flash_dev, (TEST_AREA_OFFSET + 1), expected, (TEST_FLASH_SIZE + 1)); in ZTEST()
235 zassert_true(rc < 0, "Invalid use of flash_write returned %d", rc); in ZTEST()
238 rc = flash_write(flash_dev, TEST_AREA_OFFSET, expected, 0); in ZTEST()
239 zassert_true(rc == 0, "flash_write 0 bytes returned %d", rc); in ZTEST()