Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit cf7638b8 authored by Serdar Kocdemir's avatar Serdar Kocdemir
Browse files

Remove CPU tracepoint test from GPU work test class

testReadTracingEvents test checks the CPU frequency tracepoint to
make sure the tracepoint system is available and functional, but
it's not useful to do this check within the GPU work related class.

Bug: 356851636
Flag: EXEMPT test
Test: GpuWorkTracepointTest#testReadTracingEvents
Change-Id: I672c14b761687912456941db441915414bfb4bca
parent 5058af67
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -39,29 +39,9 @@ import java.util.stream.Collectors;
@RunWith(DeviceJUnit4ClassRunner.class)
public class GpuWorkTracepointTest extends BaseHostJUnit4Test {

    private static final String CPU_FREQUENCY_TRACEPOINT_FORMAT_PATH =
            "/sys/kernel/tracing/events/power/cpu_frequency/format";
    private static final String GPU_WORK_PERIOD_TRACEPOINT_FORMAT_PATH =
            "/sys/kernel/tracing/events/power/gpu_work_period/format";

    @Test
    public void testReadTracingEvents() throws Exception {
        // Test |testGpuWorkPeriodTracepointFormat| is dependent on whether certain tracepoint
        // paths exist. This means the test will vacuously pass if the tracepoint file system is
        // inaccessible. Thus, as a basic check, we make sure the CPU frequency tracepoint format
        // is accessible. If not, something is probably fundamentally broken about the tracing
        // file system.
        CommandResult commandResult = getDevice().executeShellV2Command(
                String.format("cat %s", CPU_FREQUENCY_TRACEPOINT_FORMAT_PATH));

        assertEquals(String.format(
                        "Failed to read \"%s\". This probably means that the tracing file system "
                                + "is fundamentally broken in some way, possibly due to bad "
                                + "permissions.",
                        CPU_FREQUENCY_TRACEPOINT_FORMAT_PATH),
                commandResult.getStatus(), CommandStatus.SUCCESS);
    }

    @VsrTest(requirements={"VSR-3.3-004"})
    @RequiresDevice
    @Test