kvm: selftests: Do not indent with spaces
Paolo Bonzini
maintainerPATCH 1/1 kvm: selftests: Do not indent with spaces
Some indentation with spaces crept in, likely due to terminal-based cut and paste. Clean it up.
Signed-off-by Paolo Bonzini <[email protected]>
--- .../selftests/kvm/include/x86_64/processor.h | 10 ++-- tools/testing/selftests/kvm/lib/kvm_util.c | 8 ++- .../selftests/kvm/lib/x86_64/processor.c | 60 +++++++++---------- .../selftests/kvm/x86_64/tsc_msrs_test.c | 4 +- .../kvm/x86_64/vmx_close_while_nested_test.c | 4 +- .../selftests/kvm/x86_64/xen_shinfo_test.c | 34 +++++------ 6 files changed, 61 insertions(+), 59 deletions(-)
tools/testing/selftests/kvm/include/x86_64/processor.h +5 -5
@@ -368,14 +368,14 @@ bool is_amd_cpu(void);static inline unsigned int x86_family (unsigned int eax) { -unsigned int x86; +unsigned int x86; - x86 = (eax >>8 ) &0xf ; + x86 = (eax >>8 ) &0xf ; -if (x86 ==0xf ) - x86 += (eax >>20 ) &0xff ; +if (x86 ==0xf ) + x86 += (eax >>20 ) &0xff ; -return x86; +return x86; }static inline unsigned int x86_model (unsigned int eax)
tools/testing/selftests/kvm/lib/kvm_util.c +5 -3
@@ -499,9 +499,11 @@ void kvm_vm_get_dirty_log(struct kvm_vm *vm, int slot, void *log)void kvm_vm_clear_dirty_log (struct kvm_vm *vm,int slot,void *log,uint64_t first_page,uint32_t num_pages) { -struct kvm_clear_dirty_log args = { .dirty_bitmap = log, .slot = slot, - .first_page = first_page, - .num_pages = num_pages }; +struct kvm_clear_dirty_log args = { + .dirty_bitmap = log, .slot = slot, + .first_page = first_page, + .num_pages = num_pages + };int ret; ret =ioctl (vm->fd,KVM_CLEAR_DIRTY_LOG , &args);
tools/testing/selftests/kvm/lib/x86_64/processor.c +30 -30
119 lines not on this page · raw message
tools/testing/selftests/kvm/x86_64/tsc_msrs_test.c +2 -2
@@ -77,8 +77,8 @@ static void run_vcpu(struct kvm_vm *vm, uint32_t vcpuid, int stage)switch (get_ucall (vm, vcpuid, &uc)) {case UCALL_SYNC :TEST_ASSERT (!strcmp ((const char *)uc.args[0 ],"hello" ) && - uc.args[1 ] == stage +1 ,"Stage %d: Unexpected register values vmexit, got %lx" , - stage +1 , (ulong )uc.args[1 ]); + uc.args[1 ] == stage +1 ,"Stage %d: Unexpected register values vmexit, got %lx" , + stage +1 , (ulong )uc.args[1 ]);return ;case UCALL_DONE :return ;
tools/testing/selftests/kvm/x86_64/vmx_close_while_nested_test.c +2 -2
@@ -30,8 +30,8 @@ static struct kvm_vm *vm;static void l2_guest_code (void ) {/* Exit to L0 */ - asmvolatile ("inb %%dx, %%al" - : : [port]"d" (PORT_L0_EXIT ) :"rax" ); + asmvolatile ("inb %%dx, %%al" + : : [port]"d" (PORT_L0_EXIT ) :"rax" ); }static void l1_guest_code (struct vmx_pages *vmx_pages)
tools/testing/selftests/kvm/x86_64/xen_shinfo_test.c +17 -17
@@ -46,20 +46,20 @@ static struct kvm_vm *vm;#define MIN_STEAL_TIME 50000struct pvclock_vcpu_time_info { -u32 version; -u32 pad0; -u64 tsc_timestamp; -u64 system_time; -u32 tsc_to_system_mul; -s8 tsc_shift; -u8 flags; -u8 pad[2 ]; +u32 version; +u32 pad0; +u64 tsc_timestamp; +u64 system_time; +u32 tsc_to_system_mul; +s8 tsc_shift; +u8 flags; +u8 pad[2 ]; } __attribute__((__packed__ ));/* 32 bytes */ struct pvclock_wall_clock { -u32 version; -u32 sec; -u32 nsec; +u32 version; +u32 sec; +u32 nsec; } __attribute__((__packed__ ));struct vcpu_runstate_info {
@@ -74,11 +74,11 @@ struct arch_vcpu_info { };struct vcpu_info { -uint8_t evtchn_upcall_pending; -uint8_t evtchn_upcall_mask; -unsigned long evtchn_pending_sel; -struct arch_vcpu_info arch; -struct pvclock_vcpu_time_info time; +uint8_t evtchn_upcall_pending; +uint8_t evtchn_upcall_mask; +unsigned long evtchn_pending_sel; +struct arch_vcpu_info arch; +struct pvclock_vcpu_time_info time; };/* 64 bytes (x86) */ struct shared_info {
@@ -493,7 +493,7 @@ int main(int argc, char *argv[]) vm_ts.tv_sec = wc->sec; vm_ts.tv_nsec = wc->nsec; -TEST_ASSERT (wc->version && !(wc->version &1 ), +TEST_ASSERT (wc->version && !(wc->version &1 ),"Bad wallclock version %x" , wc->version);TEST_ASSERT (cmp_timespec (&min_ts, &vm_ts) <=0 ,"VM time too old" );TEST_ASSERT (cmp_timespec (&max_ts, &vm_ts) >=0 ,"VM time too new" );
Signature · 1 line
2.31.1