mirror of
https://git.jabber.space/devs/cproof.git
synced 2026-07-23 02:26:20 +00:00
refactor(tests): improve functional test documentation and cleanup
- Add detailed documentation about test isolation in functionaltests.c - Improve comments in proftest.c: buffer size explanation, stabber sync TODO - Add reference to stabber issue #1 for stbbr_wait_stopped() API - Document prof_output_regex() usage rationale in test_muc.c - Enhance ping_server test comments for clarity - Update CONTRIBUTING.md: fix function names (prof_output_regex, prof_timeout) - Remove redundant commented-out test configurations from ci-build.sh - Remove obsolete stabber recv suppressions from prof.supp (issue fixed) - Add clear explanation for disabled assertion in test_chat_session.c - Add comment explaining /connect max args in cmd_defs.c
This commit is contained in:
@@ -24,7 +24,11 @@ int fd = 0;
|
||||
int stub_port = 5230;
|
||||
pid_t child_pid = 0;
|
||||
|
||||
/* Buffer for accumulating output from profanity */
|
||||
/*
|
||||
* Buffer for accumulating output from profanity.
|
||||
* 64KB is sufficient for typical test output while keeping memory usage
|
||||
* reasonable. When full, older half is discarded (ring buffer behavior).
|
||||
*/
|
||||
#define OUTPUT_BUF_SIZE 65536
|
||||
static char output_buffer[OUTPUT_BUF_SIZE];
|
||||
static size_t output_len = 0;
|
||||
@@ -300,7 +304,12 @@ close_prof_test(void **state)
|
||||
}
|
||||
|
||||
stbbr_stop();
|
||||
// Give stabber time to release the port
|
||||
/*
|
||||
* TODO: Replace with proper synchronization.
|
||||
* stabber doesn't provide wait_stopped() API yet, so we use delay
|
||||
* to ensure the port is released before the next test starts.
|
||||
* See: https://git.jabber.space/devs/stabber/issues/3
|
||||
*/
|
||||
usleep(100000); // 100ms
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user