blob: 90a94e86308ed1e72ca70319e64591464a06baee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
"http://www.oasis-open.org/docbook/xml/4.1.2/docbookx.dtd" [
]>
<refentry id="test-nsm-dummy">
<refmeta>
<refentrytitle>Testing against the Node State Manager dummy</refentrytitle>
</refmeta>
<refnamediv>
<refname>Testing against the Node State Manager dummy</refname>
<refpurpose>Important things to know when testing against the NSM dummy implementation</refpurpose>
</refnamediv>
<para>
Along with our implementation of the Node Startup Controller, this software package
also ships a dummy implementation of the Node State Manager (NSM). This is done in
order to make testing possible even though the actual NSM implementation has not
landed in GENIVI yet.
</para>
<refsect1>
<title>Notes about the NSM dummy behaviour</title>
<para>
The NSM dummy is not guaranteed to be functionally equivalent to the real NSM. The
dummy does however, provide the same interfaces and the behaviour of all public
methods used by the Node Startup Controller should be very similar to that of the
real NSM.
</para>
<para>
The following special features are implemented in the NSM dummy that make testing
the Node Startup Controller easier:
</para>
<itemizedlist>
<listitem>
<literal>org.genivi.NodeStateManager.LifecycleControl.CheckLucRequired</literal>
will alternate between returning <literal>TRUE</literal> and
<literal>FALSE</literal> with every call. This way it is possible to test how the
Node Startup Controller behaves with and without starting the LUC simply by
starting it twice.
</listitem>
<listitem>
<literal>org.genivi.NodeStateManager.LifecycleControl.SetNodeState</literal>
will alternate between accepting the state and not accepting the state with
every call. This way it is possible to test how the Node Startup Controller
handles both scenarios.
</listitem>
<listitem>
The NSM dummy will shut down all registered shutdown consumers upon receiving
<literal>SIGHUP</literal>. It is possible to test the shutdown sequence by running
the following command:
<programlisting>kill -s HUP $(pidof nsm-dummy)</programlisting>
</listitem>
<listitem>
Unlike the real NSM, which only ever shuts down using one shutdown
mode, the NSM dummy will shut down the consumers for all modes.
The modes are isolated from each other to avoid undesired
side-effects of this difference in implementation.
</listitem>
</itemizedlist>
</refsect1>
</refentry>
|