[INFO] cloning repository https://github.com/evant/adp [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/evant/adp" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fevant%2Fadp", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fevant%2Fadp'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] ee4c901bf25e9a98c3c5560485f191b58f7c207f [INFO] testing evant/adp against beta-2022-04-10 for beta-1.61-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fevant%2Fadp" "/workspace/builds/worker-31/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-31/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/evant/adp on toolchain beta-2022-04-10 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+beta-2022-04-10" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/evant/adp [INFO] finished tweaking git repo https://github.com/evant/adp [INFO] tweaked toml for git repo https://github.com/evant/adp written to /workspace/builds/worker-31/source/Cargo.toml [INFO] crate git repo https://github.com/evant/adp already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+beta-2022-04-10" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-31/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-31/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:b0c94ce3c1162fcb8e57cac5b65ec2f72eabb1eebea4fcc35e269e823f681646" "/opt/rustwide/cargo-home/bin/cargo" "+beta-2022-04-10" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 8337803f1fa93e8d50e66fdc790f63665b53208d4796ba5e88fd22cf550b806a [INFO] running `Command { std: "docker" "start" "-a" "8337803f1fa93e8d50e66fdc790f63665b53208d4796ba5e88fd22cf550b806a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8337803f1fa93e8d50e66fdc790f63665b53208d4796ba5e88fd22cf550b806a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8337803f1fa93e8d50e66fdc790f63665b53208d4796ba5e88fd22cf550b806a", kill_on_drop: false }` [INFO] [stdout] 8337803f1fa93e8d50e66fdc790f63665b53208d4796ba5e88fd22cf550b806a [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-31/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-31/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:b0c94ce3c1162fcb8e57cac5b65ec2f72eabb1eebea4fcc35e269e823f681646" "/opt/rustwide/cargo-home/bin/cargo" "+beta-2022-04-10" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 786461423ce377bf5e61824ab3f80bca2e6dcb301e0b5de893245248aabd49f5 [INFO] running `Command { std: "docker" "start" "-a" "786461423ce377bf5e61824ab3f80bca2e6dcb301e0b5de893245248aabd49f5", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Compiling libc v0.2.104 [INFO] [stderr] Compiling cfg-if v1.0.0 [INFO] [stderr] Compiling lazy_static v1.4.0 [INFO] [stderr] Compiling proc-macro2 v1.0.30 [INFO] [stderr] Compiling autocfg v1.0.1 [INFO] [stderr] Compiling unicode-xid v0.2.2 [INFO] [stderr] Compiling crossbeam-utils v0.8.5 [INFO] [stderr] Compiling syn v1.0.80 [INFO] [stderr] Compiling crossbeam-epoch v0.9.5 [INFO] [stderr] Compiling getrandom v0.1.16 [INFO] [stderr] Compiling rayon-core v1.9.1 [INFO] [stderr] Compiling scopeguard v1.1.0 [INFO] [stderr] Compiling ppv-lite86 v0.2.14 [INFO] [stderr] Compiling once_cell v1.8.0 [INFO] [stderr] Compiling either v1.6.1 [INFO] [stderr] Compiling sysinfo v0.20.5 [INFO] [stderr] Compiling anyhow v1.0.44 [INFO] [stderr] Compiling pin-project-lite v0.2.7 [INFO] [stderr] Compiling ansi_term v0.12.1 [INFO] [stderr] Compiling tracing-core v0.1.21 [INFO] [stderr] Compiling sharded-slab v0.1.4 [INFO] [stderr] Compiling thread_local v1.1.3 [INFO] [stderr] Compiling memoffset v0.6.4 [INFO] [stderr] Compiling rayon v1.5.1 [INFO] [stderr] Compiling crossbeam-channel v0.5.1 [INFO] [stderr] Compiling tracing-subscriber v0.2.25 [INFO] [stderr] Compiling num_cpus v1.13.0 [INFO] [stderr] Compiling errno v0.2.7 [INFO] [stderr] Compiling dirs-sys v0.3.6 [INFO] [stderr] Compiling fs2 v0.4.3 [INFO] [stderr] Compiling process_control v3.1.0 [INFO] [stderr] Compiling quote v1.0.10 [INFO] [stderr] Compiling crossbeam-deque v0.8.1 [INFO] [stderr] Compiling dirs v4.0.0 [INFO] [stderr] Compiling rand_core v0.5.1 [INFO] [stderr] Compiling rand_chacha v0.2.2 [INFO] [stderr] Compiling rand v0.7.3 [INFO] [stderr] Compiling retry v1.3.0 [INFO] [stderr] Compiling thiserror-impl v1.0.30 [INFO] [stderr] Compiling tracing-attributes v0.1.18 [INFO] [stderr] Compiling ambassador v0.2.1 [INFO] [stderr] Compiling thiserror v1.0.30 [INFO] [stderr] Compiling tracing v0.1.29 [INFO] [stderr] Compiling named-semaphore v0.1.0 [INFO] [stderr] Compiling adp v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: field is never read: `guard` [INFO] [stdout] --> src/main.rs:107:5 [INFO] [stdout] | [INFO] [stdout] 107 | guard: SemaphoreGuard<'a>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] note: `Resource` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] --> src/main.rs:103:10 [INFO] [stdout] | [INFO] [stdout] 103 | #[derive(Debug)] [INFO] [stdout] | ^^^^^ [INFO] [stdout] = note: this warning originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 36.33s [INFO] running `Command { std: "docker" "inspect" "786461423ce377bf5e61824ab3f80bca2e6dcb301e0b5de893245248aabd49f5", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "786461423ce377bf5e61824ab3f80bca2e6dcb301e0b5de893245248aabd49f5", kill_on_drop: false }` [INFO] [stdout] 786461423ce377bf5e61824ab3f80bca2e6dcb301e0b5de893245248aabd49f5 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-31/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-31/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:b0c94ce3c1162fcb8e57cac5b65ec2f72eabb1eebea4fcc35e269e823f681646" "/opt/rustwide/cargo-home/bin/cargo" "+beta-2022-04-10" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 2ca408872e9ceebde89496e0ae6150d55095b70113a10139d3d2c7eb482a146b [INFO] running `Command { std: "docker" "start" "-a" "2ca408872e9ceebde89496e0ae6150d55095b70113a10139d3d2c7eb482a146b", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Compiling fnv v1.0.7 [INFO] [stderr] Compiling strsim v0.10.0 [INFO] [stderr] Compiling serde v1.0.130 [INFO] [stderr] Compiling proc-macro2 v0.4.30 [INFO] [stderr] Compiling ident_case v1.0.1 [INFO] [stderr] Compiling unicode-xid v0.1.0 [INFO] [stderr] Compiling syn v0.15.44 [INFO] [stderr] Compiling try-block v0.1.0 [INFO] [stderr] Compiling temp_testdir v0.2.3 [INFO] [stderr] Compiling darling_core v0.12.4 [INFO] [stderr] Compiling quote v0.6.13 [INFO] [stderr] Compiling toml v0.5.8 [INFO] [stderr] Compiling darling_macro v0.12.4 [INFO] [stderr] Compiling proc-macro-crate v0.1.5 [INFO] [stderr] Compiling darling v0.12.4 [INFO] [stderr] Compiling derive_builder_core v0.10.2 [INFO] [stderr] Compiling derive_builder_macro v0.10.2 [INFO] [stderr] Compiling function_name-proc-macro v0.2.0 [INFO] [stderr] Compiling derive_builder v0.10.2 [INFO] [stderr] Compiling function_name v0.2.0 [INFO] [stderr] Compiling adp v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `Read` [INFO] [stdout] --> src/lockfile.rs:127:27 [INFO] [stdout] | [INFO] [stdout] 127 | use std::io::{Cursor, Read, Result, Write}; [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `Write` [INFO] [stdout] --> src/lockfile.rs:127:41 [INFO] [stdout] | [INFO] [stdout] 127 | use std::io::{Cursor, Read, Result, Write}; [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `guard` [INFO] [stdout] --> src/main.rs:107:5 [INFO] [stdout] | [INFO] [stdout] 107 | guard: SemaphoreGuard<'a>, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] note: `Resource` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stdout] --> src/main.rs:103:10 [INFO] [stdout] | [INFO] [stdout] 103 | #[derive(Debug)] [INFO] [stdout] | ^^^^^ [INFO] [stdout] = note: this warning originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished test [unoptimized + debuginfo] target(s) in 3m 27s [INFO] [stderr] Executable unittests src/main.rs (/opt/rustwide/target/debug/deps/adp-138bef39502d92d5) [INFO] running `Command { std: "docker" "inspect" "2ca408872e9ceebde89496e0ae6150d55095b70113a10139d3d2c7eb482a146b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2ca408872e9ceebde89496e0ae6150d55095b70113a10139d3d2c7eb482a146b", kill_on_drop: false }` [INFO] [stdout] 2ca408872e9ceebde89496e0ae6150d55095b70113a10139d3d2c7eb482a146b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-31/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-31/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=warn" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:b0c94ce3c1162fcb8e57cac5b65ec2f72eabb1eebea4fcc35e269e823f681646" "/opt/rustwide/cargo-home/bin/cargo" "+beta-2022-04-10" "test" "--frozen", kill_on_drop: false }` [INFO] [stdout] 29291db94ba1a0dce7aa6db141fd1f556b8b60e2d6b9d69db490568f251357ad [INFO] running `Command { std: "docker" "start" "-a" "29291db94ba1a0dce7aa6db141fd1f556b8b60e2d6b9d69db490568f251357ad", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] warning: unused import: `Read` [INFO] [stderr] --> src/lockfile.rs:127:27 [INFO] [stderr] | [INFO] [stderr] 127 | use std::io::{Cursor, Read, Result, Write}; [INFO] [stderr] | ^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(unused_imports)]` on by default [INFO] [stderr] [INFO] [stderr] warning: unused import: `Write` [INFO] [stderr] --> src/lockfile.rs:127:41 [INFO] [stderr] | [INFO] [stderr] 127 | use std::io::{Cursor, Read, Result, Write}; [INFO] [stderr] | ^^^^^ [INFO] [stderr] [INFO] [stderr] warning: field is never read: `guard` [INFO] [stderr] --> src/main.rs:107:5 [INFO] [stderr] | [INFO] [stderr] 107 | guard: SemaphoreGuard<'a>, [INFO] [stderr] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stderr] | [INFO] [stderr] = note: `#[warn(dead_code)]` on by default [INFO] [stderr] note: `Resource` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis [INFO] [stderr] --> src/main.rs:103:10 [INFO] [stderr] | [INFO] [stderr] 103 | #[derive(Debug)] [INFO] [stderr] | ^^^^^ [INFO] [stderr] = note: this warning originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info) [INFO] [stderr] [INFO] [stderr] warning: `adp` (bin "adp" test) generated 3 warnings [INFO] [stderr] Finished test [unoptimized + debuginfo] target(s) in 3.49s [INFO] [stderr] Running unittests src/main.rs (/opt/rustwide/target/debug/deps/adp-138bef39502d92d5) [INFO] [stdout] [INFO] [stdout] running 13 tests [INFO] [stdout] test lockfile::tests::acquires_entry_some ... ok [INFO] [stdout] test lockfile::tests::acquires_entry_none ... ok [INFO] [stdout] test lockfile::tests::reads_entries ... ok [INFO] [stdout] test lockfile::tests::removes_old_entries ... ok [INFO] [stdout] 2022-04-15T07:53:08.726000Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}: adp: try_acquire_resource start [INFO] [stdout] 2022-04-15T07:53:08.726526Z DEBUG read{reader=[115, 101, 114, 105, 97, 108, 49, 10, 115, 101, 114, 105, 97, 108, 50, 58, 50, 10, 115, 101, 114, 105, 97, 108, 51, 10]}: adp::lockfile: entries=serial1,serial2:2,serial3 [INFO] [stdout] 2022-04-15T07:53:08.729904Z DEBUG read{reader=[115, 101, 114, 105, 97, 108, 49, 10, 115, 101, 114, 105, 97, 108, 50, 58, 50, 10]}: adp::lockfile: entries=serial1,serial2:2 [INFO] [stdout] 2022-04-15T07:53:08.730070Z DEBUG update{self=LockFileEntries({"serial1": None, "serial2": Some(2)}) serials=["serial1", "serial2", "serial3"]}: adp::lockfile: remove=serial1 [INFO] [stdout] 2022-04-15T07:53:08.730120Z DEBUG update{self=LockFileEntries({"serial1": None, "serial2": Some(2)}) serials=["serial1", "serial2", "serial3"]}: adp::lockfile: remove=serial2 [INFO] [stdout] 2022-04-15T07:53:08.730161Z DEBUG update{self=LockFileEntries({"serial1": None, "serial2": Some(2)}) serials=["serial1", "serial2", "serial3"]}: adp::lockfile: insert=serial3 [INFO] [stdout] 2022-04-15T07:53:08.730646Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}: adp: try_acquire_resource start [INFO] [stdout] 2022-04-15T07:53:08.730770Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}: adp: serials=serial2 [INFO] [stdout] 2022-04-15T07:53:08.730880Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}: adp: lock_file=File { fd: 3, path: "/tmp/rstest.1/adp.lock", read: true, write: true } [INFO] [stdout] test lockfile::tests::inserts_new_entries ... ok [INFO] [stdout] 2022-04-15T07:53:08.731129Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}:read{reader=BufReader { reader: File { fd: 3, path: "/tmp/rstest.1/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial1,serial2 [INFO] [stdout] 2022-04-15T07:53:08.731248Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}:update{self=LockFileEntries({"serial1": None, "serial2": None}) serials=["serial2"]}: adp::lockfile: remove=serial1 [INFO] [stdout] 2022-04-15T07:53:08.731314Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}:update{self=LockFileEntries({"serial1": None, "serial2": None}) serials=["serial2"]}: adp::lockfile: remove=serial2 [INFO] [stdout] 2022-04-15T07:53:08.731414Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}: adp: serial=Some("serial2") entries=serial2:1 [INFO] [stdout] 2022-04-15T07:53:08.731468Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}: adp: value=0 adjust_to=1 [INFO] [stdout] 2022-04-15T07:53:08.731511Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}: adp: value=1 [INFO] [stdout] 2022-04-15T07:53:08.731672Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}:write{self=LockFileEntries({"serial2": Some(1)}) writer=BufWriter { writer: File { fd: 3, path: "/tmp/rstest.1/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial2" pid=Some(1) [INFO] [stdout] 2022-04-15T07:53:08.733988Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}: adp: try_acquire_resource start [INFO] [stdout] 2022-04-15T07:53:08.734100Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}: adp: serials=serial1 [INFO] [stdout] 2022-04-15T07:53:08.734165Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}: adp: lock_file=File { fd: 3, path: "/tmp/rstest.2/adp.lock", read: true, write: true } [INFO] [stdout] 2022-04-15T07:53:08.734316Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}:read{reader=BufReader { reader: File { fd: 3, path: "/tmp/rstest.2/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial1 [INFO] [stdout] 2022-04-15T07:53:08.734449Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}:update{self=LockFileEntries({"serial1": None}) serials=["serial1"]}: adp::lockfile: remove=serial1 [INFO] [stdout] 2022-04-15T07:53:08.734539Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}: adp: serial=Some("serial1") entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.734586Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}: adp: value=0 adjust_to=1 [INFO] [stdout] 2022-04-15T07:53:08.734622Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}: adp: value=1 [INFO] [stdout] 2022-04-15T07:53:08.727687Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}: adp: serials=serial1 [INFO] [stdout] 2022-04-15T07:53:08.735323Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}: adp: lock_file=File { fd: 4, path: "/tmp/rstest/adp.lock", read: true, write: true } [INFO] [stdout] 2022-04-15T07:53:08.737159Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}: adp: try_acquire_resource start [INFO] [stdout] 2022-04-15T07:53:08.737258Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}: adp: serials=serial1 [INFO] [stdout] 2022-04-15T07:53:08.737330Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}: adp: lock_file=File { fd: 5, path: "/tmp/rstest.3/adp.lock", read: true, write: true } [INFO] [stdout] 2022-04-15T07:53:08.737514Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}:read{reader=BufReader { reader: File { fd: 5, path: "/tmp/rstest.3/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.737654Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}:update{self=LockFileEntries({"serial1": Some(1)}) serials=["serial1"]}: adp::lockfile: remove=serial1 [INFO] [stdout] 2022-04-15T07:53:08.737752Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}: adp: check=serial1 [INFO] [stdout] 2022-04-15T07:53:08.741810Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}:write{self=LockFileEntries({"serial1": Some(1)}) writer=BufWriter { writer: File { fd: 3, path: "/tmp/rstest.2/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=Some(1) [INFO] [stdout] 2022-04-15T07:53:08.743283Z DEBUG write{self=LockFileEntries({"serial1": None, "serial2": Some(2), "serial3": None}) writer=Cursor { inner: [], pos: 0 }}: adp::lockfile: serial="serial1" pid=None [INFO] [stdout] 2022-04-15T07:53:08.743530Z DEBUG write{self=LockFileEntries({"serial1": None, "serial2": Some(2), "serial3": None}) writer=Cursor { inner: [], pos: 0 }}: adp::lockfile: serial="serial2" pid=Some(2) [INFO] [stdout] 2022-04-15T07:53:08.743574Z DEBUG write{self=LockFileEntries({"serial1": None, "serial2": Some(2), "serial3": None}) writer=Cursor { inner: [], pos: 0 }}: adp::lockfile: serial="serial3" pid=None [INFO] [stdout] 2022-04-15T07:53:08.743957Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}:read{reader=BufReader { reader: File { fd: 4, path: "/tmp/rstest/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries= [INFO] [stdout] 2022-04-15T07:53:08.744123Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}:update{self=LockFileEntries({}) serials=["serial1"]}: adp::lockfile: insert=serial1 [INFO] [stdout] 2022-04-15T07:53:08.744217Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}: adp: serial=Some("serial1") entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.744281Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}: adp: value=0 adjust_to=1 [INFO] [stdout] 2022-04-15T07:53:08.744326Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}: adp: value=1 [INFO] [stdout] test lockfile::tests::writes_entries ... ok [INFO] [stdout] 2022-04-15T07:53:08.744545Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}:write{self=LockFileEntries({"serial1": Some(1)}) writer=BufWriter { writer: File { fd: 4, path: "/tmp/rstest/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=Some(1) [INFO] [stdout] 2022-04-15T07:53:08.744768Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}:release{self=LockFileEntries({"serial1": Some(1)}) serial="serial1"}: adp::lockfile: release=serial1 [INFO] [stdout] 2022-04-15T07:53:08.744858Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}: adp: serial=Some("serial1") entries=serial1:2 [INFO] [stdout] 2022-04-15T07:53:08.744915Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}: adp: value=0 adjust_to=1 [INFO] [stdout] 2022-04-15T07:53:08.744958Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}: adp: value=1 [INFO] [stdout] 2022-04-15T07:53:08.745293Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}: adp: try_acquire_resource end [INFO] [stdout] 2022-04-15T07:53:08.745347Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" } pid=1}: adp: resource=Some(Resource { serial: "serial2", app: App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" }, guard: SemaphoreGuard { name: "obtains_the_correct_resource_when_device_is_removed" } }) [INFO] [stdout] 2022-04-15T07:53:08.745493Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}: adp: try_acquire_resource end [INFO] [stdout] 2022-04-15T07:53:08.745543Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" } pid=1}: adp: resource=Some(Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" }, guard: SemaphoreGuard { name: "single_device_single_run_second_time" } }) [INFO] [stdout] 2022-04-15T07:53:08.745801Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" }, guard: SemaphoreGuard { name: "single_device_single_run_second_time" } }}:read{reader=BufReader { reader: File { fd: 4, path: "/tmp/rstest.2/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.745878Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" }, guard: SemaphoreGuard { name: "single_device_single_run_second_time" } }}: adp: serial=serial1 entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.745948Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" }, guard: SemaphoreGuard { name: "single_device_single_run_second_time" } }}:release{self=LockFileEntries({"serial1": Some(1)}) serial="serial1"}: adp::lockfile: release=serial1 [INFO] [stdout] 2022-04-15T07:53:08.746016Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" }, guard: SemaphoreGuard { name: "single_device_single_run_second_time" } }}: adp: serial=serial1 entries=serial1 [INFO] [stdout] 2022-04-15T07:53:08.750844Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}:write{self=LockFileEntries({"serial1": Some(2)}) writer=BufWriter { writer: File { fd: 5, path: "/tmp/rstest.3/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=Some(2) [INFO] [stdout] 2022-04-15T07:53:08.751270Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_second_time"} , lock_file_path: "/tmp/rstest.2/adp.lock" }, guard: SemaphoreGuard { name: "single_device_single_run_second_time" } }}:write{self=LockFileEntries({"serial1": None}) writer=BufWriter { writer: File { fd: 4, path: "/tmp/rstest.2/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=None [INFO] [stdout] 2022-04-15T07:53:08.755520Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: try_acquire_resource start [INFO] [stdout] 2022-04-15T07:53:08.755643Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: serials=serial1 [INFO] [stdout] 2022-04-15T07:53:08.755824Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: lock_file=File { fd: 5, path: "/tmp/rstest.4/adp.lock", read: true, write: true } [INFO] [stdout] 2022-04-15T07:53:08.755979Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:read{reader=BufReader { reader: File { fd: 5, path: "/tmp/rstest.4/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries= [INFO] [stdout] 2022-04-15T07:53:08.756041Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}: adp: try_acquire_resource start [INFO] [stdout] 2022-04-15T07:53:08.756093Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:update{self=LockFileEntries({}) serials=["serial1"]}: adp::lockfile: insert=serial1 [INFO] [stdout] 2022-04-15T07:53:08.756181Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: serial=Some("serial1") entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.756181Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}: adp: serials=serial1,serial2 [INFO] [stdout] 2022-04-15T07:53:08.756238Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: value=0 adjust_to=1 [INFO] [stdout] 2022-04-15T07:53:08.756286Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: value=1 [INFO] [stdout] 2022-04-15T07:53:08.756321Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}: adp: lock_file=File { fd: 4, path: "/tmp/rstest.5/adp.lock", read: true, write: true } [INFO] [stdout] 2022-04-15T07:53:08.756446Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:write{self=LockFileEntries({"serial1": Some(1)}) writer=BufWriter { writer: File { fd: 5, path: "/tmp/rstest.4/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=Some(1) [INFO] [stdout] 2022-04-15T07:53:08.756548Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}:read{reader=BufReader { reader: File { fd: 4, path: "/tmp/rstest.5/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries= [INFO] [stdout] 2022-04-15T07:53:08.756674Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}:update{self=LockFileEntries({}) serials=["serial1", "serial2"]}: adp::lockfile: insert=serial1 [INFO] [stdout] 2022-04-15T07:53:08.756762Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}:update{self=LockFileEntries({}) serials=["serial1", "serial2"]}: adp::lockfile: insert=serial2 [INFO] [stdout] 2022-04-15T07:53:08.756768Z DEBUG release{self=Resource { serial: "serial2", app: App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" }, guard: SemaphoreGuard { name: "obtains_the_correct_resource_when_device_is_removed" } }}:read{reader=BufReader { reader: File { fd: 3, path: "/tmp/rstest.1/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial2:1 [INFO] [stdout] 2022-04-15T07:53:08.756847Z DEBUG release{self=Resource { serial: "serial2", app: App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" }, guard: SemaphoreGuard { name: "obtains_the_correct_resource_when_device_is_removed" } }}: adp: serial=serial2 entries=serial2:1 [INFO] [stdout] 2022-04-15T07:53:08.756848Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}: adp: serial=Some("serial1") entries=serial1:1,serial2 [INFO] [stdout] 2022-04-15T07:53:08.756906Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}: adp: value=0 adjust_to=2 [INFO] [stdout] 2022-04-15T07:53:08.756917Z DEBUG release{self=Resource { serial: "serial2", app: App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" }, guard: SemaphoreGuard { name: "obtains_the_correct_resource_when_device_is_removed" } }}:release{self=LockFileEntries({"serial2": Some(1)}) serial="serial2"}: adp::lockfile: release=serial2 [INFO] [stdout] 2022-04-15T07:53:08.756950Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}: adp: value=2 [INFO] [stdout] 2022-04-15T07:53:08.756983Z DEBUG release{self=Resource { serial: "serial2", app: App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" }, guard: SemaphoreGuard { name: "obtains_the_correct_resource_when_device_is_removed" } }}: adp: serial=serial2 entries=serial2 [INFO] [stdout] 2022-04-15T07:53:08.757102Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}:write{self=LockFileEntries({"serial1": Some(1), "serial2": None}) writer=BufWriter { writer: File { fd: 4, path: "/tmp/rstest.5/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=Some(1) [INFO] [stdout] 2022-04-15T07:53:08.757128Z DEBUG release{self=Resource { serial: "serial2", app: App { runtime: FakeRuntime { devices: ["serial2"], processes: [] }, sem: Semaphore{ name: "obtains_the_correct_resource_when_device_is_removed"} , lock_file_path: "/tmp/rstest.1/adp.lock" }, guard: SemaphoreGuard { name: "obtains_the_correct_resource_when_device_is_removed" } }}:write{self=LockFileEntries({"serial2": None}) writer=BufWriter { writer: File { fd: 3, path: "/tmp/rstest.1/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial2" pid=None [INFO] [stdout] 2022-04-15T07:53:08.757165Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}:write{self=LockFileEntries({"serial1": Some(1), "serial2": None}) writer=BufWriter { writer: File { fd: 4, path: "/tmp/rstest.5/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial2" pid=None [INFO] [stdout] 2022-04-15T07:53:08.757777Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}: adp: try_acquire_resource start [INFO] [stdout] 2022-04-15T07:53:08.757884Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}: adp: serials=serial1 [INFO] [stdout] 2022-04-15T07:53:08.757988Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}: adp: lock_file=File { fd: 3, path: "/tmp/rstest.6/adp.lock", read: true, write: true } [INFO] [stdout] 2022-04-15T07:53:08.758127Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}:read{reader=BufReader { reader: File { fd: 3, path: "/tmp/rstest.6/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries= [INFO] [stdout] 2022-04-15T07:53:08.758232Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}:update{self=LockFileEntries({}) serials=["serial1"]}: adp::lockfile: insert=serial1 [INFO] [stdout] 2022-04-15T07:53:08.758314Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}: adp: serial=Some("serial1") entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.758369Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}: adp: value=0 adjust_to=1 [INFO] [stdout] 2022-04-15T07:53:08.758411Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}: adp: value=1 [INFO] [stdout] 2022-04-15T07:53:08.758547Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}:write{self=LockFileEntries({"serial1": Some(1)}) writer=BufWriter { writer: File { fd: 3, path: "/tmp/rstest.6/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=Some(1) [INFO] [stdout] 2022-04-15T07:53:08.761275Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}: adp: try_acquire_resource end [INFO] [stdout] 2022-04-15T07:53:08.761341Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=1}: adp: resource=Some(Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" }, guard: SemaphoreGuard { name: "resource_blocks_until_one_is_released" } }) [INFO] [stdout] 2022-04-15T07:53:08.761659Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}: adp: try_acquire_resource end [INFO] [stdout] 2022-04-15T07:53:08.761701Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" } pid=2}: adp: resource=Some(Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "obtains_resource_if_process_is_no_longer_running"} , lock_file_path: "/tmp/rstest.3/adp.lock" }, guard: SemaphoreGuard { name: "obtains_resource_if_process_is_no_longer_running" } }) [INFO] [stdout] 2022-04-15T07:53:08.762052Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: try_acquire_resource end [INFO] [stdout] 2022-04-15T07:53:08.762095Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: resource=Some(Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }) [INFO] [stdout] 2022-04-15T07:53:08.762359Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }}:read{reader=BufReader { reader: File { fd: 4, path: "/tmp/rstest.4/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.762447Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }}: adp: serial=serial1 entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.762520Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }}:release{self=LockFileEntries({"serial1": Some(1)}) serial="serial1"}: adp::lockfile: release=serial1 [INFO] [stdout] 2022-04-15T07:53:08.762640Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }}: adp: serial=serial1 entries=serial1 [INFO] [stdout] 2022-04-15T07:53:08.763380Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}: adp: try_acquire_resource end [INFO] [stdout] 2022-04-15T07:53:08.763463Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" } pid=1}: adp: resource=Some(Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" }, guard: SemaphoreGuard { name: "single_device_single_run_first_time" } }) [INFO] [stdout] 2022-04-15T07:53:08.763789Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" }, guard: SemaphoreGuard { name: "single_device_single_run_first_time" } }}:read{reader=BufReader { reader: File { fd: 7, path: "/tmp/rstest.6/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.763864Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" }, guard: SemaphoreGuard { name: "single_device_single_run_first_time" } }}: adp: serial=serial1 entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.763935Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" }, guard: SemaphoreGuard { name: "single_device_single_run_first_time" } }}:release{self=LockFileEntries({"serial1": Some(1)}) serial="serial1"}: adp::lockfile: release=serial1 [INFO] [stdout] 2022-04-15T07:53:08.764000Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" }, guard: SemaphoreGuard { name: "single_device_single_run_first_time" } }}: adp: serial=serial1 entries=serial1 [INFO] [stdout] 2022-04-15T07:53:08.764122Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}: adp: try_acquire_resource end [INFO] [stdout] 2022-04-15T07:53:08.764134Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}: adp: try_acquire_resource start [INFO] [stdout] 2022-04-15T07:53:08.764389Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}: adp: serials=serial1 [INFO] [stdout] 2022-04-15T07:53:08.764520Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}: adp: lock_file=File { fd: 3, path: "/tmp/rstest/adp.lock", read: true, write: true } [INFO] [stdout] 2022-04-15T07:53:08.764722Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }}:write{self=LockFileEntries({"serial1": None}) writer=BufWriter { writer: File { fd: 4, path: "/tmp/rstest.4/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=None [INFO] [stdout] 2022-04-15T07:53:08.764801Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:read{reader=BufReader { reader: File { fd: 3, path: "/tmp/rstest/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.764943Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:update{self=LockFileEntries({"serial1": Some(1)}) serials=["serial1"]}: adp::lockfile: remove=serial1 [INFO] [stdout] 2022-04-15T07:53:08.765027Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}: adp: check=serial1 [INFO] [stdout] 2022-04-15T07:53:08.765074Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}: adp: serial=None entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.765125Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}: adp: value=0 [INFO] [stdout] 2022-04-15T07:53:08.765234Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_single_run_first_time"} , lock_file_path: "/tmp/rstest.6/adp.lock" }, guard: SemaphoreGuard { name: "single_device_single_run_first_time" } }}:write{self=LockFileEntries({"serial1": None}) writer=BufWriter { writer: File { fd: 7, path: "/tmp/rstest.6/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=None [INFO] [stdout] 2022-04-15T07:53:08.765693Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: try_acquire_resource start [INFO] [stdout] 2022-04-15T07:53:08.765785Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: serials=serial1 [INFO] [stdout] 2022-04-15T07:53:08.765875Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: lock_file=File { fd: 4, path: "/tmp/rstest.4/adp.lock", read: true, write: true } [INFO] [stdout] 2022-04-15T07:53:08.766050Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:read{reader=BufReader { reader: File { fd: 4, path: "/tmp/rstest.4/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial1 [INFO] [stdout] 2022-04-15T07:53:08.766161Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:update{self=LockFileEntries({"serial1": None}) serials=["serial1"]}: adp::lockfile: remove=serial1 [INFO] [stdout] 2022-04-15T07:53:08.766241Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: serial=Some("serial1") entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.766291Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: value=1 [INFO] [stdout] 2022-04-15T07:53:08.764160Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=1}: adp: resource=Some(Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" }, guard: SemaphoreGuard { name: "multiple_devices_multiple_runs_first_time" } }) [INFO] [stdout] 2022-04-15T07:53:08.769939Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}: adp: try_acquire_resource start [INFO] [stdout] 2022-04-15T07:53:08.770038Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}: adp: serials=serial1,serial2 [INFO] [stdout] 2022-04-15T07:53:08.770138Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}: adp: lock_file=File { fd: 5, path: "/tmp/rstest.5/adp.lock", read: true, write: true } [INFO] [stdout] 2022-04-15T07:53:08.770352Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}:read{reader=BufReader { reader: File { fd: 5, path: "/tmp/rstest.5/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial1:1,serial2 [INFO] [stdout] 2022-04-15T07:53:08.770487Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}:update{self=LockFileEntries({"serial1": Some(1), "serial2": None}) serials=["serial1", "serial2"]}: adp::lockfile: remove=serial1 [INFO] [stdout] test tests::obtains_resource_if_process_is_no_longer_running ... ok [INFO] [stdout] test tests::obtains_the_correct_resource_when_device_is_removed ... ok [INFO] [stdout] test tests::single_device_single_run_second_time ... ok [INFO] [stdout] 2022-04-15T07:53:08.770426Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:write{self=LockFileEntries({"serial1": Some(1)}) writer=BufWriter { writer: File { fd: 4, path: "/tmp/rstest.4/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=Some(1) [INFO] [stdout] 2022-04-15T07:53:08.770558Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}:update{self=LockFileEntries({"serial1": Some(1), "serial2": None}) serials=["serial1", "serial2"]}: adp::lockfile: remove=serial2 [INFO] [stdout] 2022-04-15T07:53:08.770663Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}: adp: serial=Some("serial2") entries=serial1:1,serial2:2 [INFO] [stdout] 2022-04-15T07:53:08.770729Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}: adp: value=1 [INFO] [stdout] 2022-04-15T07:53:08.770927Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}:write{self=LockFileEntries({"serial1": Some(1), "serial2": Some(2)}) writer=BufWriter { writer: File { fd: 5, path: "/tmp/rstest.5/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=Some(1) [INFO] [stdout] test tests::single_device_single_run_first_time ... ok [INFO] [stdout] 2022-04-15T07:53:08.771087Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}:write{self=LockFileEntries({"serial1": Some(1), "serial2": Some(2)}) writer=BufWriter { writer: File { fd: 5, path: "/tmp/rstest.5/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial2" pid=Some(2) [INFO] [stdout] 2022-04-15T07:53:08.773040Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}: adp: try_acquire_resource end [INFO] [stdout] 2022-04-15T07:53:08.773140Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" } pid=2}: adp: resource=Some(Resource { serial: "serial2", app: App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" }, guard: SemaphoreGuard { name: "multiple_devices_multiple_runs_first_time" } }) [INFO] [stdout] 2022-04-15T07:53:08.773646Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" }, guard: SemaphoreGuard { name: "multiple_devices_multiple_runs_first_time" } }}:read{reader=BufReader { reader: File { fd: 3, path: "/tmp/rstest.5/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial1:1,serial2:2 [INFO] [stdout] 2022-04-15T07:53:08.773730Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" }, guard: SemaphoreGuard { name: "multiple_devices_multiple_runs_first_time" } }}: adp: serial=serial1 entries=serial1:1,serial2:2 [INFO] [stdout] 2022-04-15T07:53:08.773810Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" }, guard: SemaphoreGuard { name: "multiple_devices_multiple_runs_first_time" } }}:release{self=LockFileEntries({"serial1": Some(1), "serial2": Some(2)}) serial="serial1"}: adp::lockfile: release=serial1 [INFO] [stdout] 2022-04-15T07:53:08.773893Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" }, guard: SemaphoreGuard { name: "multiple_devices_multiple_runs_first_time" } }}: adp: serial=serial1 entries=serial1,serial2:2 [INFO] [stdout] 2022-04-15T07:53:08.777874Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" }, guard: SemaphoreGuard { name: "multiple_devices_multiple_runs_first_time" } }}:write{self=LockFileEntries({"serial1": None, "serial2": Some(2)}) writer=BufWriter { writer: File { fd: 3, path: "/tmp/rstest.5/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=None [INFO] [stdout] 2022-04-15T07:53:08.777995Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" }, guard: SemaphoreGuard { name: "multiple_devices_multiple_runs_first_time" } }}:write{self=LockFileEntries({"serial1": None, "serial2": Some(2)}) writer=BufWriter { writer: File { fd: 3, path: "/tmp/rstest.5/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial2" pid=Some(2) [INFO] [stdout] 2022-04-15T07:53:08.783728Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: try_acquire_resource end [INFO] [stdout] 2022-04-15T07:53:08.783861Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: resource=Some(Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }) [INFO] [stdout] 2022-04-15T07:53:08.784176Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }}:read{reader=BufReader { reader: File { fd: 4, path: "/tmp/rstest.4/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.784248Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }}: adp: serial=serial1 entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.784332Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }}:release{self=LockFileEntries({"serial1": Some(1)}) serial="serial1"}: adp::lockfile: release=serial1 [INFO] [stdout] 2022-04-15T07:53:08.784394Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }}: adp: serial=serial1 entries=serial1 [INFO] [stdout] 2022-04-15T07:53:08.785106Z DEBUG release{self=Resource { serial: "serial2", app: App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" }, guard: SemaphoreGuard { name: "multiple_devices_multiple_runs_first_time" } }}:read{reader=BufReader { reader: File { fd: 3, path: "/tmp/rstest.5/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial1,serial2:2 [INFO] [stdout] 2022-04-15T07:53:08.785197Z DEBUG release{self=Resource { serial: "serial2", app: App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" }, guard: SemaphoreGuard { name: "multiple_devices_multiple_runs_first_time" } }}: adp: serial=serial2 entries=serial1,serial2:2 [INFO] [stdout] 2022-04-15T07:53:08.785262Z DEBUG release{self=Resource { serial: "serial2", app: App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" }, guard: SemaphoreGuard { name: "multiple_devices_multiple_runs_first_time" } }}:release{self=LockFileEntries({"serial1": None, "serial2": Some(2)}) serial="serial2"}: adp::lockfile: release=serial2 [INFO] [stdout] 2022-04-15T07:53:08.785333Z DEBUG release{self=Resource { serial: "serial2", app: App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" }, guard: SemaphoreGuard { name: "multiple_devices_multiple_runs_first_time" } }}: adp: serial=serial2 entries=serial1,serial2 [INFO] [stdout] 2022-04-15T07:53:08.785481Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }}:write{self=LockFileEntries({"serial1": None}) writer=BufWriter { writer: File { fd: 4, path: "/tmp/rstest.4/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=None [INFO] [stdout] 2022-04-15T07:53:08.785664Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: try_acquire_resource start [INFO] [stdout] 2022-04-15T07:53:08.785742Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: serials=serial1 [INFO] [stdout] 2022-04-15T07:53:08.785805Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: lock_file=File { fd: 4, path: "/tmp/rstest.4/adp.lock", read: true, write: true } [INFO] [stdout] 2022-04-15T07:53:08.787852Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:read{reader=BufReader { reader: File { fd: 4, path: "/tmp/rstest.4/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial1 [INFO] [stdout] 2022-04-15T07:53:08.787999Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:update{self=LockFileEntries({"serial1": None}) serials=["serial1"]}: adp::lockfile: remove=serial1 [INFO] [stdout] 2022-04-15T07:53:08.788096Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: serial=Some("serial1") entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.788154Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: value=1 [INFO] [stdout] 2022-04-15T07:53:08.788435Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}:write{self=LockFileEntries({"serial1": Some(1)}) writer=BufWriter { writer: File { fd: 4, path: "/tmp/rstest.4/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=Some(1) [INFO] [stdout] 2022-04-15T07:53:08.788702Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: try_acquire_resource end [INFO] [stdout] 2022-04-15T07:53:08.788741Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" } pid=1}: adp: resource=Some(Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }) [INFO] [stdout] 2022-04-15T07:53:08.787425Z DEBUG release{self=Resource { serial: "serial2", app: App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" }, guard: SemaphoreGuard { name: "multiple_devices_multiple_runs_first_time" } }}:write{self=LockFileEntries({"serial1": None, "serial2": None}) writer=BufWriter { writer: File { fd: 3, path: "/tmp/rstest.5/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=None [INFO] [stdout] 2022-04-15T07:53:08.788913Z DEBUG release{self=Resource { serial: "serial2", app: App { runtime: FakeRuntime { devices: ["serial1", "serial2"], processes: [] }, sem: Semaphore{ name: "multiple_devices_multiple_runs_first_time"} , lock_file_path: "/tmp/rstest.5/adp.lock" }, guard: SemaphoreGuard { name: "multiple_devices_multiple_runs_first_time" } }}:write{self=LockFileEntries({"serial1": None, "serial2": None}) writer=BufWriter { writer: File { fd: 3, path: "/tmp/rstest.5/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial2" pid=None [INFO] [stdout] 2022-04-15T07:53:08.788960Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }}:read{reader=BufReader { reader: File { fd: 4, path: "/tmp/rstest.4/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.789041Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }}: adp: serial=serial1 entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:08.789124Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }}:release{self=LockFileEntries({"serial1": Some(1)}) serial="serial1"}: adp::lockfile: release=serial1 [INFO] [stdout] 2022-04-15T07:53:08.789195Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }}: adp: serial=serial1 entries=serial1 [INFO] [stdout] 2022-04-15T07:53:08.790420Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [] }, sem: Semaphore{ name: "single_device_three_runs"} , lock_file_path: "/tmp/rstest.4/adp.lock" }, guard: SemaphoreGuard { name: "single_device_three_runs" } }}:write{self=LockFileEntries({"serial1": None}) writer=BufWriter { writer: File { fd: 4, path: "/tmp/rstest.4/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=None [INFO] [stdout] test tests::multiple_devices_multiple_runs_first_time ... ok [INFO] [stdout] test tests::single_device_three_runs ... ok [INFO] [stdout] 2022-04-15T07:53:09.262045Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" }, guard: SemaphoreGuard { name: "resource_blocks_until_one_is_released" } }}:read{reader=BufReader { reader: File { fd: 3, path: "/tmp/rstest/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:09.262159Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" }, guard: SemaphoreGuard { name: "resource_blocks_until_one_is_released" } }}: adp: serial=serial1 entries=serial1:1 [INFO] [stdout] 2022-04-15T07:53:09.262230Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" }, guard: SemaphoreGuard { name: "resource_blocks_until_one_is_released" } }}:release{self=LockFileEntries({"serial1": Some(1)}) serial="serial1"}: adp::lockfile: release=serial1 [INFO] [stdout] 2022-04-15T07:53:09.262296Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" }, guard: SemaphoreGuard { name: "resource_blocks_until_one_is_released" } }}: adp: serial=serial1 entries=serial1 [INFO] [stdout] 2022-04-15T07:53:09.262477Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" }, guard: SemaphoreGuard { name: "resource_blocks_until_one_is_released" } }}:write{self=LockFileEntries({"serial1": None}) writer=BufWriter { writer: File { fd: 3, path: "/tmp/rstest/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=None [INFO] [stdout] 2022-04-15T07:53:09.262742Z DEBUG adp::tests: sem=1 [INFO] [stdout] 2022-04-15T07:53:09.262876Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}: adp: try_acquire_resource end [INFO] [stdout] 2022-04-15T07:53:09.262954Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}: adp: resource=None [INFO] [stdout] 2022-04-15T07:53:09.263012Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}: adp: try_acquire_resource start [INFO] [stdout] 2022-04-15T07:53:09.263116Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}: adp: serials=serial1 [INFO] [stdout] 2022-04-15T07:53:09.263227Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}: adp: lock_file=File { fd: 3, path: "/tmp/rstest/adp.lock", read: true, write: true } [INFO] [stdout] 2022-04-15T07:53:09.263432Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:read{reader=BufReader { reader: File { fd: 3, path: "/tmp/rstest/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial1 [INFO] [stdout] 2022-04-15T07:53:09.263540Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:update{self=LockFileEntries({"serial1": None}) serials=["serial1"]}: adp::lockfile: remove=serial1 [INFO] [stdout] 2022-04-15T07:53:09.263616Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}: adp: serial=Some("serial1") entries=serial1:2 [INFO] [stdout] 2022-04-15T07:53:09.263664Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}: adp: value=1 [INFO] [stdout] 2022-04-15T07:53:09.263852Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:try_acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}:write{self=LockFileEntries({"serial1": Some(2)}) writer=BufWriter { writer: File { fd: 3, path: "/tmp/rstest/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=Some(2) [INFO] [stdout] 2022-04-15T07:53:09.264119Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}: adp: try_acquire_resource end [INFO] [stdout] 2022-04-15T07:53:09.264159Z DEBUG acquire_resource{self=App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" } pid=2}: adp: resource=Some(Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" }, guard: SemaphoreGuard { name: "resource_blocks_until_one_is_released" } }) [INFO] [stdout] 2022-04-15T07:53:09.264223Z DEBUG adp::tests: send=serial1 [INFO] [stdout] 2022-04-15T07:53:09.264394Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" }, guard: SemaphoreGuard { name: "resource_blocks_until_one_is_released" } }}:read{reader=BufReader { reader: File { fd: 3, path: "/tmp/rstest/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: entries=serial1:2 [INFO] [stdout] 2022-04-15T07:53:09.264471Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" }, guard: SemaphoreGuard { name: "resource_blocks_until_one_is_released" } }}: adp: serial=serial1 entries=serial1:2 [INFO] [stdout] 2022-04-15T07:53:09.264531Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" }, guard: SemaphoreGuard { name: "resource_blocks_until_one_is_released" } }}:release{self=LockFileEntries({"serial1": Some(2)}) serial="serial1"}: adp::lockfile: release=serial1 [INFO] [stdout] 2022-04-15T07:53:09.264586Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" }, guard: SemaphoreGuard { name: "resource_blocks_until_one_is_released" } }}: adp: serial=serial1 entries=serial1 [INFO] [stdout] 2022-04-15T07:53:09.264892Z DEBUG release{self=Resource { serial: "serial1", app: App { runtime: FakeRuntime { devices: ["serial1"], processes: [1] }, sem: Semaphore{ name: "resource_blocks_until_one_is_released"} , lock_file_path: "/tmp/rstest/adp.lock" }, guard: SemaphoreGuard { name: "resource_blocks_until_one_is_released" } }}:write{self=LockFileEntries({"serial1": None}) writer=BufWriter { writer: File { fd: 3, path: "/tmp/rstest/adp.lock", read: true, write: true }, buffer: 0/8192 }}: adp::lockfile: serial="serial1" pid=None [INFO] [stdout] test tests::resource_blocks_until_one_is_released ... ok [INFO] [stdout] [INFO] [stdout] test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.55s [INFO] [stdout] [INFO] running `Command { std: "docker" "inspect" "29291db94ba1a0dce7aa6db141fd1f556b8b60e2d6b9d69db490568f251357ad", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "29291db94ba1a0dce7aa6db141fd1f556b8b60e2d6b9d69db490568f251357ad", kill_on_drop: false }` [INFO] [stdout] 29291db94ba1a0dce7aa6db141fd1f556b8b60e2d6b9d69db490568f251357ad