Lines Matching refs:ret
44 int64_t ret = 0; in write_to_file() local
49 ret = fs_open(&file, file_path, FS_O_RDWR | FS_O_CREATE); in write_to_file()
50 zassert_equal(ret, 0, "File open failed (ret=%d)", ret); in write_to_file()
52 ret = testfs_write_incrementing(&file, 0, bytes_to_write); in write_to_file()
53 zassert_equal(ret, bytes_to_write, "Different number of bytes written %ld (expected %ld)", in write_to_file()
54 ret, bytes_to_write); in write_to_file()
56 ret = fs_close(&file); in write_to_file()
57 zassert_equal(ret, 0, "File close failed (ret=%d)", ret); in write_to_file()
61 ret = fs_stat(file_path, &entry); in write_to_file()
62 zassert_equal(ret, 0, "File stat failed (ret=%d)", ret); in write_to_file()
68 ret = fs_open(&file, file_path, FS_O_READ); in write_to_file()
69 zassert_equal(ret, 0, "File open failed (ret=%d)", ret); in write_to_file()
72 ret = testfs_verify_incrementing(&file, 0, bytes_to_write); in write_to_file()
73 zassert_equal(ret, bytes_to_write, "Different number of bytes read %ld (expected %ld)", in write_to_file()
74 ret, bytes_to_write); in write_to_file()
76 ret = fs_close(&file); in write_to_file()
77 zassert_equal(ret, 0, "File close failed (ret=%d)", ret); in write_to_file()
82 int64_t ret = 0; in truncate_file() local
90 ret = fs_open(&file, file_path, FS_O_RDWR); in truncate_file()
91 zassert_equal(ret, 0, "File open failed (ret=%d)", ret); in truncate_file()
93 ret = fs_truncate(&file, new_size); in truncate_file()
94 zassert_equal(ret, 0, "File truncate failed (ret=%d)", ret); in truncate_file()
96 ret = fs_stat(file_path, &entry); in truncate_file()
97 zassert_equal(ret, 0, "File stat failed (ret=%d)", ret); in truncate_file()
101 ret = fs_seek(&file, 0, FS_SEEK_SET); in truncate_file()
102 zassert_equal(ret, 0, "File seek failed (ret=%d)", ret); in truncate_file()
104 ret = testfs_verify_incrementing(&file, 0, new_size); in truncate_file()
105 zassert_equal(ret, new_size, "Different number of bytes read %ld (expected %ld)", in truncate_file()
106 ret, new_size); in truncate_file()
108 ret = fs_close(&file); in truncate_file()
109 zassert_equal(ret, 0, "File close failed (ret=%d)", ret); in truncate_file()
114 int64_t ret = 0; in writing_test() local
119 ret = fs_mkfs(FS_EXT2, (uintptr_t)mp->storage_dev, config, 0); in writing_test()
120 zassert_equal(ret, 0, "Failed to mkfs with 2K blocks"); in writing_test()
123 ret = fs_mount(mp); in writing_test()
124 zassert_equal(ret, 0, "Mount failed (ret=%d)", ret); in writing_test()
126 ret = fs_statvfs(mp->mnt_point, &sbuf); in writing_test()
127 zassert_equal(ret, 0, "Expected success (ret=%d)", ret); in writing_test()
148 ret = fs_unmount(mp); in writing_test()
149 zassert_equal(ret, 0, "Unmount failed (ret=%d)", ret); in writing_test()
154 int64_t ret = 0; in ZTEST() local
159 ret = fs_mkfs(FS_EXT2, (uintptr_t)mp->storage_dev, NULL, 0); in ZTEST()
160 zassert_equal(ret, 0, "Failed to mkfs with 2K blocks"); in ZTEST()
163 ret = fs_mount(mp); in ZTEST()
164 zassert_equal(ret, 0, "Mount failed (ret=%d)", ret); in ZTEST()
166 ret = fs_statvfs(mp->mnt_point, &sbuf); in ZTEST()
167 zassert_equal(ret, 0, "Expected success (ret=%d)", ret); in ZTEST()
189 ret = fs_unmount(mp); in ZTEST()
190 zassert_equal(ret, 0, "Unmount failed (ret=%d)", ret); in ZTEST()