wifi: Cleanup and prepare for tests

This commit is contained in:
Vicki Pfau 2024-04-04 17:07:49 -07:00
parent 64129783dd
commit 05031b3ee1

View file

@ -131,12 +131,12 @@ pub async fn setup_iwd_config(want_override: bool) -> std::io::Result<()> {
if want_override { if want_override {
// Copy it in // Copy it in
// Make sure the folder exists // Make sure the folder exists
fs::create_dir_all(OVERRIDE_FOLDER).await?; fs::create_dir_all(path(OVERRIDE_FOLDER)).await?;
// Then write the contents into the file // Then write the contents into the file
fs::write(OVERRIDE_PATH, OVERRIDE_CONTENTS).await fs::write(path(OVERRIDE_PATH), OVERRIDE_CONTENTS).await
} else { } else {
// Delete it // Delete it
fs::remove_file(OVERRIDE_PATH).await fs::remove_file(path(OVERRIDE_PATH)).await
} }
} }
@ -168,7 +168,7 @@ async fn stop_tracing() -> Result<()> {
async fn start_tracing(buffer_size: u32) -> Result<()> { async fn start_tracing(buffer_size: u32) -> Result<()> {
// Start tracing // Start tracing
let size_str = format!("{}", buffer_size); let size_str = buffer_size.to_string();
run_script( run_script(
"start tracing", "start tracing",
TRACE_CMD_PATH, TRACE_CMD_PATH,