[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 13/42] migration-test: Check for shared memory like for every
From: |
Juan Quintela |
Subject: |
Re: [PATCH 13/42] migration-test: Check for shared memory like for everything else |
Date: |
Wed, 21 Jun 2023 20:56:47 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) |
Peter Xu <peterx@redhat.com> wrote:
> On Wed, Jun 21, 2023 at 12:07:20PM +0200, Juan Quintela wrote:
>> Peter Xu <peterx@redhat.com> wrote:
>> > On Fri, Jun 09, 2023 at 12:49:14AM +0200, Juan Quintela wrote:
>> >> Makes things easier and cleaner.
>> >>
>> >> Signed-off-by: Juan Quintela <quintela@redhat.com>
>> >> ---
>> >> tests/qtest/migration-test.c | 20 ++++++++++++--------
>> >> 1 file changed, 12 insertions(+), 8 deletions(-)
>> >>
>> >> diff --git a/tests/qtest/migration-test.c b/tests/qtest/migration-test.c
>> >> index daaf5cd71a..5837060138 100644
>> >> --- a/tests/qtest/migration-test.c
>> >> +++ b/tests/qtest/migration-test.c
>> >> @@ -645,13 +645,6 @@ static int test_migrate_start(QTestState **from,
>> >> QTestState **to,
>> >> const char *arch = qtest_get_arch();
>> >> const char *memory_size;
>> >>
>> >> - if (args->use_shmem) {
>> >> - if (!g_file_test("/dev/shm", G_FILE_TEST_IS_DIR)) {
>> >> - g_test_skip("/dev/shm is not supported");
>> >> - return -1;
>> >> - }
>> >> - }
>> >
>> > Maybe assert on: "!args->use_shmem || shm_supported()" here?
>>
>> Nope.
>>
>> We are being extra defensive in some tests.
>
> This will protect a new test passing in use_shmem=true without checking
> shm_supported(). It'll then fail at starting the VM I think otherwise.
Hi
As it should.
Test is wrong and it aborts.
It is not that it has found an error, it is that it is badly written.
And anyways, args->use_shmem dissapears later in the series O:-)
Later, Juan.
- Re: [PATCH 10/42] migration-test: dirtylimit checks for x86_64 arch before, (continued)
[PATCH 15/42] migration-test: migrate_postcopy_prepare() always return 0, Juan Quintela, 2023/06/08
[PATCH 14/42] migration-test: test_migrate_start() always return 0, Juan Quintela, 2023/06/08
[PATCH 16/42] migration-test: Create do_migrate(), Juan Quintela, 2023/06/08
[PATCH 17/42] migration-test: Introduce GuestState, Juan Quintela, 2023/06/08
[PATCH 18/42] migration-test: Create guest before calling do_test_validate_uuid(), Juan Quintela, 2023/06/08
[PATCH 19/42] migration-test: Create guest before calling test_precopy_common(), Juan Quintela, 2023/06/08