← Back to team overview

touch-packages team mailing list archive

[Bug 1394080] Re: ScopesWatcher behavior doesn't agree with Registry test

 

Full console log attached.

** Attachment added: "Full console log"
   https://bugs.launchpad.net/ubuntu/+source/unity-scopes-api/+bug/1394080/+attachment/4263478/+files/failed-registry-test.html

** Description changed:

  Just had a failure on Arm on Jenkins. It looks like we are emitting two
  "uninstalled" events in some cases, even though only one scope is
  removed. This is reproducable locally.
  
  There is also an issue around install. Locally, we get one event for
  testscopeC being installed but, on Jenkins, the trace shows two events.
  In turn, the test doesn't expect that.
  
  Something is fishy here, and it looks like the ScopesWatcher could do
  with some refactoring.
  
- Failed test below. Line numbers are consistent with r531 of devel.
- 
- 63: Test command: /tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/Registry_test
- 63: Test timeout computed to be: 1500
- 63: load average: 0.69 1.80 1.91
- 63: [==========] Running 6 tests from 1 test case.
- 63: [----------] Global test environment set-up.
- 63: [----------] 6 tests from Registry
- 63: [ RUN      ] Registry.metadata
- 63: scoperegistry [Registry test]: unity::FileException: cannot open scope installation directory "/unused": No such file or directory (errno = 2)
- 63: scoperegistry [Registry test]: could not open OEM installation directory, ignoring OEM scopes
- 63: scoperegistry [Registry test]: unity::FileException: cannot open scope installation directory "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/click": No such file or directory (errno = 2)
- 63: scoperegistry [Registry test]: could not open Click installation directory, ignoring Click scopes
- 63: scoperegistry [Registry test]: no remote registry configured, only local scopes will be available
- 63: [       OK ] Registry.metadata (166 ms)
- 63: [ RUN      ] Registry.scope_state_notify
- 63: RegistryObject::ScopeProcess::exec(): Process for scope: "testscopeA" started
- 63: RegistryObject::ScopeProcess::exec(): Process for scope: "testscopeB" started
- 63: RegistryObject::ScopeProcess::on_process_death(): Process for scope: "testscopeB" exited
- 63: [       OK ] Registry.scope_state_notify (2235 ms)
- 63: [ RUN      ] Registry.no_idle_timeout_in_debug_mode
- 63: ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- 63: ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- 63: ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- 63: RegistryObject::ScopeProcess::exec(): Process for scope: "testscopeC" started
- 63: RegistryObject::ScopeProcess::on_process_death(): Process for scope: "testscopeC" exited
- 63: ScopesWatcher: scope: "testscopeC" uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- 63: ScopesWatcher: scope: "testscopeC" uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- 63: [       OK ] Registry.no_idle_timeout_in_debug_mode (5215 ms)
- 63: [ RUN      ] Registry.manually_started_scope
- 63: ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- 63: RegistryObject::ScopeProcess: Process for scope: "testscopeC" started manually
- 63: RegistryObject::ScopeProcess: Manually started process for scope: "testscopeC" exited
- 63: ScopesWatcher: scope: "testscopeC" uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- 63: ScopesWatcher: scope: "testscopeC" uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- 63: [       OK ] Registry.manually_started_scope (1145 ms)
- 63: [ RUN      ] Registry.list_update_notify_before_click_folder_exists
- 63: Create click folder: /tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/click
- 63: Make a symlink to testscopeC in the scopes folder
- 63: ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/click/testscopeC"
- 63: ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/click/testscopeC"
- 63: Remove click folder
- 63: ScopesWatcher: scope: "testscopeC" uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/click/testscopeC"
- 63: [       OK ] Registry.list_update_notify_before_click_folder_exists (11 ms)
- 63: [ RUN      ] Registry.list_update_notify
- 63: Move testscopeC into the scopes folder
- 63: ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- 63: Make a symlink to testscopeD in the scopes folder
- 63: ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- 63: ScopesWatcher: scope: "testscopeD" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeD"
- 63: /tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/test/gtest/scopes/Registry/Registry_test.cpp:535: Failure
- 63: Value of: list.size()
- 63:   Actual: 3
- 63: Expected: 4
- 63: /tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/test/gtest/scopes/Registry/Registry_test.cpp:539: Failure
- 63: Expected: (list.end()) != (list.find("testscopeD")), actual: 4-byte object <4C-67 EA-BE> vs 4-byte object <4C-67 EA-BE>
- 63: Move testscopeC back into the other_scopes folder
- 63: ScopesWatcher: scope: "testscopeC" uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- 63: Remove symlink to testscopeD from the scopes folder
- 63: ScopesWatcher: scope: "testscopeD" uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeD"
- 63: Make a folder in scopes named "testfolder"
- 63: Make a symlink to testscopeC.ini in testfolder
- 63: ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testfolder"
- 63: Remove testfolder
- 63: ScopesWatcher: scope: "testscopeC" uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testfolder"
- 63: Make a symlink to testscopeB-settings.ini in scopes/testscopeB
- 63: ScopesWatcher: scope: "testscopeB" settings definition installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeB"
- 63: Remove symlink to testscopeB-settings.ini in scopes/testscopeB
- 63: ScopesWatcher: scope: "testscopeB" settings definition uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeB"
- 63: [  FAILED  ] Registry.list_update_notify (31 ms)
- 63: [----------] 6 tests from Registry (8803 ms total)
- 63: 
- 63: [----------] Global test environment tear-down
- 63: [==========] 6 tests from 1 test case ran. (8804 ms total)
- 63: [  PASSED  ] 5 tests.
- 63: [  FAILED  ] 1 test, listed below:
- 63: [  FAILED  ] Registry.list_update_notify
- 63: 
- 63:  1 FAILED TEST
- 63: RegistryObject::ScopeProcess::on_process_death(): Process for scope: "testscopeA" exited
- 63/79 Test #63: Registry ....................................***Failed    8.92 sec
- load average: 0.69 1.80 1.91
- [==========] Running 6 tests from 1 test case.
- [----------] Global test environment set-up.
- [----------] 6 tests from Registry
- [ RUN      ] Registry.metadata
- scoperegistry [Registry test]: unity::FileException: cannot open scope installation directory "/unused": No such file or directory (errno = 2)
- scoperegistry [Registry test]: could not open OEM installation directory, ignoring OEM scopes
- scoperegistry [Registry test]: unity::FileException: cannot open scope installation directory "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/click": No such file or directory (errno = 2)
- scoperegistry [Registry test]: could not open Click installation directory, ignoring Click scopes
- scoperegistry [Registry test]: no remote registry configured, only local scopes will be available
- [       OK ] Registry.metadata (166 ms)
- [ RUN      ] Registry.scope_state_notify
- RegistryObject::ScopeProcess::exec(): Process for scope: "testscopeA" started
- RegistryObject::ScopeProcess::exec(): Process for scope: "testscopeB" started
- RegistryObject::ScopeProcess::on_process_death(): Process for scope: "testscopeB" exited
- [       OK ] Registry.scope_state_notify (2235 ms)
- [ RUN      ] Registry.no_idle_timeout_in_debug_mode
- ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- RegistryObject::ScopeProcess::exec(): Process for scope: "testscopeC" started
- RegistryObject::ScopeProcess::on_process_death(): Process for scope: "testscopeC" exited
- ScopesWatcher: scope: "testscopeC" uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- ScopesWatcher: scope: "testscopeC" uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- [       OK ] Registry.no_idle_timeout_in_debug_mode (5215 ms)
- [ RUN      ] Registry.manually_started_scope
- ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- RegistryObject::ScopeProcess: Process for scope: "testscopeC" started manually
- RegistryObject::ScopeProcess: Manually started process for scope: "testscopeC" exited
- ScopesWatcher: scope: "testscopeC" uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- ScopesWatcher: scope: "testscopeC" uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- [       OK ] Registry.manually_started_scope (1145 ms)
- [ RUN      ] Registry.list_update_notify_before_click_folder_exists
- Create click folder: /tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/click
- Make a symlink to testscopeC in the scopes folder
- ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/click/testscopeC"
- ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/click/testscopeC"
- Remove click folder
- ScopesWatcher: scope: "testscopeC" uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/click/testscopeC"
- [       OK ] Registry.list_update_notify_before_click_folder_exists (11 ms)
- [ RUN      ] Registry.list_update_notify
- Move testscopeC into the scopes folder
- ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- Make a symlink to testscopeD in the scopes folder
- ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- ScopesWatcher: scope: "testscopeD" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeD"
- /tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/test/gtest/scopes/Registry/Registry_test.cpp:535: Failure
- Value of: list.size()
-   Actual: 3
- Expected: 4
- /tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/test/gtest/scopes/Registry/Registry_test.cpp:539: Failure
- Expected: (list.end()) != (list.find("testscopeD")), actual: 4-byte object <4C-67 EA-BE> vs 4-byte object <4C-67 EA-BE>
- Move testscopeC back into the other_scopes folder
- ScopesWatcher: scope: "testscopeC" uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeC"
- Remove symlink to testscopeD from the scopes folder
- ScopesWatcher: scope: "testscopeD" uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeD"
- Make a folder in scopes named "testfolder"
- Make a symlink to testscopeC.ini in testfolder
- ScopesWatcher: scope: "testscopeC" installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testfolder"
- Remove testfolder
- ScopesWatcher: scope: "testscopeC" uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testfolder"
- Make a symlink to testscopeB-settings.ini in scopes/testscopeB
- ScopesWatcher: scope: "testscopeB" settings definition installed to: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeB"
- Remove symlink to testscopeB-settings.ini in scopes/testscopeB
- ScopesWatcher: scope: "testscopeB" settings definition uninstalled from: "/tmp/buildd/unity-scopes-api-0.6.8bzr531pkg0vivid27/obj-arm-linux-gnueabihf/test/gtest/scopes/Registry/scopes/testscopeB"
- [  FAILED  ] Registry.list_update_notify (31 ms)
- [----------] 6 tests from Registry (8803 ms total)
- 
- [----------] Global test environment tear-down
- [==========] 6 tests from 1 test case ran. (8804 ms total)
- [  PASSED  ] 5 tests.
- [  FAILED  ] 1 test, listed below:
- [  FAILED  ] Registry.list_update_notify
- 
-  1 FAILED TEST
- RegistryObject::ScopeProcess::on_process_death(): Process for scope: "testscopeA" exited
+ Console log attached. Line numbers are consistent with r531 of devel.

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity-scopes-api in
Ubuntu.
https://bugs.launchpad.net/bugs/1394080

Title:
  ScopesWatcher behavior doesn't agree with Registry test

Status in “unity-scopes-api” package in Ubuntu:
  Confirmed

Bug description:
  Just had a failure on Arm on Jenkins. It looks like we are emitting
  two "uninstalled" events in some cases, even though only one scope is
  removed. This is reproducable locally.

  There is also an issue around install. Locally, we get one event for
  testscopeC being installed but, on Jenkins, the trace shows two
  events. In turn, the test doesn't expect that.

  Something is fishy here, and it looks like the ScopesWatcher could do
  with some refactoring.

  Console log attached. Line numbers are consistent with r531 of devel.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unity-scopes-api/+bug/1394080/+subscriptions


References