1 /**********************************************************************
2 * Copyright (c) 2012 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Bernd Hufmann - Initial API and implementation
11 **********************************************************************/
12 package org
.eclipse
.linuxtools
.lttng
.ui
.tests
.control
.service
;
16 import java
.util
.ArrayList
;
17 import java
.util
.List
;
19 import junit
.framework
.TestCase
;
21 import org
.eclipse
.core
.commands
.ExecutionException
;
22 import org
.eclipse
.core
.runtime
.FileLocator
;
23 import org
.eclipse
.core
.runtime
.NullProgressMonitor
;
24 import org
.eclipse
.core
.runtime
.Path
;
25 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.model
.IBaseEventInfo
;
26 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.model
.IChannelInfo
;
27 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.model
.IDomainInfo
;
28 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.model
.IEventInfo
;
29 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.model
.ISessionInfo
;
30 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.model
.IUstProviderInfo
;
31 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.model
.LogLevelType
;
32 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.model
.TraceEnablement
;
33 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.model
.TraceEventType
;
34 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.model
.TraceLogLevel
;
35 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.model
.TraceSessionState
;
36 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.model
.impl
.ChannelInfo
;
37 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.service
.ILttngControlService
;
38 import org
.eclipse
.linuxtools
.internal
.lttng
.ui
.views
.control
.service
.LTTngControlService
;
39 import org
.eclipse
.linuxtools
.lttng
.stubs
.service
.CommandShellFactory
;
40 import org
.eclipse
.linuxtools
.lttng
.stubs
.service
.shells
.LTTngToolsFileShell
;
41 import org
.eclipse
.linuxtools
.lttng
.ui
.tests
.LTTngUITestPlugin
;
43 * The class <code>LTTngControlServiceTest</code> contains test for the class <code>{@link LTTngControlService}</code>.
45 @SuppressWarnings("nls")
46 public class LTTngControlServiceTest
extends TestCase
{
48 private static final String DIRECTORY
= "testfiles";
49 private static final String TEST_STREAM
= "LTTngServiceTest.cfg";
51 private static final String SCEN_LTTNG_NOT_INSTALLED
= "LttngNotInstalled";
52 private static final String SCEN_NO_SESSION_AVAILABLE
= "NoSessionAvailable";
53 private static final String SCEN_GET_SESSION_NAMES1
= "GetSessionNames1";
54 private static final String SCEN_GET_SESSION_NAME_NOT_EXIST
= "GetSessionNameNotExist";
55 private static final String SCEN_GET_SESSION_GARBAGE_OUT
= "GetSessionGarbageOut";
56 private static final String SCEN_GET_SESSION1
= "GetSession1";
57 private static final String SCEN_GET_KERNEL_PROVIDER1
= "GetKernelProvider1";
58 private static final String SCEN_GET_UST_PROVIDER1
= "GetUstProvider1";
59 private static final String SCEN_GET_UST_PROVIDER2
= "GetUstProvider2";
60 private static final String SCEN_CREATE_SESSION1
= "CreateSession1";
61 private static final String SCEN_CREATE_SESSION_VARIANTS
= "CreateSessionVariants";
62 private static final String SCEN_DESTROY_SESSION1
= "DestroySession1";
63 private static final String SCEN_CHANNEL_HANDLING
= "ChannelHandling";
64 private static final String SCEN_EVENT_HANDLING
= "EventHandling";
66 // ------------------------------------------------------------------------
68 // ------------------------------------------------------------------------
69 private CommandShellFactory fShellFactory
;
70 private String fTestfile
;
71 private LTTngToolsFileShell fShell
;
72 private ILttngControlService fService
;
75 // ------------------------------------------------------------------------
77 // ------------------------------------------------------------------------
79 // ------------------------------------------------------------------------
81 // ------------------------------------------------------------------------
83 * Perform pre-test initialization.
85 * @throws Exception if the initialization fails for some reason
89 public void setUp() throws Exception
{
91 fShellFactory
= CommandShellFactory
.getInstance();
93 URL location
= FileLocator
.find(LTTngUITestPlugin
.getDefault().getBundle(), new Path(DIRECTORY
+ File
.separator
+ TEST_STREAM
), null);
94 File testfile
= new File(FileLocator
.toFileURL(location
).toURI());
95 fTestfile
= testfile
.getAbsolutePath();
97 fShell
= fShellFactory
.getFileShell();
98 fShell
.loadScenarioFile(fTestfile
);
99 fService
= new LTTngControlService(fShell
);
103 * Perform post-test clean-up.
105 * @throws Exception if the clean-up fails for some reason
109 public void tearDown() throws Exception
{
112 // ------------------------------------------------------------------------
114 // ------------------------------------------------------------------------
116 public void testGetSessionNames() {
118 fShell
.setScenario(SCEN_LTTNG_NOT_INSTALLED
);
119 fService
.getSessionNames(new NullProgressMonitor());
120 fail("No exeption thrown");
121 } catch (ExecutionException e
) {
126 public void testGetSessionNames1() {
128 fShell
.setScenario(SCEN_NO_SESSION_AVAILABLE
);
129 String
[] result
= fService
.getSessionNames(new NullProgressMonitor());
131 assertNotNull(result
);
132 assertEquals(0, result
.length
);
134 } catch (ExecutionException e
) {
139 public void testGetSessionNames2() {
141 fShell
.setScenario(SCEN_GET_SESSION_NAMES1
);
142 String
[] result
= fService
.getSessionNames(new NullProgressMonitor());
144 assertNotNull(result
);
145 assertEquals(2, result
.length
);
146 assertEquals("mysession1", result
[0]);
147 assertEquals("mysession", result
[1]);
149 } catch (ExecutionException e
) {
154 public void testGetSessionNotExist() {
156 fShell
.setScenario(SCEN_GET_SESSION_NAME_NOT_EXIST
);
157 fService
.getSessionNames(new NullProgressMonitor());
158 fail("No exeption thrown");
160 } catch (ExecutionException e
) {
165 public void testGetSessionNameGarbage() {
167 fShell
.setScenario(SCEN_GET_SESSION_GARBAGE_OUT
);
168 String
[] result
= fService
.getSessionNames(new NullProgressMonitor());
170 assertNotNull(result
);
171 assertEquals(0, result
.length
);
173 } catch (ExecutionException e
) {
178 public void testGetSession1() {
180 fShell
.setScenario(SCEN_GET_SESSION1
);
181 ISessionInfo session
= fService
.getSession("mysession", new NullProgressMonitor());
184 assertNotNull(session
);
185 assertEquals("mysession", session
.getName());
186 assertEquals("/home/user/lttng-traces/mysession-20120129-084256", session
.getSessionPath());
187 assertEquals(TraceSessionState
.ACTIVE
, session
.getSessionState());
189 IDomainInfo
[] domains
= session
.getDomains();
190 assertNotNull(domains
);
191 assertEquals(2, domains
.length
);
193 // Verify Kernel domain
194 assertEquals("Kernel", domains
[0].getName());
195 IChannelInfo
[] channels
= domains
[0].getChannels();
196 assertNotNull(channels
);
197 assertEquals(2, channels
.length
);
199 // Verify Kernel's channel0
200 assertEquals("channel0", channels
[0].getName());
201 assertEquals(4, channels
[0].getNumberOfSubBuffers());
202 assertEquals("splice()", channels
[0].getOutputType());
203 assertEquals(false, channels
[0].isOverwriteMode());
204 assertEquals(200, channels
[0].getReadTimer());
205 assertEquals(TraceEnablement
.ENABLED
, channels
[0].getState());
206 assertEquals(262144, channels
[0].getSubBufferSize());
207 assertEquals(0, channels
[0].getSwitchTimer());
210 IEventInfo
[] channel0Events
= channels
[0].getEvents();
211 assertNotNull(channel0Events
);
212 assertEquals(2, channel0Events
.length
);
213 assertEquals("block_rq_remap", channel0Events
[0].getName());
214 assertEquals(TraceLogLevel
.TRACE_EMERG
, channel0Events
[0].getLogLevel());
215 assertEquals(TraceEventType
.TRACEPOINT
, channel0Events
[0].getEventType());
216 assertEquals(TraceEnablement
.ENABLED
, channel0Events
[0].getState());
218 assertEquals("block_bio_remap", channel0Events
[1].getName());
219 assertEquals(TraceLogLevel
.TRACE_EMERG
, channel0Events
[1].getLogLevel());
220 assertEquals(TraceEventType
.TRACEPOINT
, channel0Events
[1].getEventType());
221 assertEquals(TraceEnablement
.DISABLED
, channel0Events
[1].getState());
223 // Verify Kernel's channel1
224 assertEquals("channel1", channels
[1].getName());
225 assertEquals(4, channels
[1].getNumberOfSubBuffers());
226 assertEquals("splice()", channels
[1].getOutputType());
227 assertEquals(true, channels
[1].isOverwriteMode());
228 assertEquals(400, channels
[1].getReadTimer());
229 assertEquals(TraceEnablement
.DISABLED
, channels
[1].getState());
230 assertEquals(524288, channels
[1].getSubBufferSize());
231 assertEquals(100, channels
[1].getSwitchTimer());
234 IEventInfo
[] channel1Events
= channels
[1].getEvents();
235 assertEquals(0, channel1Events
.length
);
237 // Verify domain UST global
238 assertEquals("UST global", domains
[1].getName());
240 IChannelInfo
[] ustChannels
= domains
[1].getChannels();
242 // Verify UST global's mychannel1
243 assertEquals("mychannel1", ustChannels
[0].getName());
244 assertEquals(8, ustChannels
[0].getNumberOfSubBuffers());
245 assertEquals("mmap()", ustChannels
[0].getOutputType());
246 assertEquals(true, ustChannels
[0].isOverwriteMode());
247 assertEquals(100, ustChannels
[0].getReadTimer());
248 assertEquals(TraceEnablement
.DISABLED
, ustChannels
[0].getState());
249 assertEquals(8192, ustChannels
[0].getSubBufferSize());
250 assertEquals(200, ustChannels
[0].getSwitchTimer());
253 IEventInfo
[] ustEvents
= ustChannels
[0].getEvents();
254 assertEquals(0, ustEvents
.length
);
256 // Verify UST global's channel0
257 assertEquals("channel0", ustChannels
[1].getName());
258 assertEquals(4, ustChannels
[1].getNumberOfSubBuffers());
259 assertEquals("mmap()", ustChannels
[1].getOutputType());
260 assertEquals(false, ustChannels
[1].isOverwriteMode());
261 assertEquals(200, ustChannels
[1].getReadTimer());
262 assertEquals(TraceEnablement
.ENABLED
, ustChannels
[1].getState());
263 assertEquals(4096, ustChannels
[1].getSubBufferSize());
264 assertEquals(0, ustChannels
[1].getSwitchTimer());
267 ustEvents
= ustChannels
[1].getEvents();
268 assertEquals(2, ustEvents
.length
);
270 assertEquals("ust_tests_hello:tptest_sighandler", ustEvents
[0].getName());
271 assertEquals(TraceLogLevel
.TRACE_DEBUG_LINE
, ustEvents
[0].getLogLevel());
272 assertEquals(TraceEventType
.TRACEPOINT
, ustEvents
[0].getEventType());
273 assertEquals(TraceEnablement
.DISABLED
, ustEvents
[0].getState());
275 assertEquals("*", ustEvents
[1].getName());
276 assertEquals(TraceLogLevel
.LEVEL_UNKNOWN
, ustEvents
[1].getLogLevel());
277 assertEquals(TraceEventType
.TRACEPOINT
, ustEvents
[1].getEventType());
278 assertEquals(TraceEnablement
.ENABLED
, ustEvents
[1].getState());
280 // next session (no detailed information available)
281 session
= fService
.getSession("mysession1", new NullProgressMonitor());
282 assertNotNull(session
);
283 assertEquals("mysession1", session
.getName());
284 assertEquals("/home/user/lttng-traces/mysession1-20120203-133225", session
.getSessionPath());
285 assertEquals(TraceSessionState
.INACTIVE
, session
.getSessionState());
287 domains
= session
.getDomains();
288 assertNotNull(domains
);
289 assertEquals(0, domains
.length
);
290 } catch (ExecutionException e
) {
295 public void testGetKernelProvider() {
297 fShell
.setScenario(SCEN_GET_KERNEL_PROVIDER1
);
298 List
<IBaseEventInfo
> events
= fService
.getKernelProvider(new NullProgressMonitor());
301 assertNotNull(events
);
302 assertEquals(3, events
.size());
304 IBaseEventInfo baseEventInfo
= (IBaseEventInfo
) events
.get(0);
305 assertNotNull(baseEventInfo
);
306 assertEquals("sched_kthread_stop", baseEventInfo
.getName());
307 assertEquals(TraceLogLevel
.TRACE_EMERG
, baseEventInfo
.getLogLevel());
308 assertEquals(TraceEventType
.TRACEPOINT
, baseEventInfo
.getEventType());
310 baseEventInfo
= (IBaseEventInfo
) events
.get(1);
311 assertEquals("sched_kthread_stop_ret", baseEventInfo
.getName());
312 assertEquals(TraceLogLevel
.TRACE_EMERG
, baseEventInfo
.getLogLevel());
313 assertEquals(TraceEventType
.TRACEPOINT
, baseEventInfo
.getEventType());
315 baseEventInfo
= (IBaseEventInfo
) events
.get(2);
316 assertEquals("sched_wakeup_new", baseEventInfo
.getName());
317 assertEquals(TraceLogLevel
.TRACE_EMERG
, baseEventInfo
.getLogLevel());
318 assertEquals(TraceEventType
.TRACEPOINT
, baseEventInfo
.getEventType());
320 } catch (ExecutionException e
) {
325 public void testGetUstProvider() {
327 fShell
.setScenario(SCEN_GET_UST_PROVIDER1
);
328 List
<IUstProviderInfo
> providers
= fService
.getUstProvider();
330 // Check all providers
331 assertNotNull(providers
);
332 assertEquals(2, providers
.size());
334 //Verify first provider
335 assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello", providers
.get(0).getName());
336 assertEquals(9379, providers
.get(0).getPid());
339 IBaseEventInfo
[] events
= providers
.get(0).getEvents();
340 assertNotNull(events
);
341 assertEquals(2, events
.length
);
343 IBaseEventInfo baseEventInfo
= (IBaseEventInfo
) events
[0];
344 assertNotNull(baseEventInfo
);
345 assertEquals("ust_tests_hello:tptest_sighandler", baseEventInfo
.getName());
346 assertEquals(TraceLogLevel
.TRACE_DEBUG_MODULE
, baseEventInfo
.getLogLevel());
347 assertEquals(TraceEventType
.TRACEPOINT
, baseEventInfo
.getEventType());
349 baseEventInfo
= (IBaseEventInfo
) events
[1];
350 assertEquals("ust_tests_hello:tptest", baseEventInfo
.getName());
351 assertEquals(TraceLogLevel
.TRACE_INFO
, baseEventInfo
.getLogLevel());
352 assertEquals(TraceEventType
.TRACEPOINT
, baseEventInfo
.getEventType());
354 //Verify second provider
355 assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello", providers
.get(1).getName());
356 assertEquals(4852, providers
.get(1).getPid());
359 events
= providers
.get(1).getEvents();
360 assertNotNull(events
);
361 assertEquals(2, events
.length
);
363 baseEventInfo
= (IBaseEventInfo
) events
[0];
364 assertNotNull(baseEventInfo
);
365 assertEquals("ust_tests_hello:tptest_sighandler", baseEventInfo
.getName());
366 assertEquals(TraceLogLevel
.TRACE_WARNING
, baseEventInfo
.getLogLevel());
367 assertEquals(TraceEventType
.TRACEPOINT
, baseEventInfo
.getEventType());
369 baseEventInfo
= (IBaseEventInfo
) events
[1];
370 assertEquals("ust_tests_hello:tptest", baseEventInfo
.getName());
371 assertEquals(TraceLogLevel
.TRACE_DEBUG_FUNCTION
, baseEventInfo
.getLogLevel());
372 assertEquals(TraceEventType
.TRACEPOINT
, baseEventInfo
.getEventType());
374 } catch (ExecutionException e
) {
379 public void testUstProvider2() {
381 fShell
.setScenario(SCEN_GET_UST_PROVIDER2
);
382 List
<IUstProviderInfo
> providers
= fService
.getUstProvider();
384 assertNotNull(providers
);
385 assertEquals(0, providers
.size());
387 } catch (ExecutionException e
) {
392 public void testCreateSession() {
394 fShell
.setScenario(SCEN_CREATE_SESSION1
);
396 ISessionInfo info
= fService
.createSession("mysession2", null, new NullProgressMonitor());
398 assertEquals("mysession2", info
.getName());
399 assertNotNull(info
.getSessionPath());
400 assertTrue(info
.getSessionPath().contains("mysession2"));
401 assertEquals(TraceSessionState
.INACTIVE
, info
.getSessionState());
402 } catch (ExecutionException e
) {
407 public void testCreateSessionVariants() {
409 fShell
.setScenario(SCEN_CREATE_SESSION_VARIANTS
);
412 fService
.createSession("alreadyExist", null, new NullProgressMonitor());
413 fail("No exeption thrown");
414 } catch (ExecutionException e
) {
419 fService
.createSession("wrongName", null, new NullProgressMonitor());
420 fail("No exeption thrown");
421 } catch (ExecutionException e
) {
426 fService
.createSession("withPath", "/home/user/hallo", new NullProgressMonitor());
427 fail("No exeption thrown");
428 } catch (ExecutionException e
) {
433 ISessionInfo info
= fService
.createSession("session with spaces", null, new NullProgressMonitor());
435 assertEquals("session with spaces", info
.getName());
436 assertNotNull(info
.getSessionPath());
437 assertTrue(info
.getSessionPath().contains("session with spaces"));
438 assertEquals(TraceSessionState
.INACTIVE
, info
.getSessionState());
440 } catch (ExecutionException e
) {
445 ISessionInfo info
= fService
.createSession("pathWithSpaces", "/home/user/hallo user/here", new NullProgressMonitor());
447 assertEquals("pathWithSpaces", info
.getName());
448 assertNotNull(info
.getSessionPath());
449 assertTrue(info
.getSessionPath().contains("/home/user/hallo user/here"));
450 assertEquals(TraceSessionState
.INACTIVE
, info
.getSessionState());
452 } catch (ExecutionException e
) {
457 public void testDestroySession() {
459 fShell
.setScenario(SCEN_DESTROY_SESSION1
);
460 fService
.destroySession("mysession2", new NullProgressMonitor());
461 } catch (ExecutionException e
) {
466 public void testCreateChannel() {
469 String sessionName
= "mysession2";
470 List
<String
> list
= new ArrayList
<String
>();
471 String kernelChannel0
= "mychannel0";
472 String kernelChannel1
= "mychannel1";
473 list
.add(kernelChannel0
);
474 list
.add(kernelChannel1
);
476 fShell
.setScenario(SCEN_CHANNEL_HANDLING
);
478 // Create/enable/configure 2 kernel channels
479 ChannelInfo chanInfo
= new ChannelInfo("");
480 chanInfo
.setOverwriteMode(true);
481 chanInfo
.setSubBufferSize(16384);
482 chanInfo
.setReadTimer(100);
483 chanInfo
.setSwitchTimer(200);
484 chanInfo
.setNumberOfSubBuffers(2);
485 fService
.enableChannels(sessionName
, list
, true, chanInfo
, new NullProgressMonitor());
487 // Create/enable/configure 1 UST channel
489 list
.add("ustChannel");
491 chanInfo
= new ChannelInfo("");
492 chanInfo
.setOverwriteMode(true);
493 chanInfo
.setSubBufferSize(32768);
494 chanInfo
.setReadTimer(200);
495 chanInfo
.setSwitchTimer(100);
496 chanInfo
.setNumberOfSubBuffers(1);
497 fService
.enableChannels(sessionName
, list
, false, chanInfo
, new NullProgressMonitor());
499 } catch (ExecutionException e
) {
504 public void testDisableChannel() {
507 String sessionName
= "mysession2";
508 List
<String
> list
= new ArrayList
<String
>();
509 String kernelChannel0
= "mychannel0";
510 String kernelChannel1
= "mychannel1";
511 list
.add(kernelChannel0
);
512 list
.add(kernelChannel1
);
514 fShell
.setScenario(SCEN_CHANNEL_HANDLING
);
515 fService
.disableChannels(sessionName
, list
, true, new NullProgressMonitor());
518 list
.add("ustChannel");
519 fService
.disableChannels(sessionName
, list
, false, new NullProgressMonitor());
521 } catch (ExecutionException e
) {
526 public void testEnableChannel() {
529 String sessionName
= "mysession2";
530 List
<String
> list
= new ArrayList
<String
>();
531 String kernelChannel0
= "mychannel0";
532 String kernelChannel1
= "mychannel1";
533 list
.add(kernelChannel0
);
534 list
.add(kernelChannel1
);
536 fShell
.setScenario(SCEN_CHANNEL_HANDLING
);
537 fService
.enableChannels(sessionName
, list
, true, null, new NullProgressMonitor());
539 // Create/enable/configure 1 UST channel
541 list
.add("ustChannel");
543 fService
.enableChannels(sessionName
, list
, false, null, new NullProgressMonitor());
545 } catch (ExecutionException e
) {
550 // public void tesEnableChannelNoTracer() {
552 // ILttngControlService service = new LTTngControlService(fShellFactory.getShellForChannelNoTracer());
553 // service.getSessionNames(new NullProgressMonitor());
554 // fail("No exeption thrown");
556 // } catch (ExecutionException e) {
561 public void testEnableEvents() {
563 // 1) session name, channel = null, 3 event names, kernel
564 String sessionName
= "mysession2";
565 List
<String
> list
= new ArrayList
<String
>();
566 String eventName0
= "block_rq_remap";
567 String eventName1
= "block_bio_remap";
568 String eventName2
= "softirq_entry";
569 list
.add(eventName0
);
570 list
.add(eventName1
);
571 list
.add(eventName2
);
572 fShell
.setScenario(SCEN_EVENT_HANDLING
);
573 fService
.enableEvents(sessionName
, null, list
, true, new NullProgressMonitor());
575 // 2) session name, channel=mychannel, event name= null, kernel
576 String channelName
= "mychannel";
577 fService
.enableEvents(sessionName
, channelName
, null, true, new NullProgressMonitor());
579 // 3) session name, channel=mychannel, 1 event name, ust
580 String ustEventName
= "ust_tests_hello:tptest_sighandler";
582 list
.add(ustEventName
);
583 fService
.enableEvents(sessionName
, channelName
, list
, false, new NullProgressMonitor());
585 // 4) session name, channel = mychannel, no event name, ust
587 fService
.enableEvents(sessionName
, channelName
, list
, false, new NullProgressMonitor());
589 } catch (ExecutionException e
) {
594 public void testEnableSyscalls() {
596 // 1) session name, channel = null, 3 event names, kernel
597 String sessionName
= "mysession2";
598 String channelName
= "mychannel";
600 fShell
.setScenario(SCEN_EVENT_HANDLING
);
602 // 1) session name, channel = null
603 fService
.enableSyscalls(sessionName
, null, new NullProgressMonitor());
605 // 2) session name, channel = mychannel
606 fService
.enableSyscalls(sessionName
, channelName
, new NullProgressMonitor());
608 } catch (ExecutionException e
) {
613 public void testDynamicProbe() {
615 // 1) session name, channel = null, 3 event names, kernel
616 String sessionName
= "mysession2";
617 String channelName
= "mychannel";
618 String eventName0
= "myevent0";
619 String eventName1
= "myevent1";
620 String functionProbe
= "0xc0101340";
621 String dynProbe
= "init_post";
623 fShell
.setScenario(SCEN_EVENT_HANDLING
);
625 // 1) session name, channel = null, event name, function probe, probe
626 fService
.enableProbe(sessionName
, null, eventName0
, true, functionProbe
, new NullProgressMonitor());
628 // 2) session name, channel = mychannel
629 fService
.enableProbe(sessionName
, channelName
, eventName1
, false, dynProbe
, new NullProgressMonitor());
631 } catch (ExecutionException e
) {
636 public void testEnableLogLevel() {
638 // 1) session name, channel = null, 3 event names, kernel
639 String sessionName
= "mysession2";
640 String channelName
= "mychannel";
641 String eventName4
= "myevent4";
642 String eventName5
= "myevent5";
644 fShell
.setScenario(SCEN_EVENT_HANDLING
);
646 // 1) session name, channel = null, event name, loglevel-only, TRACE_DEBUG
647 fService
.enableLogLevel(sessionName
, null, eventName4
, LogLevelType
.LOGLEVEL_ONLY
, TraceLogLevel
.TRACE_DEBUG
, new NullProgressMonitor());
649 // 2) session name, channel = mychannel, null, loglevel, TRACE_DEBUG_FUNCTION
650 fService
.enableLogLevel(sessionName
, channelName
, eventName5
, LogLevelType
.LOGLEVEL
, TraceLogLevel
.TRACE_DEBUG_FUNCTION
, new NullProgressMonitor());
652 } catch (ExecutionException e
) {