CI: Fix clippy warnings, env var mismatch in pid1 tests, narrow workflow triggers #21

Open
opened 2026-02-26 17:55:45 +00:00 by mik-tf · 0 comments
Member

Problem

The build.yaml and test.yaml CI workflows have pre-existing failures:

1. Clippy warnings in pid1 integration tests

tests/integration/tests/pid1_behavior.rs triggers clippy lints:

  • zombie_processes: Child processes are .kill()ed but never .wait()ed
  • collapsible_if: nested if blocks that can be combined

2. Env var mismatch in pid1 integration tests

The pid1 binary (crates/zinit_pid1/src/main.rs:300) reads ZINIT_OPENRPC_BIN to find the server binary, but the integration tests (pid1_behavior.rs:38,99,165) pass ZINIT_SERVER_BIN instead. This causes pid1 to fall back to hardcoded paths (/sbin/zinit_openrpc) which don't exist in CI.

3. Workflow triggers too broad

build.yaml and test.yaml trigger on push: branches: ["*"]. Should be narrowed to [development, main] to match build-linux.yaml.

Fix

  • Fix clippy warnings (add .wait(), flatten nested ifs)
  • Change ZINIT_SERVER_BIN to ZINIT_OPENRPC_BIN in pid1_behavior.rs
  • Update README reference
  • Narrow push triggers to [development, main]

Ref #19

## Problem The `build.yaml` and `test.yaml` CI workflows have pre-existing failures: ### 1. Clippy warnings in pid1 integration tests `tests/integration/tests/pid1_behavior.rs` triggers clippy lints: - `zombie_processes`: `Child` processes are `.kill()`ed but never `.wait()`ed - `collapsible_if`: nested `if` blocks that can be combined ### 2. Env var mismatch in pid1 integration tests The pid1 binary (`crates/zinit_pid1/src/main.rs:300`) reads `ZINIT_OPENRPC_BIN` to find the server binary, but the integration tests (`pid1_behavior.rs:38,99,165`) pass `ZINIT_SERVER_BIN` instead. This causes pid1 to fall back to hardcoded paths (`/sbin/zinit_openrpc`) which don't exist in CI. ### 3. Workflow triggers too broad `build.yaml` and `test.yaml` trigger on `push: branches: ["*"]`. Should be narrowed to `[development, main]` to match `build-linux.yaml`. ## Fix - Fix clippy warnings (add `.wait()`, flatten nested ifs) - Change `ZINIT_SERVER_BIN` to `ZINIT_OPENRPC_BIN` in pid1_behavior.rs - Update README reference - Narrow push triggers to `[development, main]` Ref #19
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
geomind_code/zinit#21
No description provided.