fix(review): address PR #94 reviewer comments
Blockers: - SPDX/CProof copyright headers (7 files) - stanza-id non-uniqueness: warn-only, don't skip (matches SQLite) - fopen → open(O_EXCL|O_NOFOLLOW, 0600) + fdopen in export Medium: - log_info → log_warning for SQLite fallback - remove prefs_save() auto-save from backend switch - vtable null → log_warning in 4 dispatch functions - log_debug → log_warning + null error handling in export - rename failure → cons_show_error to user - remove unused total_skipped variable - LMC respects PREF_CORRECTION_ALLOW Low nits: - man page .SS fix + jabber.space URL - profrc.example simplified - show flatfile path on /logging flatfile - EXPORT_PROGRESS_INTERVAL constant (magic 500) - FF_META_PREFIX_ID/AID constants + FF_INDEX_STEP comment - buffer overflow guard on close[1]/close[2] - for-loop → memchr for JID resource scan - BOM check extracted to ff_skip_bom() (DRY) - index building extracted to _ff_maybe_index_line() - O_APPEND+O_EXCL comment rewritten - Makefile.am spaces → tabs
This commit is contained in:
@@ -1,12 +1,14 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
//
|
||||
// This file is part of CProof.
|
||||
// See LICENSE for the full GPLv3 text and the special OpenSSL linking exception.
|
||||
|
||||
/*
|
||||
* test_database_export.c
|
||||
*
|
||||
* Unit tests for the flatfile write→parse round-trip, escape/unescape helpers,
|
||||
* jid_to_dir path construction, and parser edge cases — these are the core
|
||||
* functions exercised by database_export.c during export and import.
|
||||
*
|
||||
* Copyright (C) 2026 Profanity Contributors
|
||||
* License: GPL-3.0-or-later (same as Profanity)
|
||||
*/
|
||||
|
||||
#include "prof_cmocka.h"
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
//
|
||||
// This file is part of CProof.
|
||||
// See LICENSE for the full GPLv3 text and the special OpenSSL linking exception.
|
||||
|
||||
/*
|
||||
* test_database_stress.c
|
||||
*
|
||||
* Stress tests for flat-file database I/O: rapid-fire writes, MUC messages
|
||||
* with many participants, large message bodies, index/cache correctness,
|
||||
* export/import merge under load, and deep LMC correction chains.
|
||||
*
|
||||
* Copyright (C) 2026 Profanity Contributors
|
||||
* License: GPL-3.0-or-later (same as Profanity)
|
||||
*/
|
||||
|
||||
#include "prof_cmocka.h"
|
||||
|
||||
Reference in New Issue
Block a user