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:
2026-01-05 18:29:41 +03:00
parent 730d46da16
commit 8e8d715734
9 changed files with 47 additions and 74 deletions

View File

@@ -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;
}