Skip to end of metadata
Go to start of metadata
  1. install *-nsm-dummy at build/conf/local.conf

    IMAGE_INSTALL_append += " \
        node-startup-controller-nsm-dummy glib-2.0-utils \
        "
  2. create an own dbus instance:

    root@qemux86:~# dbus-launch 
    DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-ELaodyB01D,guid=66fd87514356c51bb6fbcd0b56d97edb
    DBUS_SESSION_BUS_PID=638
    1. the command will print a DBUS_SESSION_BUS_ADDRESS. Copy/paste and export it as system bus:

      root@qemux86:~# export DBUS_SESSION_BUS_ADDRESS=unix:abstract=/tmp/dbus-ELaodyB01D,guid=66fd87514356c51bb6fbcd0b56d97edb
  3. run dlt-receiver

    root@qemux86:/lib/systemd/system# systemctl start dlt-receive.service 
  4. Tests for LUC management
    1. run services

      root@qemux86:/lib/systemd/system# systemctl start nsm-dummy.service 
      root@qemux86:/lib/systemd/system# systemctl start node-startup-controller.service 
    2. check "LUC is not required".

      root@qemux86:/opt/tests/node-startup-controller# ./luc_check.sh 
      2016/03/29 10:46
      9 2016/03/29 10:43:21.927387    2256573 002 ECU1 NSC- CTRL log info V 1 [LUC is not required]
    3. if so, restart node-startup-controller

      root@qemux86:/lib/systemd/system# systemctl restart node-startup-controller.service
    4. run test and compare the result with luc-management.html

      root@qemux86:/opt/tests/node-startup-controller# ./luc_test_01.sh 
      ...
      root@qemux86:/opt/tests/node-startup-controller# ./luc_test_02.sh 
      ...
      root@qemux86:/opt/tests/node-startup-controller# ./luc_test_03.sh 
      ...
      root@qemux86:/opt/tests/node-startup-controller# ./luc_test_04.sh 
      ...
      root@qemux86:/opt/tests/node-startup-controller# ./luc_test_05.sh 
      ()
      ()
      ()
      ()
      213 2016/03/29 11:02:28.300035   13720299 004 ECU1 NSC- CTRL log info V 2 [Updated LUC to: {0: ['app1.unit']}]
      214 2016/03/29 11:02:28.370265   13721002 005 ECU1 NSC- CTRL log info V 2 [Updated LUC to: {0: ['app1.unit'], 1: ['app3.unit']}]
      230 2016/03/29 11:02:30.262202   13739923 008 ECU1 NSC- CTRL log info V 2 [Starting LUC group: 1]
      231 2016/03/29 11:02:30.262756   13739928 009 ECU1 NSC- CTRL log info V 2 [Starting LUC app: app3.unit]
      233 2016/03/29 11:02:30.279026   13740091 010 ECU1 NSC- CTRL log info V 2 [Finished starting LUC app: app3.unit]
      235 2016/03/29 11:02:30.284492   13740103 012 ECU1 NSC- CTRL log info V 2 [Finished starting LUC group: 1]
      236 2016/03/29 11:02:30.285242   13740152 013 ECU1 NSC- CTRL log info V 2 [Starting LUC group: 0]
      237 2016/03/29 11:02:30.286018   13740158 014 ECU1 NSC- CTRL log info V 2 [Starting LUC app: app1.unit]
      239 2016/03/29 11:02:30.296868   13740268 016 ECU1 NSC- CTRL log info V 2 [Finished starting LUC app: app1.unit]
      241 2016/03/29 11:02:30.297771   13740278 018 ECU1 NSC- CTRL log info V 2 [Finished starting LUC group: 0]
      root@qemux86:/opt/tests/node-startup-controller# ./luc_test_06.sh 
      ()
      ()
      ()
      ()
      254 2016/03/29 11:04:12.084326   14758103 004 ECU1 NSC- CTRL log info V 2 [Updated LUC to: {1: ['app1.unit', 'app2.unit']}]
      255 2016/03/29 11:04:12.155179   14758851 005 ECU1 NSC- CTRL log info V 2 [Updated LUC to: {1: ['app2.unit', 'app1.unit']}]
      270 2016/03/29 11:04:13.993849   14777238 007 ECU1 NSC- CTRL log info V 2 [Starting LUC group: 1]
      271 2016/03/29 11:04:13.994337   14777244 008 ECU1 NSC- CTRL log info V 2 [Starting LUC app: app2.unit]
      272 2016/03/29 11:04:14.000247   14777302 009 ECU1 NSC- CTRL log info V 2 [Starting LUC app: app1.unit]
      273 2016/03/29 11:04:14.014095   14777439 010 ECU1 NSC- CTRL log info V 2 [Finished starting LUC app: app2.unit]
      276 2016/03/29 11:04:14.025170   14777552 012 ECU1 NSC- CTRL log info V 2 [Finished starting LUC app: app1.unit]
      278 2016/03/29 11:04:14.026128   14777562 014 ECU1 NSC- CTRL log info V 2 [Finished starting LUC group: 1]
  5. Tests for target startup monitoring
    1. prepare service, if there is no following targets:

      root@qemux86:/opt/tests/node-startup-controller# cp -vf /lib/systemd/system/graphical.target /lib/systemd/system/focussed.target 
      '/lib/systemd/system/graphical.target' -> '/lib/systemd/system/focussed.target'
      root@qemux86:/opt/tests/node-startup-controller# cp -vf /lib/systemd/system/graphical.target /lib/systemd/system/unfocussed.target 
      '/lib/systemd/system/graphical.target' -> '/lib/systemd/system/unfocussed.target'
      root@qemux86:/opt/tests/node-startup-controller# cp -vf /lib/systemd/system/graphical.target /lib/systemd/system/lazy.target 
      '/lib/systemd/system/graphical.target' -> '/lib/systemd/system/lazy.target'
    2. run test and compare the result with target-startup-monitoring.html

      root@qemux86:/opt/tests/node-startup-controller# ./tsm_test_01.sh 
      536 2016/03/29 11:22:54.061660   25977916 002 ECU1 NSMD NSMC log info V 4 [Node state 2 applied: yes]
      root@qemux86:/opt/tests/node-startup-controller# ./tsm_test_02.sh 
      544 2016/03/29 11:23:45.591859   26493219 004 ECU1 NSMD NSMC log info V 4 [Node state 3 applied: no]
      547 2016/03/29 11:23:45.611352   26493413 005 ECU1 NSMD NSMC log info V 4 [Node state 3 applied: yes]
      root@qemux86:/opt/tests/node-startup-controller# ./tsm_test_03.sh 
      550 2016/03/29 11:24:39.089924   27028190 006 ECU1 NSMD NSMC log info V 4 [Node state 4 applied: no]
      554 2016/03/29 11:24:39.222069   27029520 007 ECU1 NSMD NSMC log info V 4 [Node state 4 applied: yes]
      root@qemux86:/opt/tests/node-startup-controller# ./tsm_test_04.sh 
      557 2016/03/29 11:25:17.873422   27416032 008 ECU1 NSMD NSMC log info V 4 [Node state 5 applied: no]
      561 2016/03/29 11:25:17.993223   27417232 009 ECU1 NSMD NSMC log info V 4 [Node state 5 applied: yes]
      root@qemux86:/opt/tests/node-startup-controller# ./tsm_test_05.sh 
      ...
  6. Tests for legacy application handling
    1. run services

      root@qemux86:/lib/systemd/system# systemctl start nsm-dummy.service 
      root@qemux86:/lib/systemd/system# systemctl start node-startup-controller.service 
    2. if needed, restart node-startup-controller

      root@qemux86:/lib/systemd/system# systemctl restart node-startup-controller.service 
    3. run test and compare the result with legacy-app-handling.html

      root@qemux86:/opt/tests/node-startup-controller# ./legacy_test_01.sh 
      311 2016/03/29 11:11:26.847187   19105772 002 ECU1 NSC- CTRL log info V 2 [Successfully acquired bus name: org.genivi.NodeStartupController1]
      321 2016/03/29 11:11:26.958405   19106884 068 ECU1 NSMD NSMC log info V 9 [Shutdown client registered: bus name org.genivi.NodeStartupController1 object path /org/genivi/NodeStartupController1/ShutdownConsumer/0 shutdown mode 1 timeout 1000]
      325 2016/03/29 11:11:27.002799   19107326 015 ECU1 NSC- CTRL log info V 1 [Successfully registered the node startup controller as a shutdown consumer]
      332 2016/03/29 11:11:30.575207   19143049 075 ECU1 NSMD NSMC log info V 5 [Shutdown client unregistered: bus name org.genivi.NodeStartupController1 object path /org/genivi/NodeStartupController1/ShutdownConsumer/0]
      333 2016/03/29 11:11:30.591220   19143208 016 ECU1 NSC- CTRL log info V 1 [Successfully unregistered the node startup controller as a shutdown consumer]
      334 2016/03/29 11:11:30.600529   19143303 076 ECU1 NSMD NSMC log info V 5 [Successfully shut down a client: bus name object path shutdown mode 1]
      root@qemux86:/opt/tests/node-startup-controller# ./legacy_test_02.sh 
      ...
      root@qemux86:/opt/tests/node-startup-controller# ./legacy_test_03.sh 
      ...
      root@qemux86:/opt/tests/node-startup-controller# ./legacy_test_04.sh 
      ...
      root@qemux86:/opt/tests/node-startup-controller# ./legacy_test_05.sh 
      485 2016/03/29 11:14:17.567796   20812978 000 ECU1 NSC- LAH- log error V 2 [Failed to parse command line options: Missing argument for --unit]
      488 2016/03/29 11:14:17.582362   20813124 000 ECU1 NSC- LAH- log error V 2 [Failed to register legacy application: invalid shutdown mode 0]
      491 2016/03/29 11:14:17.595483   20813256 000 ECU1 NSC- LAH- log error V 2 [Failed to register legacy application: shutdown timeout must be non-negative]

 

  • No labels