Search in sources :

Example 1 with UstDebugInfoBinaryFile

use of org.eclipse.tracecompass.lttng2.ust.core.analysis.debuginfo.UstDebugInfoBinaryFile in project tracecompass by tracecompass.

the class UstDebugInfoAnalysisModuleTest method testGetAllBinaries.

/**
 * Test the {@link UstDebugInfoAnalysisModule#getAllBinaries} method.
 */
@Test
public void testGetAllBinaries() {
    LttngUstTrace trace = LttngUstTestTraceUtils.getTrace(REAL_TEST_TRACE);
    executeModule(trace);
    List<UstDebugInfoBinaryFile> actualBinaries = Lists.newArrayList(fModule.getAllBinaries());
    List<UstDebugInfoBinaryFile> expectedBinaries = Lists.newArrayList(new UstDebugInfoBinaryFile("/home/simark/src/babeltrace/tests/debug-info-data/libhello_so", "cdd98cdd87f7fe64c13b6daad553987eafd40cbb", null, true), new UstDebugInfoBinaryFile("/home/simark/src/babeltrace/tests/debug-info-data/test", "0683255d2cf219c33cc0efd6039db09ccc4416d7", null, false), new UstDebugInfoBinaryFile("[linux-vdso.so.1]", null, null, false), new UstDebugInfoBinaryFile("/usr/local/lib/liblttng-ust-dl.so.0.0.0", "39c035014cc02008d6884fcb1be4e020cc820366", null, true), new UstDebugInfoBinaryFile("/usr/lib/libdl-2.23.so", "db3f9be9f4ebe9e2a21e4ae0b4ef7165d40fdfef", null, true), new UstDebugInfoBinaryFile("/usr/lib/libc-2.23.so", "946025a5cad7b5f2dfbaebc6ebd1fcc004349b48", null, true), new UstDebugInfoBinaryFile("/usr/local/lib/liblttng-ust.so.0.0.0", "405b0b15daa73eccb88076247ba30356c00d3b92", null, true), new UstDebugInfoBinaryFile("/usr/local/lib/liblttng-ust-tracepoint.so.0.0.0", "62c028aad38adb5e0910c527d522e8c86a0a3344", null, true), new UstDebugInfoBinaryFile("/usr/lib/librt-2.23.so", "aba676bda7fb6adb71e100159915504e1a0c17e6", null, true), new UstDebugInfoBinaryFile("/usr/lib/liburcu-bp.so.4.0.0", "b9dfadea234107f8453bc636fc160047e0c01b7a", null, true), new UstDebugInfoBinaryFile("/usr/lib/liburcu-cds.so.4.0.0", "420527f6dacc762378d9fa7def54d91c80a6c87e", null, true), new UstDebugInfoBinaryFile("/usr/lib/libpthread-2.23.so", "d91ed99c8425b7ce5da5bb750662a91038e02a78", null, true), new UstDebugInfoBinaryFile("/usr/lib/ld-2.23.so", "524eff0527e923e4adc4be9db1ef7475607b92e8", null, true), new UstDebugInfoBinaryFile("/usr/lib/liburcu-common.so.4.0.0", "f279a6d46a2b846e15e7abd99cfe9fbe8d7f8295", null, true));
    Comparator<UstDebugInfoBinaryFile> comparator = Comparator.comparing(UstDebugInfoBinaryFile::getFilePath);
    actualBinaries.sort(comparator);
    expectedBinaries.sort(comparator);
    /* Highlights failures more easily */
    for (int i = 0; i < expectedBinaries.size(); i++) {
        assertEquals(expectedBinaries.get(i), actualBinaries.get(i));
    }
    assertEquals(actualBinaries, expectedBinaries);
    LttngUstTestTraceUtils.dispose(REAL_TEST_TRACE);
}
Also used : LttngUstTrace(org.eclipse.tracecompass.lttng2.ust.core.trace.LttngUstTrace) UstDebugInfoBinaryFile(org.eclipse.tracecompass.lttng2.ust.core.analysis.debuginfo.UstDebugInfoBinaryFile) Test(org.junit.Test)

Aggregations

UstDebugInfoBinaryFile (org.eclipse.tracecompass.lttng2.ust.core.analysis.debuginfo.UstDebugInfoBinaryFile)1 LttngUstTrace (org.eclipse.tracecompass.lttng2.ust.core.trace.LttngUstTrace)1 Test (org.junit.Test)1