Commit | Line | Data |
---|---|---|
06b9339e | 1 | /********************************************************************** |
533d0bc3 | 2 | * Copyright (c) 2012, 2015 Ericsson |
cfdb727a | 3 | * |
06b9339e BH |
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 | |
cfdb727a AM |
8 | * |
9 | * Contributors: | |
06b9339e | 10 | * Bernd Hufmann - Initial API and implementation |
2ba3d0a1 | 11 | * Alexandre Montplaisir - Port to JUnit4 |
b732adaa | 12 | * Markus Schorn - Bug 448058: Use org.eclipse.remote in favor of RSE |
06b9339e | 13 | **********************************************************************/ |
2ba3d0a1 | 14 | |
9bc60be7 | 15 | package org.eclipse.tracecompass.lttng2.control.ui.tests.model.component; |
06b9339e | 16 | |
b732adaa MS |
17 | import static org.junit.Assert.assertEquals; |
18 | import static org.junit.Assert.assertFalse; | |
19 | import static org.junit.Assert.assertNotNull; | |
20 | import static org.junit.Assert.assertNull; | |
21 | import static org.junit.Assert.assertTrue; | |
2ba3d0a1 | 22 | |
d132bcc7 BH |
23 | import java.io.File; |
24 | import java.net.URL; | |
25 | ||
d132bcc7 BH |
26 | import org.eclipse.core.runtime.FileLocator; |
27 | import org.eclipse.core.runtime.Path; | |
b732adaa | 28 | import org.eclipse.remote.core.IRemoteConnection; |
9bc60be7 AM |
29 | import org.eclipse.tracecompass.internal.lttng2.control.core.model.IChannelInfo; |
30 | import org.eclipse.tracecompass.internal.lttng2.control.core.model.TargetNodeState; | |
31 | import org.eclipse.tracecompass.internal.lttng2.control.core.model.TraceEnablement; | |
32 | import org.eclipse.tracecompass.internal.lttng2.control.core.model.TraceEventType; | |
33 | import org.eclipse.tracecompass.internal.lttng2.control.core.model.TraceLogLevel; | |
34 | import org.eclipse.tracecompass.internal.lttng2.control.core.model.TraceSessionState; | |
35 | import org.eclipse.tracecompass.internal.lttng2.control.core.model.impl.BufferType; | |
36 | import org.eclipse.tracecompass.internal.lttng2.control.stubs.service.TestRemoteSystemProxy; | |
37 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.ITraceControlComponent; | |
38 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.BaseEventComponent; | |
39 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.KernelProviderComponent; | |
40 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.TargetNodeComponent; | |
41 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.TraceChannelComponent; | |
42 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.TraceDomainComponent; | |
43 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.TraceEventComponent; | |
44 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.TraceProbeEventComponent; | |
45 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.TraceSessionComponent; | |
46 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.model.impl.UstProviderComponent; | |
47 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.property.BaseEventPropertySource; | |
48 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.property.KernelProviderPropertySource; | |
49 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.property.TargetNodePropertySource; | |
50 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.property.TraceChannelPropertySource; | |
51 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.property.TraceDomainPropertySource; | |
52 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.property.TraceEventPropertySource; | |
53 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.property.TraceProbeEventPropertySource; | |
54 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.property.TraceSessionPropertySource; | |
55 | import org.eclipse.tracecompass.internal.lttng2.control.ui.views.property.UstProviderPropertySource; | |
ec619615 | 56 | import org.eclipse.tracecompass.tmf.remote.core.proxy.RemoteSystemProxy; |
06b9339e BH |
57 | import org.eclipse.ui.views.properties.IPropertySource; |
58 | import org.junit.After; | |
2ba3d0a1 | 59 | import org.junit.Test; |
9269df72 | 60 | import org.osgi.framework.FrameworkUtil; |
06b9339e BH |
61 | |
62 | /** | |
2ba3d0a1 AM |
63 | * The class <code>TraceControlPropertiesTest</code> contains tests for the all |
64 | * property class</code>. | |
06b9339e | 65 | */ |
2ba3d0a1 | 66 | public class TraceControlPropertiesTest { |
d132bcc7 BH |
67 | |
68 | // ------------------------------------------------------------------------ | |
69 | // Constants | |
70 | // ------------------------------------------------------------------------ | |
2ba3d0a1 | 71 | |
d132bcc7 BH |
72 | private static final String DIRECTORY = "testfiles"; |
73 | private static final String TEST_STREAM = "ListInfoTest.cfg"; | |
74 | private static final String SCEN_LIST_INFO_TEST = "ListInfoTest"; | |
75 | ||
06b9339e BH |
76 | // ------------------------------------------------------------------------ |
77 | // Housekeeping | |
78 | // ------------------------------------------------------------------------ | |
79 | ||
06b9339e BH |
80 | /** |
81 | * Perform post-test clean-up. | |
06b9339e | 82 | */ |
06b9339e | 83 | @After |
2ba3d0a1 | 84 | public void tearDown() { |
b957fb8c | 85 | TraceControlTestFacility.getInstance().waitForJobs(); |
06b9339e | 86 | } |
cfdb727a | 87 | |
06b9339e BH |
88 | /** |
89 | * Run the TraceControlComponent. | |
cfdb727a AM |
90 | * |
91 | * @throws Exception | |
92 | * This will fail the test | |
06b9339e | 93 | */ |
2ba3d0a1 | 94 | @Test |
a26d90be | 95 | public void testComponentProperties() throws Exception { |
cfdb727a | 96 | |
06b9339e BH |
97 | TestRemoteSystemProxy proxy = new TestRemoteSystemProxy(); |
98 | ||
9269df72 | 99 | URL location = FileLocator.find(FrameworkUtil.getBundle(this.getClass()), new Path(DIRECTORY + File.separator + TEST_STREAM), null); |
d132bcc7 BH |
100 | File testfile = new File(FileLocator.toFileURL(location).toURI()); |
101 | proxy.setTestFile(testfile.getAbsolutePath()); | |
102 | proxy.setScenario(SCEN_LIST_INFO_TEST); | |
cfdb727a | 103 | |
06b9339e BH |
104 | ITraceControlComponent root = TraceControlTestFacility.getInstance().getControlView().getTraceControlRoot(); |
105 | ||
533d0bc3 | 106 | IRemoteConnection host = RemoteSystemProxy.getLocalConnection(); |
06b9339e BH |
107 | TargetNodeComponent node = new TargetNodeComponent("myNode", root, host, proxy); |
108 | ||
109 | root.addChild(node); | |
110 | node.connect(); | |
111 | ||
b732adaa | 112 | TraceControlTestFacility.getInstance().waitForConnect(node); |
06b9339e BH |
113 | TraceControlTestFacility.getInstance().waitForJobs(); |
114 | ||
115 | // ------------------------------------------------------------------------ | |
116 | // Verify Node Properties (adapter) | |
117 | // ------------------------------------------------------------------------ | |
118 | Object adapter = node.getAdapter(IPropertySource.class); | |
119 | assertNotNull(adapter); | |
120 | assertTrue(adapter instanceof TargetNodePropertySource); | |
121 | ||
122 | TargetNodePropertySource source = (TargetNodePropertySource)adapter; | |
123 | ||
124 | assertNull(source.getEditableValue()); | |
125 | assertFalse(source.isPropertySet(TargetNodePropertySource.TARGET_NODE_NAME_PROPERTY_ID)); | |
126 | assertNotNull(source.getPropertyDescriptors()); | |
127 | ||
128 | assertEquals("myNode", source.getPropertyValue(TargetNodePropertySource.TARGET_NODE_NAME_PROPERTY_ID)); | |
b732adaa | 129 | assertEquals("localhost", source.getPropertyValue(TargetNodePropertySource.TARGET_NODE_ADDRESS_PROPERTY_ID)); |
06b9339e | 130 | assertEquals(TargetNodeState.CONNECTED.name(), source.getPropertyValue(TargetNodePropertySource.TARGET_NODE_STATE_PROPERTY_ID)); |
d4514365 | 131 | assertEquals("2.1.0", source.getPropertyValue(TargetNodePropertySource.TARGET_NODE_VERSION_PROPERTY_ID)); |
06b9339e BH |
132 | assertNull(source.getPropertyValue("test")); |
133 | ||
134 | adapter = node.getAdapter(IChannelInfo.class); | |
135 | assertNull(adapter); | |
cfdb727a | 136 | |
06b9339e BH |
137 | ITraceControlComponent[] groups = node.getChildren(); |
138 | assertNotNull(groups); | |
139 | assertEquals(2, groups.length); | |
cfdb727a | 140 | |
06b9339e BH |
141 | ITraceControlComponent[] providers = groups[0].getChildren(); |
142 | ||
143 | assertNotNull(providers); | |
144 | assertEquals(3, providers.length); | |
145 | ||
146 | // ------------------------------------------------------------------------ | |
147 | // Verify Kernel Provider Properties (adapter) | |
148 | // ------------------------------------------------------------------------ | |
149 | KernelProviderComponent kernelProvider = (KernelProviderComponent) providers[0]; | |
cfdb727a | 150 | |
06b9339e BH |
151 | adapter = kernelProvider.getAdapter(IPropertySource.class); |
152 | assertNotNull(adapter); | |
153 | assertTrue(adapter instanceof KernelProviderPropertySource); | |
154 | ||
155 | KernelProviderPropertySource kernelSource = (KernelProviderPropertySource)adapter; | |
156 | assertNotNull(kernelSource.getPropertyDescriptors()); | |
157 | ||
158 | assertEquals("Kernel", kernelSource.getPropertyValue(KernelProviderPropertySource.KERNEL_PROVIDER_NAME_PROPERTY_ID)); | |
159 | ||
160 | // ------------------------------------------------------------------------ | |
161 | // Verify UST Provider Properties (adapter) | |
162 | // ------------------------------------------------------------------------ | |
163 | UstProviderComponent ustProvider = (UstProviderComponent) providers[1]; | |
cfdb727a | 164 | |
06b9339e BH |
165 | adapter = ustProvider.getAdapter(IPropertySource.class); |
166 | assertNotNull(adapter); | |
167 | assertTrue(adapter instanceof UstProviderPropertySource); | |
168 | ||
169 | UstProviderPropertySource ustSource = (UstProviderPropertySource)adapter; | |
170 | assertNotNull(ustSource.getPropertyDescriptors()); | |
171 | ||
2e74131b | 172 | assertEquals("/home/user/git/lttng-ust/tests/hello.cxx/.libs/lt-hello [PID=9379]", ustSource.getPropertyValue(UstProviderPropertySource.UST_PROVIDER_NAME_PROPERTY_ID)); |
06b9339e BH |
173 | assertEquals(String.valueOf(9379), ustSource.getPropertyValue(UstProviderPropertySource.UST_PROVIDER_PID_PROPERTY_ID)); |
174 | ||
175 | // ------------------------------------------------------------------------ | |
176 | // Verify Base Event Properties (adapter) | |
177 | // ------------------------------------------------------------------------ | |
178 | ITraceControlComponent[] events = ustProvider.getChildren(); | |
179 | assertNotNull(events); | |
180 | assertEquals(2, events.length); | |
181 | ||
182 | BaseEventComponent baseEventInfo = (BaseEventComponent) events[0]; | |
183 | assertNotNull(baseEventInfo); | |
cfdb727a | 184 | |
06b9339e BH |
185 | adapter = baseEventInfo.getAdapter(IPropertySource.class); |
186 | assertNotNull(adapter); | |
187 | assertTrue(adapter instanceof BaseEventPropertySource); | |
188 | ||
189 | BaseEventPropertySource baseSource = (BaseEventPropertySource)adapter; | |
190 | assertNotNull(baseSource.getPropertyDescriptors()); | |
191 | ||
192 | assertEquals("ust_tests_hello:tptest_sighandler", baseSource.getPropertyValue(BaseEventPropertySource.BASE_EVENT_NAME_PROPERTY_ID)); | |
193 | assertEquals(TraceEventType.TRACEPOINT.name(), baseSource.getPropertyValue(BaseEventPropertySource.BASE_EVENT_TYPE_PROPERTY_ID)); | |
4775bcbf | 194 | assertEquals(TraceLogLevel.TRACE_DEBUG_MODULE.name(), baseSource.getPropertyValue(BaseEventPropertySource.BASE_EVENT_LOGLEVEL_PROPERTY_ID)); |
06b9339e | 195 | |
d4514365 BH |
196 | baseEventInfo = (BaseEventComponent) events[1]; |
197 | assertNotNull(baseEventInfo); | |
198 | ||
199 | adapter = baseEventInfo.getAdapter(IPropertySource.class); | |
200 | assertNotNull(adapter); | |
201 | assertTrue(adapter instanceof BaseEventPropertySource); | |
202 | baseSource = (BaseEventPropertySource)adapter; | |
203 | assertNotNull(baseSource.getPropertyDescriptors()); | |
204 | assertEquals("doublefield=float;floatfield=float;stringfield=string", baseSource.getPropertyValue(BaseEventPropertySource.BASE_EVENT_FIELDS_PROPERTY_ID)); | |
205 | ||
06b9339e BH |
206 | // ------------------------------------------------------------------------ |
207 | // Verify Session Properties (adapter) | |
208 | // ------------------------------------------------------------------------ | |
209 | ITraceControlComponent[] sessions = groups[1].getChildren(); | |
210 | assertNotNull(sessions); | |
211 | assertEquals(2, sessions.length); | |
212 | ||
213 | TraceSessionComponent session = (TraceSessionComponent)sessions[1]; | |
214 | ||
215 | adapter = session.getAdapter(IPropertySource.class); | |
216 | assertNotNull(adapter); | |
217 | assertTrue(adapter instanceof TraceSessionPropertySource); | |
218 | ||
219 | TraceSessionPropertySource sessionSource = (TraceSessionPropertySource)adapter; | |
220 | assertNotNull(sessionSource.getPropertyDescriptors()); | |
221 | ||
222 | assertEquals("mysession", sessionSource.getPropertyValue(TraceSessionPropertySource.TRACE_SESSION_NAME_PROPERTY_ID)); | |
223 | assertEquals("/home/user/lttng-traces/mysession-20120129-084256", sessionSource.getPropertyValue(TraceSessionPropertySource.TRACE_SESSION_PATH_PROPERTY_ID)); | |
224 | assertEquals(TraceSessionState.ACTIVE.name(), sessionSource.getPropertyValue(TraceSessionPropertySource.TRACE_SESSION_STATE_PROPERTY_ID)); | |
225 | ||
226 | // ------------------------------------------------------------------------ | |
227 | // Verify Domain Provider Properties (adapter) | |
228 | // ------------------------------------------------------------------------ | |
229 | ITraceControlComponent[] domains = session.getChildren(); | |
230 | assertNotNull(domains); | |
231 | assertEquals(2, domains.length); | |
232 | ||
233 | TraceDomainComponent domain = (TraceDomainComponent) domains[0]; | |
234 | adapter = domain.getAdapter(IPropertySource.class); | |
235 | assertNotNull(adapter); | |
236 | assertTrue(adapter instanceof TraceDomainPropertySource); | |
237 | ||
238 | TraceDomainPropertySource domainSource = (TraceDomainPropertySource)adapter; | |
239 | assertNotNull(domainSource.getPropertyDescriptors()); | |
240 | ||
241 | assertEquals("Kernel", domainSource.getPropertyValue(TraceDomainPropertySource.TRACE_DOMAIN_NAME_PROPERTY_ID)); | |
83051fc3 | 242 | assertEquals(BufferType.BUFFER_SHARED.getInName(), domainSource.getPropertyValue(TraceDomainPropertySource.BUFFER_TYPE_PROPERTY_ID)); |
cfdb727a | 243 | |
06b9339e BH |
244 | ITraceControlComponent[] channels = domains[0].getChildren(); |
245 | assertNotNull(channels); | |
246 | assertEquals(2, channels.length); | |
247 | ||
248 | // ------------------------------------------------------------------------ | |
249 | // Verify Channel Properties (adapter) | |
250 | // ------------------------------------------------------------------------ | |
251 | assertTrue(channels[0] instanceof TraceChannelComponent); | |
252 | TraceChannelComponent channel = (TraceChannelComponent) channels[0]; | |
cfdb727a | 253 | |
06b9339e BH |
254 | adapter = channel.getAdapter(IPropertySource.class); |
255 | assertNotNull(adapter); | |
256 | assertTrue(adapter instanceof TraceChannelPropertySource); | |
257 | ||
258 | TraceChannelPropertySource channelSource = (TraceChannelPropertySource)adapter; | |
259 | assertNotNull(channelSource.getPropertyDescriptors()); | |
260 | ||
261 | assertEquals("channel0", channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_NAME_PROPERTY_ID)); | |
262 | assertEquals(String.valueOf(4), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_NO_SUBBUFFERS_PROPERTY_ID)); | |
263 | assertEquals(TraceEnablement.ENABLED.name(), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_STATE_PROPERTY_ID)); | |
264 | assertEquals(String.valueOf(false), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_OVERWRITE_MODE_PROPERTY_ID)); | |
265 | assertEquals("splice()", channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_OUTPUT_TYPE_PROPERTY_ID)); | |
266 | assertEquals(String.valueOf(200), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_READ_TIMER_PROPERTY_ID)); | |
267 | assertEquals(String.valueOf(262144), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_SUBBUFFER_SIZE_PROPERTY_ID)); | |
268 | assertEquals(String.valueOf(0), channelSource.getPropertyValue(TraceChannelPropertySource.TRACE_CHANNEL_SWITCH_TIMER_PROPERTY_ID)); | |
cfdb727a | 269 | |
06b9339e BH |
270 | // ------------------------------------------------------------------------ |
271 | // Verify Event Properties (adapter) | |
272 | // ------------------------------------------------------------------------ | |
273 | ITraceControlComponent[] channel0Events = channel.getChildren(); | |
274 | assertNotNull(channel0Events); | |
d132bcc7 | 275 | assertEquals(5, channel0Events.length); |
06b9339e | 276 | assertTrue(channel0Events[0] instanceof TraceEventComponent); |
cfdb727a | 277 | |
06b9339e | 278 | TraceEventComponent event = (TraceEventComponent) channel0Events[0]; |
cfdb727a | 279 | |
06b9339e BH |
280 | adapter = event.getAdapter(IPropertySource.class); |
281 | assertNotNull(adapter); | |
282 | assertTrue(adapter instanceof TraceEventPropertySource); | |
283 | ||
284 | TraceEventPropertySource eventSource = (TraceEventPropertySource)adapter; | |
285 | assertNotNull(eventSource.getPropertyDescriptors()); | |
cfdb727a | 286 | |
06b9339e BH |
287 | assertEquals("block_rq_remap", eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_NAME_PROPERTY_ID)); |
288 | assertEquals(TraceLogLevel.TRACE_EMERG.name(), eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_LOGLEVEL_PROPERTY_ID)); | |
289 | assertEquals(TraceEventType.TRACEPOINT.name(), eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_TYPE_PROPERTY_ID)); | |
290 | assertEquals(TraceEnablement.ENABLED.name(), eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_STATE_PROPERTY_ID)); | |
cfdb727a | 291 | |
d132bcc7 BH |
292 | // ------------------------------------------------------------------------ |
293 | // Verify Probe Event Properties (adapter) | |
294 | // ------------------------------------------------------------------------ | |
295 | assertTrue(channel0Events[2] instanceof TraceProbeEventComponent); | |
cfdb727a | 296 | |
d132bcc7 | 297 | TraceProbeEventComponent probeEvent = (TraceProbeEventComponent) channel0Events[2]; |
cfdb727a | 298 | |
d132bcc7 BH |
299 | adapter = probeEvent.getAdapter(IPropertySource.class); |
300 | assertNotNull(adapter); | |
301 | assertTrue(adapter instanceof TraceProbeEventPropertySource); | |
302 | ||
303 | TraceProbeEventPropertySource probeEventSource = (TraceProbeEventPropertySource)adapter; | |
304 | assertNotNull(probeEventSource.getPropertyDescriptors()); | |
305 | assertEquals(4, probeEventSource.getPropertyDescriptors().length); | |
cfdb727a | 306 | |
d132bcc7 BH |
307 | assertEquals("myevent2", probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_NAME_PROPERTY_ID)); |
308 | assertEquals(TraceEventType.PROBE.name(), probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_TYPE_PROPERTY_ID)); | |
309 | assertEquals(TraceEnablement.ENABLED.name(), probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_STATE_PROPERTY_ID)); | |
310 | assertEquals("0xc0101340", probeEventSource.getPropertyValue(TraceProbeEventPropertySource.TRACE_EVENT_PROBE_ADDRESS_PROPERTY_ID)); | |
cfdb727a | 311 | |
d132bcc7 | 312 | assertTrue(channel0Events[3] instanceof TraceProbeEventComponent); |
cfdb727a | 313 | |
d132bcc7 | 314 | probeEvent = (TraceProbeEventComponent) channel0Events[3]; |
cfdb727a | 315 | |
d132bcc7 BH |
316 | adapter = probeEvent.getAdapter(IPropertySource.class); |
317 | assertNotNull(adapter); | |
318 | assertTrue(adapter instanceof TraceProbeEventPropertySource); | |
319 | ||
320 | probeEventSource = (TraceProbeEventPropertySource)adapter; | |
321 | assertNotNull(probeEventSource.getPropertyDescriptors()); | |
322 | assertEquals(5, probeEventSource.getPropertyDescriptors().length); | |
cfdb727a | 323 | |
d132bcc7 BH |
324 | assertEquals("myevent0", probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_NAME_PROPERTY_ID)); |
325 | assertEquals(TraceEventType.PROBE.name(), probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_TYPE_PROPERTY_ID)); | |
326 | assertEquals(TraceEnablement.ENABLED.name(), probeEventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_STATE_PROPERTY_ID)); | |
327 | assertEquals("0x0", probeEventSource.getPropertyValue(TraceProbeEventPropertySource.TRACE_EVENT_PROBE_OFFSET_PROPERTY_ID)); | |
328 | assertEquals("init_post", probeEventSource.getPropertyValue(TraceProbeEventPropertySource.TRACE_EVENT_PROBE_SYMBOL_PROPERTY_ID)); | |
cfdb727a | 329 | |
d4514365 BH |
330 | //------------------------------------------------------------------------- |
331 | // Verify Filter of UST event | |
332 | //------------------------------------------------------------------------- | |
333 | event = (TraceEventComponent) domains[1].getChildren()[1].getChildren()[0]; | |
334 | adapter = event.getAdapter(IPropertySource.class); | |
335 | assertEquals("with filter", event.getFilterExpression()); | |
336 | ||
54f2dcc0 BH |
337 | //------------------------------------------------------------------------- |
338 | // Verify Log Level Type of UST events (> LTTng 2.4) | |
339 | //------------------------------------------------------------------------- | |
340 | event = (TraceEventComponent) domains[1].getChildren()[1].getChildren()[0]; | |
341 | adapter = event.getAdapter(IPropertySource.class); | |
342 | eventSource = (TraceEventPropertySource) adapter; | |
343 | assertEquals("== TRACE_DEBUG_LINE", eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_LOGLEVEL_PROPERTY_ID)); | |
344 | ||
345 | event = (TraceEventComponent) domains[1].getChildren()[1].getChildren()[1]; | |
346 | adapter = event.getAdapter(IPropertySource.class); | |
347 | eventSource = (TraceEventPropertySource) adapter; | |
348 | assertEquals("<= TRACE_INFO", eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_LOGLEVEL_PROPERTY_ID)); | |
349 | ||
350 | event = (TraceEventComponent) domains[1].getChildren()[1].getChildren()[2]; | |
351 | adapter = event.getAdapter(IPropertySource.class); | |
352 | eventSource = (TraceEventPropertySource) adapter; | |
353 | assertEquals("TRACE_DEBUG_SYSTEM", eventSource.getPropertyValue(TraceEventPropertySource.TRACE_EVENT_LOGLEVEL_PROPERTY_ID)); | |
354 | ||
a26d90be BH |
355 | //------------------------------------------------------------------------- |
356 | // Delete node | |
357 | //------------------------------------------------------------------------- | |
358 | node.disconnect(); | |
359 | node.getParent().removeChild(node); | |
06b9339e | 360 | } |
f3b33d40 | 361 | } |