[LTP] [PATCH 4/7] KVM: Add async communication helper functions
Martin Doucha
mdoucha@suse.cz
Tue May 23 14:18:22 CEST 2023
On 23. 05. 23 14:13, Cyril Hrubis wrote:
> Hi!
>> +int tst_kvm_wait_guest(struct tst_kvm_instance *inst, int timeout)
>> +{
>> + volatile struct tst_kvm_result *result = inst->result;
>> + int32_t res;
>> + time_t start = time(NULL);
>> +
>> + while ((res = result->result) != KVM_TSYNC) {
>> + if (res == KVM_TEXIT)
>> + return res;
>> +
>> + if (timeout >= 0 && start + timeout <= time(NULL))
>> + return -1;
>
> Can we please avoid using wall clock time for timeouts? That is broken
> by desing, since the time is continually adjusted by ntp daemon these
> days and can jump back and forth...
Yes, I'll change it to tst_clock_gettime() in v2. But I'll wait a bit
for other patches to get merged before resubmitting.
--
Martin Doucha mdoucha@suse.cz
QA Engineer for Software Maintenance
SUSE LINUX, s.r.o.
CORSO IIa
Krizikova 148/34
186 00 Prague 8
Czech Republic
More information about the ltp
mailing list