[network_info_wlan0] test run against wi-fi device that's not associated with an AP causes a traceback

Bug #823606 reported by Jeff Lane 
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Checkbox
Fix Released
Medium
Unassigned

Bug Description

On the inspiron 1122, wireless is being a bit weird... (it's enabled, but no APs are showing in the networking indicator menu).

And when checkbox tries running network_info_wlan0, instead of failing or exiting gracefully, it's leaving a traceback and the network_info script is crashing:

Please verify the following information for NIC wlan0?

Traceback (most recent call last):
  File "/usr/share/checkbox/scripts/network_info", line 49, in <module>
    sys.exit(main(sys.argv[1:]))
  File "/usr/share/checkbox/scripts/network_info", line 37, in main
    connected = get_connected(interface)
  File "/usr/share/checkbox/scripts/network_info", line 20, in get_connected
    carrier = int(_read_file(carrier_file))
  File "/usr/share/checkbox/scripts/network_info", line 13, in _read_file
    content = source.read()
IOError: [Errno 22] Invalid argument

Tags: oneiric

Related branches

Jeff Lane  (bladernr)
tags: added: oneiric
Revision history for this message
Daniel Manrique (roadmr) wrote :

This is failing trying to read the file /sys/class/net/wlan0/carrier, as per the given trace.

Would it be possible to see what sort of output this produces, run as a normal user (not root)?

cat /sys/class/net/wlan0/carrier

Also, to keep this from happening again, either the _read_file method or those calling it (there are 3 other methods doing so) should gracefully handle exceptions.

Setting as triaged as we know the kind of work that needs to be done to at least handling troublesome files gracefully, still it'll be interesting to see what the cat command actually yields.

Changed in checkbox:
status: New → Triaged
importance: Undecided → Medium
Zygmunt Krynicki (zyga)
Changed in checkbox:
status: Triaged → Fix Committed
Changed in checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.