Lines Matching refs:file

1 [[case]] # move file
9 lfs_file_open(&lfs, &file, "a/hello", LFS_O_CREAT | LFS_O_WRONLY) => 0;
10 lfs_file_write(&lfs, &file, "hola\n", 5) => 5;
11 lfs_file_write(&lfs, &file, "bonjour\n", 8) => 8;
12 lfs_file_write(&lfs, &file, "ohayo\n", 6) => 6;
13 lfs_file_close(&lfs, &file) => 0;
44 lfs_file_open(&lfs, &file, "a/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
45 lfs_file_open(&lfs, &file, "b/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
46 lfs_file_open(&lfs, &file, "c/hello", LFS_O_RDONLY) => 0;
47 lfs_file_read(&lfs, &file, buffer, 5) => 5;
49 lfs_file_read(&lfs, &file, buffer, 8) => 8;
51 lfs_file_read(&lfs, &file, buffer, 6) => 6;
53 lfs_file_close(&lfs, &file) => 0;
54 lfs_file_open(&lfs, &file, "d/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
74 [[case]] # move file corrupt source
83 lfs_file_open(&lfs, &file, "a/hello", LFS_O_CREAT | LFS_O_WRONLY) => 0;
84 lfs_file_write(&lfs, &file, "hola\n", 5) => 5;
85 lfs_file_write(&lfs, &file, "bonjour\n", 8) => 8;
86 lfs_file_write(&lfs, &file, "ohayo\n", 6) => 6;
87 lfs_file_close(&lfs, &file) => 0;
135 lfs_file_open(&lfs, &file, "a/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
136 lfs_file_open(&lfs, &file, "b/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
137 lfs_file_open(&lfs, &file, "c/hello", LFS_O_RDONLY) => 0;
138 lfs_file_read(&lfs, &file, buffer, 5) => 5;
140 lfs_file_read(&lfs, &file, buffer, 8) => 8;
142 lfs_file_read(&lfs, &file, buffer, 6) => 6;
144 lfs_file_close(&lfs, &file) => 0;
145 lfs_file_open(&lfs, &file, "d/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
149 [[case]] # move file corrupt source and dest
159 lfs_file_open(&lfs, &file, "a/hello", LFS_O_CREAT | LFS_O_WRONLY) => 0;
160 lfs_file_write(&lfs, &file, "hola\n", 5) => 5;
161 lfs_file_write(&lfs, &file, "bonjour\n", 8) => 8;
162 lfs_file_write(&lfs, &file, "ohayo\n", 6) => 6;
163 lfs_file_close(&lfs, &file) => 0;
227 lfs_file_open(&lfs, &file, "a/hello", LFS_O_RDONLY) => 0;
228 lfs_file_read(&lfs, &file, buffer, 5) => 5;
230 lfs_file_read(&lfs, &file, buffer, 8) => 8;
232 lfs_file_read(&lfs, &file, buffer, 6) => 6;
234 lfs_file_close(&lfs, &file) => 0;
235 lfs_file_open(&lfs, &file, "b/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
236 lfs_file_open(&lfs, &file, "c/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
237 lfs_file_open(&lfs, &file, "d/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
241 [[case]] # move file after corrupt
251 lfs_file_open(&lfs, &file, "a/hello", LFS_O_CREAT | LFS_O_WRONLY) => 0;
252 lfs_file_write(&lfs, &file, "hola\n", 5) => 5;
253 lfs_file_write(&lfs, &file, "bonjour\n", 8) => 8;
254 lfs_file_write(&lfs, &file, "ohayo\n", 6) => 6;
255 lfs_file_close(&lfs, &file) => 0;
324 lfs_file_open(&lfs, &file, "a/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
325 lfs_file_open(&lfs, &file, "b/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
326 lfs_file_open(&lfs, &file, "c/hello", LFS_O_RDONLY) => 0;
327 lfs_file_read(&lfs, &file, buffer, 5) => 5;
329 lfs_file_read(&lfs, &file, buffer, 8) => 8;
331 lfs_file_read(&lfs, &file, buffer, 6) => 6;
333 lfs_file_close(&lfs, &file) => 0;
334 lfs_file_open(&lfs, &file, "d/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
338 [[case]] # simple reentrant move file
399 // create file
400 lfs_file_open(&lfs, &file, "a/hello",
402 lfs_file_write(&lfs, &file, "hola\n", 5) => 5;
403 lfs_file_write(&lfs, &file, "bonjour\n", 8) => 8;
404 lfs_file_write(&lfs, &file, "ohayo\n", 6) => 6;
405 lfs_file_close(&lfs, &file) => 0;
434 lfs_file_open(&lfs, &file, "a/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
435 lfs_file_open(&lfs, &file, "b/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
436 lfs_file_open(&lfs, &file, "c/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
437 lfs_file_open(&lfs, &file, "d/hello", LFS_O_RDONLY) => 0;
438 lfs_file_read(&lfs, &file, buffer, 5) => 5;
440 lfs_file_read(&lfs, &file, buffer, 8) => 8;
442 lfs_file_read(&lfs, &file, buffer, 6) => 6;
444 lfs_file_close(&lfs, &file) => 0;
926 lfs_file_open(&lfs, &file, "a/hello", LFS_O_CREAT | LFS_O_WRONLY) => 0;
927 lfs_file_write(&lfs, &file, "hola\n", 5) => 5;
928 lfs_file_write(&lfs, &file, "bonjour\n", 8) => 8;
929 lfs_file_write(&lfs, &file, "ohayo\n", 6) => 6;
930 lfs_file_close(&lfs, &file) => 0;
944 lfs_file_open(&lfs, &file, "a/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
945 lfs_file_open(&lfs, &file, "b/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
946 lfs_file_open(&lfs, &file, "c/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
947 lfs_file_open(&lfs, &file, "d/hello", LFS_O_RDONLY) => 0;
948 lfs_file_read(&lfs, &file, buffer, 5) => 5;
950 lfs_file_read(&lfs, &file, buffer, 8) => 8;
952 lfs_file_read(&lfs, &file, buffer, 6) => 6;
954 lfs_file_close(&lfs, &file) => 0;
967 lfs_file_open(&lfs, &file, "a/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
968 lfs_file_open(&lfs, &file, "b/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
969 lfs_file_open(&lfs, &file, "c/hello", LFS_O_RDONLY) => LFS_ERR_NOENT;
970 lfs_file_open(&lfs, &file, "d/hello", LFS_O_RDONLY) => 0;
971 lfs_file_read(&lfs, &file, buffer, 5) => 5;
973 lfs_file_read(&lfs, &file, buffer, 8) => 8;
975 lfs_file_read(&lfs, &file, buffer, 6) => 6;
977 lfs_file_close(&lfs, &file) => 0;
988 lfs_file_open(&lfs, &file, "/1.move_me",
990 lfs_file_close(&lfs, &file) => 0;
992 lfs_file_open(&lfs, &file, "/0.before",
994 lfs_file_write(&lfs, &file, "test.1", 7) => 7;
995 lfs_file_close(&lfs, &file) => 0;
997 lfs_file_open(&lfs, &file, "/2.in_between",
999 lfs_file_write(&lfs, &file, "test.2", 7) => 7;
1000 lfs_file_close(&lfs, &file) => 0;
1002 lfs_file_open(&lfs, &file, "/4.after",
1004 lfs_file_write(&lfs, &file, "test.3", 7) => 7;
1005 lfs_file_close(&lfs, &file) => 0;
1018 // rename file while everything is open, this triggers both
1053 lfs_file_open(&lfs, &file, "/0.before", LFS_O_RDONLY) => 0;
1054 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1056 lfs_file_close(&lfs, &file) => 0;
1057 lfs_file_open(&lfs, &file, "/2.in_between", LFS_O_RDONLY) => 0;
1058 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1060 lfs_file_close(&lfs, &file) => 0;
1061 lfs_file_open(&lfs, &file, "/4.after", LFS_O_RDONLY) => 0;
1062 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1064 lfs_file_close(&lfs, &file) => 0;
1077 // rename file while everything is open, this triggers both
1112 lfs_file_open(&lfs, &file, "/0.before", LFS_O_RDONLY) => 0;
1113 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1115 lfs_file_close(&lfs, &file) => 0;
1116 lfs_file_open(&lfs, &file, "/2.in_between", LFS_O_RDONLY) => 0;
1117 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1119 lfs_file_close(&lfs, &file) => 0;
1120 lfs_file_open(&lfs, &file, "/4.after", LFS_O_RDONLY) => 0;
1121 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1123 lfs_file_close(&lfs, &file) => 0;
1134 lfs_file_open(&lfs, &file, "/1.move_me",
1136 lfs_file_close(&lfs, &file) => 0;
1137 lfs_file_open(&lfs, &file, "/3.move_me",
1139 lfs_file_write(&lfs, &file, "remove me",
1141 lfs_file_close(&lfs, &file) => 0;
1143 lfs_file_open(&lfs, &file, "/0.before",
1145 lfs_file_write(&lfs, &file, "test.1", 7) => 7;
1146 lfs_file_close(&lfs, &file) => 0;
1148 lfs_file_open(&lfs, &file, "/2.in_between",
1150 lfs_file_write(&lfs, &file, "test.2", 7) => 7;
1151 lfs_file_close(&lfs, &file) => 0;
1153 lfs_file_open(&lfs, &file, "/4.after",
1155 lfs_file_write(&lfs, &file, "test.3", 7) => 7;
1156 lfs_file_close(&lfs, &file) => 0;
1169 // rename file while everything is open, this triggers both
1204 lfs_file_open(&lfs, &file, "/0.before", LFS_O_RDONLY) => 0;
1205 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1207 lfs_file_close(&lfs, &file) => 0;
1208 lfs_file_open(&lfs, &file, "/2.in_between", LFS_O_RDONLY) => 0;
1209 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1211 lfs_file_close(&lfs, &file) => 0;
1212 lfs_file_open(&lfs, &file, "/4.after", LFS_O_RDONLY) => 0;
1213 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1215 lfs_file_close(&lfs, &file) => 0;
1218 lfs_file_open(&lfs, &file, "/1.move_me",
1220 lfs_file_write(&lfs, &file, "remove me",
1222 lfs_file_close(&lfs, &file) => 0;
1234 // rename file while everything is open, this triggers both
1269 lfs_file_open(&lfs, &file, "/0.before", LFS_O_RDONLY) => 0;
1270 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1272 lfs_file_close(&lfs, &file) => 0;
1273 lfs_file_open(&lfs, &file, "/2.in_between", LFS_O_RDONLY) => 0;
1274 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1276 lfs_file_close(&lfs, &file) => 0;
1277 lfs_file_open(&lfs, &file, "/4.after", LFS_O_RDONLY) => 0;
1278 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1280 lfs_file_close(&lfs, &file) => 0;
1292 lfs_file_open(&lfs, &file, "/dir.1/1.move_me",
1294 lfs_file_close(&lfs, &file) => 0;
1295 lfs_file_open(&lfs, &file, "/dir.2/1.move_me",
1297 lfs_file_write(&lfs, &file, "remove me",
1299 lfs_file_close(&lfs, &file) => 0;
1301 lfs_file_open(&lfs, &file, "/dir.1/0.before",
1303 lfs_file_write(&lfs, &file, "test.1", 7) => 7;
1304 lfs_file_close(&lfs, &file) => 0;
1305 lfs_file_open(&lfs, &file, "/dir.1/2.after",
1307 lfs_file_write(&lfs, &file, "test.2", 7) => 7;
1308 lfs_file_close(&lfs, &file) => 0;
1310 lfs_file_open(&lfs, &file, "/dir.2/0.before",
1312 lfs_file_write(&lfs, &file, "test.3", 7) => 7;
1313 lfs_file_close(&lfs, &file) => 0;
1314 lfs_file_open(&lfs, &file, "/dir.2/2.after",
1316 lfs_file_write(&lfs, &file, "test.4", 7) => 7;
1317 lfs_file_close(&lfs, &file) => 0;
1333 // rename file while everything is open, this triggers both
1334 // a create and delete as it overwrites the destination file
1399 lfs_file_open(&lfs, &file, "/dir.1/0.before", LFS_O_RDONLY) => 0;
1400 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1402 lfs_file_close(&lfs, &file) => 0;
1403 lfs_file_open(&lfs, &file, "/dir.1/2.after", LFS_O_RDONLY) => 0;
1404 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1406 lfs_file_close(&lfs, &file) => 0;
1407 lfs_file_open(&lfs, &file, "/dir.2/0.before", LFS_O_RDONLY) => 0;
1408 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1410 lfs_file_close(&lfs, &file) => 0;
1411 lfs_file_open(&lfs, &file, "/dir.2/2.after", LFS_O_RDONLY) => 0;
1412 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1414 lfs_file_close(&lfs, &file) => 0;
1417 lfs_file_open(&lfs, &file, "/dir.1/1.move_me",
1419 lfs_file_write(&lfs, &file, "remove me",
1421 lfs_file_close(&lfs, &file) => 0;
1436 // rename file while everything is open, this triggers both
1502 lfs_file_open(&lfs, &file, "/dir.1/0.before", LFS_O_RDONLY) => 0;
1503 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1505 lfs_file_close(&lfs, &file) => 0;
1506 lfs_file_open(&lfs, &file, "/dir.1/2.after", LFS_O_RDONLY) => 0;
1507 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1509 lfs_file_close(&lfs, &file) => 0;
1510 lfs_file_open(&lfs, &file, "/dir.2/0.before", LFS_O_RDONLY) => 0;
1511 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1513 lfs_file_close(&lfs, &file) => 0;
1514 lfs_file_open(&lfs, &file, "/dir.2/2.after", LFS_O_RDONLY) => 0;
1515 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1517 lfs_file_close(&lfs, &file) => 0;
1532 lfs_file_open(&lfs, &file, "/parent/1.move_me",
1534 lfs_file_write(&lfs, &file, "move me",
1536 lfs_file_close(&lfs, &file) => 0;
1538 lfs_file_open(&lfs, &file, "/parent/0.before",
1540 lfs_file_write(&lfs, &file, "test.1", 7) => 7;
1541 lfs_file_close(&lfs, &file) => 0;
1542 lfs_file_open(&lfs, &file, "/parent/2.after",
1544 lfs_file_write(&lfs, &file, "test.2", 7) => 7;
1545 lfs_file_close(&lfs, &file) => 0;
1546 lfs_file_open(&lfs, &file, "/parent/child/0.before",
1548 lfs_file_write(&lfs, &file, "test.3", 7) => 7;
1549 lfs_file_close(&lfs, &file) => 0;
1550 lfs_file_open(&lfs, &file, "/parent/child/2.after",
1552 lfs_file_write(&lfs, &file, "test.4", 7) => 7;
1553 lfs_file_close(&lfs, &file) => 0;
1583 // ok, now we move the file, this creates a move that needs to be
1639 lfs_file_open(&lfs, &file, "/parent/0.before", LFS_O_RDONLY) => 0;
1640 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1642 lfs_file_close(&lfs, &file) => 0;
1643 lfs_file_open(&lfs, &file, "/parent/2.after", LFS_O_RDONLY) => 0;
1644 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1646 lfs_file_close(&lfs, &file) => 0;
1647 lfs_file_open(&lfs, &file, "/parent/child/0.before", LFS_O_RDONLY) => 0;
1648 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1650 lfs_file_close(&lfs, &file) => 0;
1651 lfs_file_open(&lfs, &file, "/parent/child/2.after", LFS_O_RDONLY) => 0;
1652 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1654 lfs_file_close(&lfs, &file) => 0;
1670 lfs_file_open(&lfs, &file, "/parent/sibling/1.move_me",
1672 lfs_file_write(&lfs, &file, "move me",
1674 lfs_file_close(&lfs, &file) => 0;
1676 lfs_file_open(&lfs, &file, "/parent/sibling/0.before",
1678 lfs_file_write(&lfs, &file, "test.1", 7) => 7;
1679 lfs_file_close(&lfs, &file) => 0;
1680 lfs_file_open(&lfs, &file, "/parent/sibling/2.after",
1682 lfs_file_write(&lfs, &file, "test.2", 7) => 7;
1683 lfs_file_close(&lfs, &file) => 0;
1684 lfs_file_open(&lfs, &file, "/parent/child/0.before",
1686 lfs_file_write(&lfs, &file, "test.3", 7) => 7;
1687 lfs_file_close(&lfs, &file) => 0;
1688 lfs_file_open(&lfs, &file, "/parent/child/2.after",
1690 lfs_file_write(&lfs, &file, "test.4", 7) => 7;
1691 lfs_file_close(&lfs, &file) => 0;
1727 // ok, now we move the file, this creates a move that needs to be
1798 lfs_file_open(&lfs, &file, "/parent/sibling/0.before", LFS_O_RDONLY) => 0;
1799 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1801 lfs_file_close(&lfs, &file) => 0;
1802 lfs_file_open(&lfs, &file, "/parent/sibling/2.after", LFS_O_RDONLY) => 0;
1803 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1805 lfs_file_close(&lfs, &file) => 0;
1806 lfs_file_open(&lfs, &file, "/parent/child/0.before", LFS_O_RDONLY) => 0;
1807 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1809 lfs_file_close(&lfs, &file) => 0;
1810 lfs_file_open(&lfs, &file, "/parent/child/2.after", LFS_O_RDONLY) => 0;
1811 lfs_file_read(&lfs, &file, buffer, 7) => 7;
1813 lfs_file_close(&lfs, &file) => 0;