Lines Matching full:pp

13 static const char *path_vextend(struct testfs_path *pp,  in path_vextend()  argument
17 const char *endp = pp->path + sizeof(pp->path); in path_vextend()
21 char *eos = pp->eos; in path_vextend()
25 char *sp = strrchr(pp->path, '/'); in path_vextend()
27 if (sp == pp->path) { in path_vextend()
41 pp->eos = eos; in path_vextend()
45 return pp->path; in path_vextend()
48 const char *testfs_path_init(struct testfs_path *pp, in testfs_path_init() argument
55 pp->path[0] = '/'; in testfs_path_init()
56 pp->eos = pp->path + 1; in testfs_path_init()
61 if ((len + 1) >= sizeof(pp->path)) { in testfs_path_init()
62 len = sizeof(pp->path) - 1; in testfs_path_init()
64 strncpy(pp->path, mp->mnt_point, len); in testfs_path_init()
65 pp->eos = pp->path + len; in testfs_path_init()
67 *pp->eos = '\0'; in testfs_path_init()
70 path_vextend(pp, ap); in testfs_path_init()
72 return pp->path; in testfs_path_init()
75 const char *testfs_path_extend(struct testfs_path *pp, in testfs_path_extend() argument
80 va_start(ap, pp); in testfs_path_extend()
81 path_vextend(pp, ap); in testfs_path_extend()
84 return pp->path; in testfs_path_extend()
284 static int check_layout_entry(struct testfs_path *pp, in check_layout_entry() argument
293 testfs_path_extend(pp, statp->name, in check_layout_entry()
301 rc = fs_open(&file, pp->path, FS_O_CREATE | FS_O_RDWR); in check_layout_entry()
304 pp->path, rc); in check_layout_entry()
311 pp->path, rc); in check_layout_entry()
320 pp->path, rc); in check_layout_entry()
323 rc = testfs_bcmd_verify_layout(pp, in check_layout_entry()
332 testfs_path_extend(pp, "..", in check_layout_entry()
343 int testfs_bcmd_verify_layout(struct testfs_path *pp, in testfs_bcmd_verify_layout() argument
359 int rc = fs_opendir(&dir, pp->path); in testfs_bcmd_verify_layout()
362 TC_PRINT("%s: opendir failed: %d\n", pp->path, rc); in testfs_bcmd_verify_layout()
369 TC_PRINT("check %s for %zu entries\n", pp->path, ecp - scp); in testfs_bcmd_verify_layout()
392 TC_PRINT("%s %s%s%s %zu\n", pp->path, in testfs_bcmd_verify_layout()
404 rc = check_layout_entry(pp, &stat, cp, ecp); in testfs_bcmd_verify_layout()
412 TC_PRINT("%s found %u entries, %u foreign\n", pp->path, count, foreign); in testfs_bcmd_verify_layout()
418 pp->path, rc2); in testfs_bcmd_verify_layout()