mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
unit-test/io_engine_t: use posix_memalign() rather than aligned_alloc()
Not present on older systems.
This commit is contained in:
parent
cca815d240
commit
ef79d639fe
@ -46,8 +46,8 @@ static void *_fix_init(void)
|
|||||||
T_ASSERT(f);
|
T_ASSERT(f);
|
||||||
f->e = create_async_io_engine();
|
f->e = create_async_io_engine();
|
||||||
T_ASSERT(f->e);
|
T_ASSERT(f->e);
|
||||||
f->data = aligned_alloc(4096, SECTOR_SIZE * BLOCK_SIZE_SECTORS);
|
if (posix_memalign(&f->data, 4096, SECTOR_SIZE * BLOCK_SIZE_SECTORS))
|
||||||
T_ASSERT(f->data);
|
test_fail("posix_memalign failed");
|
||||||
|
|
||||||
snprintf(f->fname, sizeof(f->fname), "unit-test-XXXXXX");
|
snprintf(f->fname, sizeof(f->fname), "unit-test-XXXXXX");
|
||||||
f->fd = mkostemp(f->fname, O_RDWR | O_CREAT | O_EXCL);
|
f->fd = mkostemp(f->fname, O_RDWR | O_CREAT | O_EXCL);
|
||||||
|
Loading…
Reference in New Issue
Block a user