Lines Matching refs:cfix

547 static struct ptunit_result dfix_init(struct iscache_fixture *cfix)  in dfix_init()  argument
551 ptu_test(ptunit_thrd_init, &cfix->thrd); in dfix_init()
553 memset(cfix->section, 0, sizeof(cfix->section)); in dfix_init()
565 cfix->section[idx] = section; in dfix_init()
571 static struct ptunit_result cfix_init(struct iscache_fixture *cfix) in cfix_init() argument
575 ptu_test(dfix_init, cfix); in cfix_init()
577 errcode = pt_iscache_init(&cfix->iscache, NULL); in cfix_init()
583 static struct ptunit_result sfix_init(struct iscache_fixture *cfix) in sfix_init() argument
587 ptu_test(cfix_init, cfix); in sfix_init()
589 cfix->iscache.limit = 0x7800; in sfix_init()
592 status = pt_iscache_add(&cfix->iscache, cfix->section[idx], in sfix_init()
600 static struct ptunit_result cfix_fini(struct iscache_fixture *cfix) in cfix_fini() argument
604 ptu_test(ptunit_thrd_fini, &cfix->thrd); in cfix_fini()
606 for (idx = 0; idx < cfix->thrd.nthreads; ++idx) in cfix_fini()
607 ptu_int_eq(cfix->thrd.result[idx], 0); in cfix_fini()
609 pt_iscache_fini(&cfix->iscache); in cfix_fini()
612 ptu_int_eq(cfix->section[idx]->ucount, 1); in cfix_fini()
613 ptu_int_eq(cfix->section[idx]->acount, 0); in cfix_fini()
614 ptu_int_eq(cfix->section[idx]->mcount, 0); in cfix_fini()
615 ptu_null(cfix->section[idx]->iscache); in cfix_fini()
617 errcode = pt_section_put(cfix->section[idx]); in cfix_fini()
745 static struct ptunit_result init_fini(struct iscache_fixture *cfix) in init_fini() argument
747 (void) cfix; in init_fini()
753 static struct ptunit_result name(struct iscache_fixture *cfix) in name() argument
757 pt_iscache_init(&cfix->iscache, "iscache-name"); in name()
759 name = pt_iscache_name(&cfix->iscache); in name()
765 static struct ptunit_result name_none(struct iscache_fixture *cfix) in name_none() argument
769 pt_iscache_init(&cfix->iscache, NULL); in name_none()
771 name = pt_iscache_name(&cfix->iscache); in name_none()
777 static struct ptunit_result add(struct iscache_fixture *cfix) in add() argument
781 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in add()
785 ptu_int_eq(cfix->section[0]->ucount, 2); in add()
786 ptu_int_eq(cfix->section[0]->acount, 1); in add()
792 static struct ptunit_result add_no_name(struct iscache_fixture *cfix) in add_no_name() argument
799 errcode = pt_iscache_add(&cfix->iscache, &section, 0ull); in add_no_name()
805 static struct ptunit_result add_file(struct iscache_fixture *cfix) in add_file() argument
809 isid = pt_iscache_add_file(&cfix->iscache, "name", 0ull, 1ull, 0ull); in add_file()
815 static struct ptunit_result find(struct iscache_fixture *cfix) in find() argument
820 section = cfix->section[0]; in find()
823 isid = pt_iscache_add(&cfix->iscache, section, 0ull); in find()
826 found = pt_iscache_find(&cfix->iscache, section->filename, in find()
833 static struct ptunit_result find_empty(struct iscache_fixture *cfix) in find_empty() argument
838 section = cfix->section[0]; in find_empty()
841 found = pt_iscache_find(&cfix->iscache, section->filename, in find_empty()
848 static struct ptunit_result find_bad_filename(struct iscache_fixture *cfix) in find_bad_filename() argument
853 section = cfix->section[0]; in find_bad_filename()
856 isid = pt_iscache_add(&cfix->iscache, section, 0ull); in find_bad_filename()
859 found = pt_iscache_find(&cfix->iscache, "bad-filename", in find_bad_filename()
866 static struct ptunit_result find_null_filename(struct iscache_fixture *cfix) in find_null_filename() argument
870 errcode = pt_iscache_find(&cfix->iscache, NULL, 0ull, 0ull, 0ull); in find_null_filename()
876 static struct ptunit_result find_bad_offset(struct iscache_fixture *cfix) in find_bad_offset() argument
881 section = cfix->section[0]; in find_bad_offset()
884 isid = pt_iscache_add(&cfix->iscache, section, 0ull); in find_bad_offset()
887 found = pt_iscache_find(&cfix->iscache, section->filename, 0ull, in find_bad_offset()
894 static struct ptunit_result find_bad_size(struct iscache_fixture *cfix) in find_bad_size() argument
899 section = cfix->section[0]; in find_bad_size()
902 isid = pt_iscache_add(&cfix->iscache, section, 0ull); in find_bad_size()
905 found = pt_iscache_find(&cfix->iscache, section->filename, in find_bad_size()
912 static struct ptunit_result find_bad_laddr(struct iscache_fixture *cfix) in find_bad_laddr() argument
917 section = cfix->section[0]; in find_bad_laddr()
920 isid = pt_iscache_add(&cfix->iscache, section, 0ull); in find_bad_laddr()
923 found = pt_iscache_find(&cfix->iscache, section->filename, in find_bad_laddr()
930 static struct ptunit_result lookup(struct iscache_fixture *cfix) in lookup() argument
936 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in lookup()
939 errcode = pt_iscache_lookup(&cfix->iscache, &section, &laddr, isid); in lookup()
941 ptu_ptr_eq(section, cfix->section[0]); in lookup()
950 static struct ptunit_result lookup_bad_isid(struct iscache_fixture *cfix) in lookup_bad_isid() argument
956 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in lookup_bad_isid()
959 errcode = pt_iscache_lookup(&cfix->iscache, &section, &laddr, 0); in lookup_bad_isid()
962 errcode = pt_iscache_lookup(&cfix->iscache, &section, &laddr, -isid); in lookup_bad_isid()
965 errcode = pt_iscache_lookup(&cfix->iscache, &section, &laddr, isid + 1); in lookup_bad_isid()
971 static struct ptunit_result clear_empty(struct iscache_fixture *cfix) in clear_empty() argument
975 errcode = pt_iscache_clear(&cfix->iscache); in clear_empty()
981 static struct ptunit_result clear_find(struct iscache_fixture *cfix) in clear_find() argument
986 section = cfix->section[0]; in clear_find()
989 isid = pt_iscache_add(&cfix->iscache, section, 0ull); in clear_find()
992 errcode = pt_iscache_clear(&cfix->iscache); in clear_find()
996 found = pt_iscache_find(&cfix->iscache, section->filename, in clear_find()
1003 static struct ptunit_result clear_lookup(struct iscache_fixture *cfix) in clear_lookup() argument
1009 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in clear_lookup()
1012 errcode = pt_iscache_clear(&cfix->iscache); in clear_lookup()
1015 errcode = pt_iscache_lookup(&cfix->iscache, &section, &laddr, isid); in clear_lookup()
1021 static struct ptunit_result add_twice(struct iscache_fixture *cfix) in add_twice() argument
1025 isid[0] = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in add_twice()
1028 isid[1] = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in add_twice()
1037 static struct ptunit_result add_same(struct iscache_fixture *cfix) in add_same() argument
1041 isid[0] = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in add_same()
1044 cfix->section[1]->offset = cfix->section[0]->offset; in add_same()
1045 cfix->section[1]->size = cfix->section[0]->size; in add_same()
1047 isid[1] = pt_iscache_add(&cfix->iscache, cfix->section[1], 0ull); in add_same()
1057 add_twice_different_laddr(struct iscache_fixture *cfix) in add_twice_different_laddr() argument
1061 isid[0] = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in add_twice_different_laddr()
1064 isid[1] = pt_iscache_add(&cfix->iscache, cfix->section[0], 1ull); in add_twice_different_laddr()
1071 ptu_int_eq(cfix->section[0]->ucount, 3); in add_twice_different_laddr()
1072 ptu_int_eq(cfix->section[0]->acount, 2); in add_twice_different_laddr()
1078 add_same_different_laddr(struct iscache_fixture *cfix) in add_same_different_laddr() argument
1082 isid[0] = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in add_same_different_laddr()
1085 cfix->section[1]->offset = cfix->section[0]->offset; in add_same_different_laddr()
1086 cfix->section[1]->size = cfix->section[0]->size; in add_same_different_laddr()
1088 isid[1] = pt_iscache_add(&cfix->iscache, cfix->section[1], 1ull); in add_same_different_laddr()
1098 add_different_same_laddr(struct iscache_fixture *cfix) in add_different_same_laddr() argument
1102 isid[0] = pt_iscache_add(&cfix->iscache, cfix->section[0], 0ull); in add_different_same_laddr()
1105 isid[1] = pt_iscache_add(&cfix->iscache, cfix->section[1], 0ull); in add_different_same_laddr()
1114 static struct ptunit_result add_file_same(struct iscache_fixture *cfix) in add_file_same() argument
1118 isid[0] = pt_iscache_add_file(&cfix->iscache, "name", 0ull, 1ull, 0ull); in add_file_same()
1121 isid[1] = pt_iscache_add_file(&cfix->iscache, "name", 0ull, 1ull, 0ull); in add_file_same()
1131 add_file_same_different_laddr(struct iscache_fixture *cfix) in add_file_same_different_laddr() argument
1135 isid[0] = pt_iscache_add_file(&cfix->iscache, "name", 0ull, 1ull, 0ull); in add_file_same_different_laddr()
1138 isid[1] = pt_iscache_add_file(&cfix->iscache, "name", 0ull, 1ull, 1ull); in add_file_same_different_laddr()
1148 add_file_different_same_laddr(struct iscache_fixture *cfix) in add_file_different_same_laddr() argument
1152 isid[0] = pt_iscache_add_file(&cfix->iscache, "name", 0ull, 1ull, 0ull); in add_file_different_same_laddr()
1155 isid[1] = pt_iscache_add_file(&cfix->iscache, "name", 1ull, 1ull, 0ull); in add_file_different_same_laddr()
1164 static struct ptunit_result read(struct iscache_fixture *cfix) in read() argument
1169 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in read()
1172 status = pt_iscache_read(&cfix->iscache, buffer, 2ull, isid, 0xa008ull); in read()
1181 static struct ptunit_result read_truncate(struct iscache_fixture *cfix) in read_truncate() argument
1186 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in read_truncate()
1189 status = pt_iscache_read(&cfix->iscache, buffer, sizeof(buffer), isid, in read_truncate()
1198 static struct ptunit_result read_bad_vaddr(struct iscache_fixture *cfix) in read_bad_vaddr() argument
1203 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in read_bad_vaddr()
1206 status = pt_iscache_read(&cfix->iscache, buffer, 1ull, isid, 0xb000ull); in read_bad_vaddr()
1213 static struct ptunit_result read_bad_isid(struct iscache_fixture *cfix) in read_bad_isid() argument
1218 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in read_bad_isid()
1221 status = pt_iscache_read(&cfix->iscache, buffer, 1ull, isid + 1, in read_bad_isid()
1229 static struct ptunit_result lru_map(struct iscache_fixture *cfix) in lru_map() argument
1233 cfix->iscache.limit = cfix->section[0]->size; in lru_map()
1234 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_map()
1235 ptu_null(cfix->iscache.lru); in lru_map()
1237 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_map()
1240 status = pt_section_map(cfix->section[0]); in lru_map()
1243 status = pt_section_unmap(cfix->section[0]); in lru_map()
1246 ptu_ptr(cfix->iscache.lru); in lru_map()
1247 ptu_ptr_eq(cfix->iscache.lru->section, cfix->section[0]); in lru_map()
1248 ptu_null(cfix->iscache.lru->next); in lru_map()
1249 ptu_uint_eq(cfix->iscache.used, cfix->section[0]->size); in lru_map()
1254 static struct ptunit_result lru_read(struct iscache_fixture *cfix) in lru_read() argument
1259 cfix->iscache.limit = cfix->section[0]->size; in lru_read()
1260 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_read()
1261 ptu_null(cfix->iscache.lru); in lru_read()
1263 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_read()
1266 status = pt_iscache_read(&cfix->iscache, buffer, 2ull, isid, 0xa008ull); in lru_read()
1269 ptu_ptr(cfix->iscache.lru); in lru_read()
1270 ptu_ptr_eq(cfix->iscache.lru->section, cfix->section[0]); in lru_read()
1271 ptu_null(cfix->iscache.lru->next); in lru_read()
1272 ptu_uint_eq(cfix->iscache.used, cfix->section[0]->size); in lru_read()
1277 static struct ptunit_result lru_map_nodup(struct iscache_fixture *cfix) in lru_map_nodup() argument
1281 cfix->iscache.limit = 2 * cfix->section[0]->size; in lru_map_nodup()
1282 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_map_nodup()
1283 ptu_null(cfix->iscache.lru); in lru_map_nodup()
1285 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_map_nodup()
1288 status = pt_section_map(cfix->section[0]); in lru_map_nodup()
1291 status = pt_section_unmap(cfix->section[0]); in lru_map_nodup()
1294 status = pt_section_map(cfix->section[0]); in lru_map_nodup()
1297 status = pt_section_unmap(cfix->section[0]); in lru_map_nodup()
1300 ptu_ptr(cfix->iscache.lru); in lru_map_nodup()
1301 ptu_ptr_eq(cfix->iscache.lru->section, cfix->section[0]); in lru_map_nodup()
1302 ptu_null(cfix->iscache.lru->next); in lru_map_nodup()
1303 ptu_uint_eq(cfix->iscache.used, cfix->section[0]->size); in lru_map_nodup()
1308 static struct ptunit_result lru_map_too_big(struct iscache_fixture *cfix) in lru_map_too_big() argument
1312 cfix->iscache.limit = cfix->section[0]->size - 1; in lru_map_too_big()
1313 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_map_too_big()
1314 ptu_null(cfix->iscache.lru); in lru_map_too_big()
1316 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_map_too_big()
1319 status = pt_section_map(cfix->section[0]); in lru_map_too_big()
1322 status = pt_section_unmap(cfix->section[0]); in lru_map_too_big()
1325 ptu_null(cfix->iscache.lru); in lru_map_too_big()
1326 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_map_too_big()
1331 static struct ptunit_result lru_map_add_front(struct iscache_fixture *cfix) in lru_map_add_front() argument
1335 cfix->iscache.limit = cfix->section[0]->size + cfix->section[1]->size; in lru_map_add_front()
1336 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_map_add_front()
1337 ptu_null(cfix->iscache.lru); in lru_map_add_front()
1339 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_map_add_front()
1342 isid = pt_iscache_add(&cfix->iscache, cfix->section[1], 0xa000ull); in lru_map_add_front()
1345 status = pt_section_map(cfix->section[0]); in lru_map_add_front()
1348 status = pt_section_unmap(cfix->section[0]); in lru_map_add_front()
1351 status = pt_section_map(cfix->section[1]); in lru_map_add_front()
1354 status = pt_section_unmap(cfix->section[1]); in lru_map_add_front()
1357 ptu_ptr(cfix->iscache.lru); in lru_map_add_front()
1358 ptu_ptr_eq(cfix->iscache.lru->section, cfix->section[1]); in lru_map_add_front()
1359 ptu_ptr(cfix->iscache.lru->next); in lru_map_add_front()
1360 ptu_ptr_eq(cfix->iscache.lru->next->section, cfix->section[0]); in lru_map_add_front()
1361 ptu_null(cfix->iscache.lru->next->next); in lru_map_add_front()
1362 ptu_uint_eq(cfix->iscache.used, in lru_map_add_front()
1363 cfix->section[0]->size + cfix->section[1]->size); in lru_map_add_front()
1368 static struct ptunit_result lru_map_move_front(struct iscache_fixture *cfix) in lru_map_move_front() argument
1372 cfix->iscache.limit = cfix->section[0]->size + cfix->section[1]->size; in lru_map_move_front()
1373 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_map_move_front()
1374 ptu_null(cfix->iscache.lru); in lru_map_move_front()
1376 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_map_move_front()
1379 isid = pt_iscache_add(&cfix->iscache, cfix->section[1], 0xa000ull); in lru_map_move_front()
1382 status = pt_section_map(cfix->section[0]); in lru_map_move_front()
1385 status = pt_section_unmap(cfix->section[0]); in lru_map_move_front()
1388 status = pt_section_map(cfix->section[1]); in lru_map_move_front()
1391 status = pt_section_unmap(cfix->section[1]); in lru_map_move_front()
1394 status = pt_section_map(cfix->section[0]); in lru_map_move_front()
1397 status = pt_section_unmap(cfix->section[0]); in lru_map_move_front()
1400 ptu_ptr(cfix->iscache.lru); in lru_map_move_front()
1401 ptu_ptr_eq(cfix->iscache.lru->section, cfix->section[0]); in lru_map_move_front()
1402 ptu_ptr(cfix->iscache.lru->next); in lru_map_move_front()
1403 ptu_ptr_eq(cfix->iscache.lru->next->section, cfix->section[1]); in lru_map_move_front()
1404 ptu_null(cfix->iscache.lru->next->next); in lru_map_move_front()
1405 ptu_uint_eq(cfix->iscache.used, in lru_map_move_front()
1406 cfix->section[0]->size + cfix->section[1]->size); in lru_map_move_front()
1411 static struct ptunit_result lru_map_evict(struct iscache_fixture *cfix) in lru_map_evict() argument
1415 cfix->iscache.limit = cfix->section[0]->size + in lru_map_evict()
1416 cfix->section[1]->size - 1; in lru_map_evict()
1417 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_map_evict()
1418 ptu_null(cfix->iscache.lru); in lru_map_evict()
1420 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_map_evict()
1423 isid = pt_iscache_add(&cfix->iscache, cfix->section[1], 0xa000ull); in lru_map_evict()
1426 status = pt_section_map(cfix->section[0]); in lru_map_evict()
1429 status = pt_section_unmap(cfix->section[0]); in lru_map_evict()
1432 status = pt_section_map(cfix->section[1]); in lru_map_evict()
1435 status = pt_section_unmap(cfix->section[1]); in lru_map_evict()
1438 ptu_ptr(cfix->iscache.lru); in lru_map_evict()
1439 ptu_ptr_eq(cfix->iscache.lru->section, cfix->section[1]); in lru_map_evict()
1440 ptu_null(cfix->iscache.lru->next); in lru_map_evict()
1441 ptu_uint_eq(cfix->iscache.used, cfix->section[1]->size); in lru_map_evict()
1446 static struct ptunit_result lru_bcache_evict(struct iscache_fixture *cfix) in lru_bcache_evict() argument
1450 cfix->iscache.limit = 4 * cfix->section[0]->size + in lru_bcache_evict()
1451 cfix->section[1]->size - 1; in lru_bcache_evict()
1452 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_bcache_evict()
1453 ptu_null(cfix->iscache.lru); in lru_bcache_evict()
1455 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_bcache_evict()
1458 isid = pt_iscache_add(&cfix->iscache, cfix->section[1], 0xa000ull); in lru_bcache_evict()
1461 status = pt_section_map(cfix->section[0]); in lru_bcache_evict()
1464 status = pt_section_unmap(cfix->section[0]); in lru_bcache_evict()
1467 status = pt_section_map(cfix->section[1]); in lru_bcache_evict()
1470 status = pt_section_unmap(cfix->section[1]); in lru_bcache_evict()
1473 status = pt_section_request_bcache(cfix->section[0]); in lru_bcache_evict()
1476 ptu_ptr(cfix->iscache.lru); in lru_bcache_evict()
1477 ptu_ptr_eq(cfix->iscache.lru->section, cfix->section[0]); in lru_bcache_evict()
1478 ptu_null(cfix->iscache.lru->next); in lru_bcache_evict()
1479 ptu_uint_eq(cfix->iscache.used, 4 * cfix->section[0]->size); in lru_bcache_evict()
1484 static struct ptunit_result lru_bcache_clear(struct iscache_fixture *cfix) in lru_bcache_clear() argument
1488 cfix->iscache.limit = cfix->section[0]->size + cfix->section[1]->size; in lru_bcache_clear()
1489 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_bcache_clear()
1490 ptu_null(cfix->iscache.lru); in lru_bcache_clear()
1492 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_bcache_clear()
1495 isid = pt_iscache_add(&cfix->iscache, cfix->section[1], 0xa000ull); in lru_bcache_clear()
1498 status = pt_section_map(cfix->section[0]); in lru_bcache_clear()
1501 status = pt_section_unmap(cfix->section[0]); in lru_bcache_clear()
1504 status = pt_section_map(cfix->section[1]); in lru_bcache_clear()
1507 status = pt_section_unmap(cfix->section[1]); in lru_bcache_clear()
1510 status = pt_section_request_bcache(cfix->section[0]); in lru_bcache_clear()
1513 ptu_null(cfix->iscache.lru); in lru_bcache_clear()
1514 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_bcache_clear()
1519 static struct ptunit_result lru_limit_evict(struct iscache_fixture *cfix) in lru_limit_evict() argument
1523 cfix->iscache.limit = cfix->section[0]->size + cfix->section[1]->size; in lru_limit_evict()
1524 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_limit_evict()
1525 ptu_null(cfix->iscache.lru); in lru_limit_evict()
1527 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_limit_evict()
1530 isid = pt_iscache_add(&cfix->iscache, cfix->section[1], 0xa000ull); in lru_limit_evict()
1533 status = pt_section_map(cfix->section[0]); in lru_limit_evict()
1536 status = pt_section_unmap(cfix->section[0]); in lru_limit_evict()
1539 status = pt_section_map(cfix->section[1]); in lru_limit_evict()
1542 status = pt_section_unmap(cfix->section[1]); in lru_limit_evict()
1545 status = pt_iscache_set_limit(&cfix->iscache, in lru_limit_evict()
1546 cfix->section[0]->size + in lru_limit_evict()
1547 cfix->section[1]->size - 1); in lru_limit_evict()
1550 ptu_ptr(cfix->iscache.lru); in lru_limit_evict()
1551 ptu_ptr_eq(cfix->iscache.lru->section, cfix->section[1]); in lru_limit_evict()
1552 ptu_null(cfix->iscache.lru->next); in lru_limit_evict()
1553 ptu_uint_eq(cfix->iscache.used, cfix->section[1]->size); in lru_limit_evict()
1558 static struct ptunit_result lru_clear(struct iscache_fixture *cfix) in lru_clear() argument
1562 cfix->iscache.limit = cfix->section[0]->size; in lru_clear()
1563 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_clear()
1564 ptu_null(cfix->iscache.lru); in lru_clear()
1566 isid = pt_iscache_add(&cfix->iscache, cfix->section[0], 0xa000ull); in lru_clear()
1569 status = pt_section_map(cfix->section[0]); in lru_clear()
1572 status = pt_section_unmap(cfix->section[0]); in lru_clear()
1575 status = pt_iscache_clear(&cfix->iscache); in lru_clear()
1578 ptu_null(cfix->iscache.lru); in lru_clear()
1579 ptu_uint_eq(cfix->iscache.used, 0ull); in lru_clear()
1586 struct iscache_fixture *cfix; in worker_add() local
1589 cfix = arg; in worker_add()
1590 if (!cfix) in worker_add()
1604 isid = pt_iscache_add(&cfix->iscache, in worker_add()
1605 cfix->section[sec], laddr); in worker_add()
1609 errcode = pt_iscache_lookup(&cfix->iscache, &section, in worker_add()
1623 if (section->offset != cfix->section[sec]->offset) in worker_add()
1626 if (section->size != cfix->section[sec]->size) in worker_add()
1640 struct iscache_fixture *cfix; in worker_add_file() local
1643 cfix = arg; in worker_add_file()
1644 if (!cfix) in worker_add_file()
1660 isid = pt_iscache_add_file(&cfix->iscache, "name", in worker_add_file()
1665 errcode = pt_iscache_lookup(&cfix->iscache, &section, in worker_add_file()
1690 struct iscache_fixture *cfix; in worker_map() local
1693 cfix = arg; in worker_map()
1694 if (!cfix) in worker_map()
1700 status = pt_section_map(cfix->section[sec]); in worker_map()
1704 status = pt_section_unmap(cfix->section[sec]); in worker_map()
1715 struct iscache_fixture *cfix; in worker_map_limit() local
1719 cfix = arg; in worker_map_limit()
1720 if (!cfix) in worker_map_limit()
1727 errcode = pt_section_map(cfix->section[sec]); in worker_map_limit()
1731 errcode = pt_section_unmap(cfix->section[sec]); in worker_map_limit()
1742 errcode = pt_iscache_set_limit(&cfix->iscache, limit); in worker_map_limit()
1752 struct iscache_fixture *cfix; in worker_map_bcache() local
1755 cfix = arg; in worker_map_bcache()
1756 if (!cfix) in worker_map_bcache()
1763 section = cfix->section[sec]; in worker_map_bcache()
1788 struct iscache_fixture *cfix; in worker_add_map() local
1792 cfix = arg; in worker_add_map()
1793 if (!cfix) in worker_add_map()
1796 section = cfix->section[0]; in worker_add_map()
1803 isid = pt_iscache_add(&cfix->iscache, section, laddr); in worker_add_map()
1821 struct iscache_fixture *cfix; in worker_add_clear() local
1825 cfix = arg; in worker_add_clear()
1826 if (!cfix) in worker_add_clear()
1829 section = cfix->section[0]; in worker_add_clear()
1836 isid = pt_iscache_add(&cfix->iscache, section, laddr); in worker_add_clear()
1840 errcode = pt_iscache_clear(&cfix->iscache); in worker_add_clear()
1850 struct iscache_fixture *cfix; in worker_add_file_map() local
1853 cfix = arg; in worker_add_file_map()
1854 if (!cfix) in worker_add_file_map()
1866 isid = pt_iscache_add_file(&cfix->iscache, "name", in worker_add_file_map()
1871 errcode = pt_iscache_lookup(&cfix->iscache, &section, in worker_add_file_map()
1893 struct iscache_fixture *cfix; in worker_add_file_clear() local
1896 cfix = arg; in worker_add_file_clear()
1897 if (!cfix) in worker_add_file_clear()
1908 isid = pt_iscache_add_file(&cfix->iscache, "name", in worker_add_file_clear()
1916 errcode = pt_iscache_clear(&cfix->iscache); in worker_add_file_clear()
1924 static struct ptunit_result stress(struct iscache_fixture *cfix, in stress() argument
1934 ptu_test(ptunit_thrd_create, &cfix->thrd, worker, cfix); in stress()
1938 errcode = worker(cfix); in stress()
1945 struct iscache_fixture cfix, dfix, sfix; in main() local
1948 cfix.init = cfix_init; in main()
1949 cfix.fini = cfix_fini; in main()
1973 ptu_run_f(suite, init_fini, cfix); in main()
1974 ptu_run_f(suite, add, cfix); in main()
1975 ptu_run_f(suite, add_no_name, cfix); in main()
1976 ptu_run_f(suite, add_file, cfix); in main()
1978 ptu_run_f(suite, find, cfix); in main()
1979 ptu_run_f(suite, find_empty, cfix); in main()
1980 ptu_run_f(suite, find_bad_filename, cfix); in main()
1981 ptu_run_f(suite, find_null_filename, cfix); in main()
1982 ptu_run_f(suite, find_bad_offset, cfix); in main()
1983 ptu_run_f(suite, find_bad_size, cfix); in main()
1984 ptu_run_f(suite, find_bad_laddr, cfix); in main()
1986 ptu_run_f(suite, lookup, cfix); in main()
1987 ptu_run_f(suite, lookup_bad_isid, cfix); in main()
1989 ptu_run_f(suite, clear_empty, cfix); in main()
1990 ptu_run_f(suite, clear_find, cfix); in main()
1991 ptu_run_f(suite, clear_lookup, cfix); in main()
1993 ptu_run_f(suite, add_twice, cfix); in main()
1994 ptu_run_f(suite, add_same, cfix); in main()
1995 ptu_run_f(suite, add_twice_different_laddr, cfix); in main()
1996 ptu_run_f(suite, add_same_different_laddr, cfix); in main()
1997 ptu_run_f(suite, add_different_same_laddr, cfix); in main()
1999 ptu_run_f(suite, add_file_same, cfix); in main()
2000 ptu_run_f(suite, add_file_same_different_laddr, cfix); in main()
2001 ptu_run_f(suite, add_file_different_same_laddr, cfix); in main()
2003 ptu_run_f(suite, read, cfix); in main()
2004 ptu_run_f(suite, read_truncate, cfix); in main()
2005 ptu_run_f(suite, read_bad_vaddr, cfix); in main()
2006 ptu_run_f(suite, read_bad_isid, cfix); in main()
2008 ptu_run_f(suite, lru_map, cfix); in main()
2009 ptu_run_f(suite, lru_read, cfix); in main()
2010 ptu_run_f(suite, lru_map_nodup, cfix); in main()
2011 ptu_run_f(suite, lru_map_too_big, cfix); in main()
2012 ptu_run_f(suite, lru_map_add_front, cfix); in main()
2013 ptu_run_f(suite, lru_map_move_front, cfix); in main()
2014 ptu_run_f(suite, lru_map_evict, cfix); in main()
2015 ptu_run_f(suite, lru_limit_evict, cfix); in main()
2016 ptu_run_f(suite, lru_bcache_evict, cfix); in main()
2017 ptu_run_f(suite, lru_bcache_clear, cfix); in main()
2018 ptu_run_f(suite, lru_clear, cfix); in main()
2020 ptu_run_fp(suite, stress, cfix, worker_add); in main()
2021 ptu_run_fp(suite, stress, cfix, worker_add_file); in main()
2025 ptu_run_fp(suite, stress, cfix, worker_add_map); in main()
2026 ptu_run_fp(suite, stress, cfix, worker_add_clear); in main()
2027 ptu_run_fp(suite, stress, cfix, worker_add_file_map); in main()
2028 ptu_run_fp(suite, stress, cfix, worker_add_file_clear); in main()