obex_send and bluetooth_test duplicate functionality?

Bug #1274657 reported by Daniel Manrique
18
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Checkbox Provider - Base
Fix Released
Low
Po-Hsu Lin

Bug Description

An older obex_send script is used in a few (3 by my count) jobs. Meanwhile, a newer bluetooth_test script that can also get and browse files is used by 9 jobs.

Some of the job definitions are nearly identical, so I think we may be duplicating tests here, just with a different tool.

Part of the difference is that obex_send uses dbus to communicate with the system's bluetooth layer, so should work on a stock Ubuntu installation, while bluetooth_test requires obexftp and uses the commands provided by that package.

Still I wonder if, since fully using the obex_send tests still requires configuring a target bluetooth device (which is no work for a novice or casual user), we couldn't just get rid of those tests, and keep the ones that, while requiring an extra package, provide better functionality. We'd also be removing the obex_test script.

Tests using obex_send are:
name: suspend/bluetooth_obex_before_suspend
name: suspend/bluetooth_obex_after_suspend
name: suspend/bluetooth_obex_after_suspend_auto

They have:
requires:
 package.name == 'bluez'
 package.name == 'obexd-client'
 device.category == 'BLUETOOTH'

Tests using bluetooth_test are:
name: suspend/bluetooth_obex_send_before_suspend
name: suspend/bluetooth_obex_browse_before_suspend
name: suspend/bluetooth_obex_get_before_suspend
name: suspend/bluetooth_obex_send_after_suspend_auto
name: suspend/bluetooth_obex_send_after_suspend
name: suspend/bluetooth_obex_browse_after_suspend
name: suspend/bluetooth_obex_browse_after_suspend_auto
name: suspend/bluetooth_obex_get_after_suspend
name: suspend/bluetooth_obex_get_after_suspend_auto

They require:
requires:
 package.name == 'bluez'
 package.name == 'obexftp'
 device.category == 'BLUETOOTH'

Tags: scripts job

Related branches

Zygmunt Krynicki (zyga)
affects: checkbox → plainbox-provider-checkbox
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

Found this issue today, and the old bluetooth_obex_before_suspend job (obex_send script) is not working at all.

If you try to run it with plainbox, it will fail with:
-------------------[ suspend/bluetooth_obex_before_suspend ]--------------------
ID: 2013.com.canonical.certification::suspend/bluetooth_obex_before_suspend
Category: 2013.com.canonical.plainbox::uncategorised
... 8< -------------------------------------------------------------------------
Traceback (most recent call last):
  File "/tmp/nest-ws1nlq.3c34264a0823c4d9d6da8bc074ea373792f9042ccb3bb3e0a087d12f2af86839/obex_send", line 82, in <module>
    client.SendFiles({"Destination": sys.argv[1]}, files, path)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.openobex.Error.Failed: Unable to find service record
------------------------------------------------------------------------- >8 ---
Outcome: job failed

If you try to run it manually on 12.04, with all related parameters specified, it will fail with:
data/images/JPEG_Color_Image_Ubuntu.jpg13.com.canonical.certification\:checkbox/
Traceback (most recent call last):
  File "./obex_send", line 82, in <module>
    client.SendFiles({"Destination": sys.argv[1]}, files, path)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 70, in __call__
    return self._proxy_method(*args, **keywords)
  File "/usr/lib/python3/dist-packages/dbus/proxies.py", line 145, in __call__
    **keywords)
  File "/usr/lib/python3/dist-packages/dbus/connection.py", line 651, in call_blocking
    message, timeout)
dbus.exceptions.DBusException: org.openobex.Error.Failed: Unable to find service record
ubuntu@201105-8048:/usr/lib/2013.com.canonical.certification:checkbox/bin$ exit

Revision history for this message
Daniel Manrique (roadmr) wrote :

Ohh, this is similar to a Debian bug:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=771327

Apparently the obex_send script uses an old API that doesn't exist anymore; I suppose this stopped working when Vivid synced with Debian.

So at this point, we either update obex_send or get rid of it completely.

Ara Pulido (ara)
Changed in plainbox-provider-checkbox:
milestone: none → 0.22
Revision history for this message
Po-Hsu Lin (cypressyew) wrote :

I noticed that these three old jobs that related to obex_send script:
suspend/bluetooth_obex_before_suspend
suspend/bluetooth_obex_after_suspend
suspend/bluetooth_obex_after_suspend_auto

And the manual jobs:
bluetooth_obex_before_suspend_manual
bluetooth_obex_after_suspend_manual

Are not being used anywhere in the certification provider, therefore I think it's safe to get rid of these redundant jobs and the obex_send script.

Changed in plainbox-provider-checkbox:
assignee: nobody → Po-Hsu Lin (cypressyew)
status: New → In Progress
Po-Hsu Lin (cypressyew)
Changed in plainbox-provider-checkbox:
importance: Undecided → Low
Changed in plainbox-provider-checkbox:
milestone: 0.22 → 0.23
status: In Progress → Fix Committed
Pierre Equoy (pieq)
Changed in plainbox-provider-checkbox:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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