Search in sources :

Example 1 with DiskInfo

use of org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.inputoutput.IoTestCase.DiskInfo in project tracecompass by tracecompass.

the class InputOutputDiskTest method testDeviceStrings.

/**
 * Test the {@link Disk#getDeviceIdString()} and
 * {@link Disk#getDiskName()} methods
 */
@Test
public void testDeviceStrings() {
    InputOutputAnalysisModule module = setUp(fTestCase.getTraceFileName());
    for (Entry<Integer, DiskInfo> deviceInfo : fTestCase.getDiskInfo().entrySet()) {
        Integer deviceId = deviceInfo.getKey();
        DiskInfo diskInfo = deviceInfo.getValue();
        Disk disk = getDisk(module, deviceId);
        assertNotNull(disk);
        assertEquals("Device ID string for " + deviceId, diskInfo.getDeviceString(), disk.getDeviceIdString());
        assertEquals("Disk name string for " + deviceId, diskInfo.getDeviceName(), disk.getDiskName());
        assertEquals("Disk activity for " + deviceId, diskInfo.hasActivity(), disk.hasActivity());
    }
}
Also used : DiskInfo(org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.inputoutput.IoTestCase.DiskInfo) InputOutputAnalysisModule(org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.InputOutputAnalysisModule) Disk(org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.Disk) Test(org.junit.Test)

Aggregations

DiskInfo (org.eclipse.tracecompass.analysis.os.linux.core.tests.stubs.inputoutput.IoTestCase.DiskInfo)1 Disk (org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.Disk)1 InputOutputAnalysisModule (org.eclipse.tracecompass.internal.analysis.os.linux.core.inputoutput.InputOutputAnalysisModule)1 Test (org.junit.Test)1