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

Changes from v3:
 - Fix typo.
 - Convert 'chk_timeout' to integer type.

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 v4:
 - Update the code for getting chk_cmd parameter in
   check_cpu_number() function
 - Give default value to chk_timeout.

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 v3:
 - Update cores/threads checking cmd for windows guest.

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
changes from v3:
  - Check ignore_str and convert_str before using them.

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Acked-by: Qingtang Zhou <qzhou@redhat.com>
Acked-by: Feng Yang <fyang@redhat.com>
virt.unattended: Add hdparm package for Fedora 16/17 install file

The hdparm program can check disk info easily, and it's used by
hdparm test case, so install it by default.

Signed-off-by: Qingtang Zhou <qzhou@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
changes from v7:
  - Rename "catch_serial_cmd" to "disk_serial_num_chk_cmd"
  - Update the cmd of getting serial number for linux and win guest

Signed-off-by: Yiqiao Pu <ypu@redhat.com>
Signed-off-by: Qingtang Zhou <qzhou@redhat.com>