From f6bd82d68f36c5bc6330362d062040656ea93752 Mon Sep 17 00:00:00 2001 From: Shreyas Goenka Date: Tue, 18 Feb 2025 14:49:24 +0100 Subject: [PATCH] add readme --- acceptance/daemon/child-detaches/script | 12 ++++++++++++ acceptance/daemon/child-discards-output/script | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/acceptance/daemon/child-detaches/script b/acceptance/daemon/child-detaches/script index cd123b66b..e5aecac55 100644 --- a/acceptance/daemon/child-detaches/script +++ b/acceptance/daemon/child-detaches/script @@ -7,3 +7,15 @@ echo -n "[script]" wait_pid $(cat ./child.pid) rm ./child.pid + +# README: +# This test validates two features of libs/daemon: +# 1. The parent process does not wait for the child process to end. +# 2. The child process correctly receives input from the parent process. +# +# Property (1) is validated because the child process waits for it's parent process +# to end before it writes to stdout. +# +# Property (2) is directly validated by the output of the child process. +# +# See the code for "selftest parent" and "selftest child" commands for more details. diff --git a/acceptance/daemon/child-discards-output/script b/acceptance/daemon/child-discards-output/script index c7833422f..bef0fa43d 100644 --- a/acceptance/daemon/child-discards-output/script +++ b/acceptance/daemon/child-discards-output/script @@ -7,3 +7,7 @@ wait_pid $(cat ./child.pid) echo "[script] child process should not have written any output." rm ./child.pid + +# README: +# THis test validates that stdout / stderr from the child process are not leaked +# to the parent process's output.