g_autofree char *img_path = NULL;
uint64_t perm, shared_perm;
- int fd = g_file_open_tmp("qtest.XXXXXX", &img_path, NULL);
+ int fd = g_file_open_tmp("qemu-tst-img-lock.XXXXXX", &img_path, NULL);
assert(fd >= 0);
perm = BLK_PERM_WRITE | BLK_PERM_CONSISTENT_READ;
g_autofree char *img_path = NULL;
uint64_t perm, shared_perm;
int r;
- int fd = g_file_open_tmp("qtest.XXXXXX", &img_path, NULL);
+ int fd = g_file_open_tmp("qemu-tst-img-lock.XXXXXX", &img_path, NULL);
assert(fd >= 0);
perm = BLK_PERM_WRITE | BLK_PERM_CONSISTENT_READ;
check_locked_bytes(fd, perm, ~shared_perm);
blk_unref(blk1);
blk_unref(blk2);
+ close(fd);
+ unlink(img_path);
}
int main(int argc, char **argv)