KVM-test: check if the MS Windows VirtIO driver is digital signed

Changes from v2:
 - Update error log message, using a list to store error message.

Changes from v1:
 - The default 30s timeout sometimes is too short to get the result,
   change the timeout to 240

Signed-off-by: Chen Cao <kcao@redhat.com>
Signed-off-by: Suqin Huang <shuang@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
KVM-Test: physical_resouces_check: Add sockets/cores/threads check

Add sockets, cores, threads number checking test

Changes from v3:
 - Verify regex search result for cpu check, avoid list out of
   index error.

Changes from v2:
 - Putting actul checking steps into a sub-function called
   check_cpu_number
 - Update default values for sockets/cores/threads configuration,
   make them same as configs in kvm_vm file.

Changes from v1:
 - Change timeout to int(timeout)
 - Add timeout while checking cores, threads, sockets

Signed-off-by: Suqin Huang <shuang@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
KVM-Test: Add cores/threads/sockets checking cmd in cfg file

Add cores/threads/sockets check cmd in cfg file

Changes from v2:
 - Move configs for linux guest into subtests.cfg file.
 - Use 'lscpu' cmd to check cpu info instead of /proc/cpuinfo

Changes from v1:
 - Update "check cpu cmds" for windows guest

Signed-off-by: Suqin Huang <shuang@redhat.com>
Signed-off-by: Golita Yue <gyue@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
KVM-test: Add punctuation to random string generate chars

Add punctuation to generate_random_string. Also add two parameters
to this function:
    - ignore_str: string that will not include in string that generated
    - convert_str: stirng that need to be covered with /
Make this function can cover more conditions.

changes from v1:
  - wrong docstring fix
  - use string.replace() to delete or substitute ignore_str and
    convert_str
changes from v2:
  - clean up code and make it simpler

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Acked-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
KVM-test: Add serial name check in physical_resources_check

Improve physical_resources_check in serial name part.
  - Add a random serial name to guest less than 20 characters
  - Add strict check for serial name

changes from v1:
  - format modify
changes from v2:
  - move randome generate string to virt_utils
changes from v3:
  - move this test only for virtio_blk and only for RHEL 6 guest
    as test plan
changes from v4:
  - clean up and make this test will not run in Windows guests
changes from v5:
  - Fix hard disk serial number check string problem.
changes from v6:
  - Update test config for fedora and new rhel guest

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
KVM-Test: Add machine_type check in physical_resource_check

Add machine_type check function to check the guest's machine type

change from v2:
 - Update verify_machineType function, avoid returning a NoneType
   value.

change from v1:
1. change 'extra_params' to 'machine type'
2. add try except block when compare the result

Signed-off-by: Golita Yue <gyue@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>