Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update existing and add new tests for migration v2 #754

Merged
merged 24 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
76b0d84
test: update existing tests
w-henderson Jul 25, 2023
f859512
test: reintroduce migration unit tests for v2
w-henderson Jul 25, 2023
d4a01e1
test: add migration state sequence test
w-henderson Jul 27, 2023
a43e509
test: add tests for `handle_mig_data_read`
w-henderson Jul 28, 2023
014f0b4
test: add tests for `handle_mig_data_write`
w-henderson Jul 28, 2023
a20c96c
test: add test for starting in RESUMING state
w-henderson Jul 28, 2023
fb04887
test: add tests for dirty page logging
w-henderson Jul 31, 2023
d636a4d
test: fix memory leak in unit tests
w-henderson Jul 31, 2023
e843750
fix: conflict with kernel definitions in tests
w-henderson Aug 1, 2023
d3020a4
test: add tests for logging specific pages
w-henderson Aug 2, 2023
161771f
fix: memory leak in dirty page tracking tests
w-henderson Aug 2, 2023
dc85c28
test: add tests for migration FSM paths
w-henderson Aug 4, 2023
0db1c37
test: add test for nonexistent state
w-henderson Aug 7, 2023
ffbd9f8
fix: fixes for changes from John's core review
w-henderson Aug 9, 2023
38fce72
refactor: move a number of tests from C to Python
w-henderson Aug 16, 2023
13affff
test: add missing tests for different dirty page sizes
w-henderson Aug 17, 2023
962e613
test: improve test coverage
w-henderson Aug 18, 2023
e3fcfa4
fix: argsz semantics in tests
w-henderson Aug 24, 2023
631ac2a
test: add more tests for bad argsz
w-henderson Aug 24, 2023
9ed381b
fix: authors of test_migration.py
w-henderson Aug 29, 2023
37a77a8
respond to more of Thanos's comments
w-henderson Sep 4, 2023
e9127e0
refactor migration tests and small test fixes
w-henderson Sep 7, 2023
f567bb8
refactor bad python
w-henderson Sep 7, 2023
e87e6a3
refactor migration transition test
w-henderson Sep 13, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 2 additions & 18 deletions test/mocks.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,23 +199,6 @@ should_exec_command(vfu_ctx_t *vfu_ctx, uint16_t cmd)
return mock();
}

ssize_t
migration_region_access_registers(vfu_ctx_t *vfu_ctx, char *buf, size_t count,
loff_t pos, bool is_write)
{
if (!is_patched("migration_region_access_registers")) {
return __real_migration_region_access_registers(vfu_ctx, buf, count,
pos, is_write);
}
check_expected(vfu_ctx);
check_expected(buf);
check_expected(count);
check_expected(pos);
check_expected(is_write);
errno = mock();
return mock();
}

ssize_t
handle_device_state(vfu_ctx_t *vfu_ctx, struct migration *migr,
uint32_t device_state, bool notify) {
Expand All @@ -232,7 +215,8 @@ handle_device_state(vfu_ctx_t *vfu_ctx, struct migration *migr,
}

void
migr_state_transition(struct migration *migr, enum migr_iter_state state)
migr_state_transition(struct migration *migr,
enum vfio_user_device_mig_state state)
{
if (!is_patched("migr_state_transition")) {
__real_migr_state_transition(migr, state);
Expand Down
Loading
Loading