Comment 6 for bug 1065983

Revision history for this message
Jeff Lane  (bladernr) wrote :

So it appears the underlying problem is due to networking/info_ethX being created during the local run... take this example:

plugin: manual
name: usb/disk_detect
depends: usb/detect
command: removable_storage_test -l usb
_description:
 PURPOSE:
     This test will check that your system detects USB storage devices.
 STEPS:
     1. Plug in one or more USB keys or hard drives.
     2. Click on "Test".
 INFO:
     $output
 VERIFICATION:
     Were the drives detected?

Which results in this:
2013-04-25 15:43:36,032 DEBUG {'info': '$output\n', 'status': 'uninitiated', 'description': 'PURPOSE:\n This test will check that your system detects USB storage devices.\nSTEPS:\n 1. Plug in one or more USB keys or hard drives.\n 2. Click on "Test".\nINFO:\n $output\nVERIFICATION:\n Were the drives detected?', 'plugin': 'manual', 'name': 'usb/disk_detect', 'steps': '1. Plug in one or more USB keys or hard drives.\n2. Click on "Test".\n', 'depends': ['usb/detect'], 'command': 'removable_storage_test -l usb', 'verification': 'Were the drives detected?', 'suite': '__usb__', 'type': 'test', 'resources': [], 'purpose': 'This test will check that your system detects USB storage devices.\n'}

vs this job description:
plugin: local
name: networking/info
requires: device.category == 'NETWORK' or device.category == 'WIRELESS'
_description: Network Information
command:
 cat <<'EOF' | run_templates -s 'udev_resource | filter_templates -w "category=WIRELESS" -w "category=NETWORK" | awk "/path: / { print \$2 }" | xargs -n 1 sh -c "for i in \`ls /sys\$0/net 2>/dev/null\`; do echo \$0 \$i; done"'
 plugin: manual
 name: networking/info_$2
 requires: device.path == "$1"
 command: network_info $2
 _description:
  PURPOSE:
      This test will check the different NIC
  STEPS:
      1. Please verify the following information for NIC $2
  INFO:
      $output
  VERIFICATION:
      Is this correct?
 EOF

Which produces this for networking/info_eth0:

2013-04-25 15:43:35,053 DEBUG {'status': 'uninitiated', 'description': 'PURP
OSE:\n This test will check the different NIC\nSTEPS:\n 1. Please verify
the following information for NIC eth0\nINFO:\n\nVERIFICATION:\n Is this cor
rect?', 'plugin': 'manual', 'requires': ['device.path == "/devices/pci0000:00/0
000:00:19.0"'], 'command': 'network_info eth0', 'suite': 'networking/info', 'ty
pe': 'test', 'resources': [{'category': 'NETWORK', 'subproduct_id': '674', 'pro
duct_id': '4331', 'bus': 'pci', 'vendor_id': '32902', 'driver': 'e1000e', 'path
': '/devices/pci0000:00/0000:00:19.0', 'subvendor_id': '4136'}], 'name': 'netwo
rking/info_eth0'}

The INFO bit of the job template is ignored, which is causing the problem here.

Attached is a checkbox log showing this (look for the phrase: "JEFF: TEST HAS:" in the log to see the dicts).