dumpstate: add timeout for AoC memory dump

AoC memory dumps will take too long time and cause dumpstate board
timeout. Add 2s timeout for the memory dumps.

Bug: 216422700
Test: Triggered bugreport and checked dumpstate file.

Change-Id: Iedb49fa78caf7c5c54a9a1f69191d7441b7308ee
This commit is contained in:
SalmaxChang 2022-03-16 14:50:22 +08:00 committed by TreeHugger Robot
parent cf0372dc8b
commit dd1cd8388f

View file

@ -910,8 +910,8 @@ void DumpstateDevice::dumpAoCSection(int fd) {
DumpFileToFd(fd, "AoC audio wake", "/sys/devices/platform/19000000.aoc/control/audio_wakeup"); DumpFileToFd(fd, "AoC audio wake", "/sys/devices/platform/19000000.aoc/control/audio_wakeup");
DumpFileToFd(fd, "AoC logging wake", "/sys/devices/platform/19000000.aoc/control/logging_wakeup"); DumpFileToFd(fd, "AoC logging wake", "/sys/devices/platform/19000000.aoc/control/logging_wakeup");
DumpFileToFd(fd, "AoC hotword wake", "/sys/devices/platform/19000000.aoc/control/hotword_wakeup"); DumpFileToFd(fd, "AoC hotword wake", "/sys/devices/platform/19000000.aoc/control/hotword_wakeup");
DumpFileToFd(fd, "AoC memory exception wake", "/sys/devices/platform/19000000.aoc/control/memory_exception"); RunCommandToFd(fd, "AoC memory exception wake", {"/vendor/bin/sh", "-c", "cat /sys/devices/platform/19000000.aoc/control/memory_exception"}, CommandOptions::WithTimeout(2).Build());
DumpFileToFd(fd, "AoC memory votes", "/sys/devices/platform/19000000.aoc/control/memory_votes"); RunCommandToFd(fd, "AoC memory votes", {"/vendor/bin/sh", "-c", "cat /sys/devices/platform/19000000.aoc/control/memory_votes"}, CommandOptions::WithTimeout(2).Build());
} }
// Dump items related to sensors usf. // Dump items related to sensors usf.