1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-10 11:43:13 +02:00

tests: add fuzz testing on core functions (issue #1462)

This commit introduces fuzz testing, for now on core functions, with 4 new
targets that are built on demand with CMake option `ENABLE_FUZZ` (build of
these tests is disabled by default):

- weechat_core_calc_fuzzer
- weechat_core_crypto_fuzzer
- weechat_core_string_fuzzer
- weechat_core_utf8_fuzzer
This commit is contained in:
Sébastien Helleu
2025-05-05 07:07:24 +02:00
parent ceb6a007ff
commit 68d87f2b80
14 changed files with 641 additions and 18 deletions
+8
View File
@@ -91,6 +91,8 @@ The main WeeChat directories are:
|       typing/ | Typing plugin.
|       xfer/ | Xfer plugin (IRC DCC file/chat).
| tests/ | Tests.
|    fuzz/ | Fuzz testing.
| core/ | Fuzz testing for core functions.
|    unit/ | Unit tests.
|       core/ | Unit tests for core functions.
|       hook/ | Unit tests for hook functions.
@@ -415,6 +417,12 @@ WeeChat "core" is located in following directories:
|===
| Path/file | Description
| tests/ | Root of tests.
|    fuzz/ | Root of fuzz testing.
|       core/ | Root of fuzz testing for core.
|       calc-fuzzer.c | Fuzz testing: calculation of expressions.
|       crypto-fuzzer.c | Fuzz testing: cryptographic functions.
|       string-fuzzer.c | Fuzz testing: strings.
|       utf8-fuzzer.c | Fuzz testing: UTF-8.
|    unit/ | Root of unit tests.
|    tests.cpp | Program used to run all tests.
|    tests-record.cpp | Record and search in messages displayed.
+8
View File
@@ -92,6 +92,8 @@ Les répertoires principaux de WeeChat sont :
|       typing/ | Extension Typing.
|       xfer/ | Extension Xfer (IRC DCC fichier/discussion).
| tests/ | Tests.
|    fuzz/ | Fuzzing (tests à données aléatoires).
| core/ | Fuzzing pour les fonctions du cœur.
|    unit/ | Tests unitaires.
|       core/ | Tests unitaires pour les fonctions du cœur.
|       hook/ | Tests unitaires pour les fonctions hook.
@@ -416,6 +418,12 @@ Le cœur de WeeChat est situé dans les répertoires suivants :
|===
| Chemin/fichier | Description
| tests/ | Racine des tests.
|    fuzz/ | Racine du fuzzing (tests à données aléatoires).
|       core/ | Racine du fuzzing pour le cœur.
|       calc-fuzzer.c | Fuzzing: calcul d'expressions.
|       crypto-fuzzer.c | Fuzzing: fonctions cryptographiques.
|       string-fuzzer.c | Fuzzing: chaînes.
|       utf8-fuzzer.c | Fuzzing: UTF-8.
|    unit/ | Racine des tests unitaires.
|    tests.cpp | Programme utilisé pour lancer tous les tests.
|    tests-record.cpp | Enregistrement et recherche dans les messages affichés.
+16
View File
@@ -93,6 +93,10 @@ qweechat::
|       typing/ | typing プラグイン
|       xfer/ | xfer (IRC DCC ファイル/チャット)
| tests/ | テスト
// TRANSLATION MISSING
|    fuzz/ | Fuzz testing.
// TRANSLATION MISSING
| core/ | Fuzz testing for core functions.
|    unit/ | 単体テスト
|       core/ | コア関数の単体テスト
// TRANSLATION MISSING
@@ -456,6 +460,18 @@ WeeChat "core" は以下のディレクトリに配置されています:
|===
| パス/ファイル名 | 説明
| tests/ | テスト用のルートディレクトリ
// TRANSLATION MISSING
|    fuzz/ | Root of fuzz testing.
// TRANSLATION MISSING
|       core/ | Root of fuzz testing for core.
// TRANSLATION MISSING
|       calc-fuzzer.c | Fuzz testing: calculation of expressions.
// TRANSLATION MISSING
|       crypto-fuzzer.c | Fuzz testing: cryptographic functions.
// TRANSLATION MISSING
|       string-fuzzer.c | Fuzz testing: 文字列
// TRANSLATION MISSING
|       utf8-fuzzer.c | Fuzz testing: UTF-8.
|    unit/ | 単体テスト用のルートディレクトリ
|    tests.cpp | 全テストの実行時に使われるプログラム
// TRANSLATION MISSING
+16
View File
@@ -91,6 +91,10 @@ qweechat::
|       typing/ | Typing додатак.
|       xfer/ | Xfer додатак (IRC DCC фајл/разговор).
| tests/ | Тестови.
// TRANSLATION MISSING
|    fuzz/ | Fuzz testing.
// TRANSLATION MISSING
| core/ | Fuzz testing for core functions.
|    unit/ | Unit тестови.
|       core/ | Unit тестови за функције језгра.
// TRANSLATION MISSING
@@ -422,6 +426,18 @@ WeeChat „језгро” се налази у следећим директо
|===
| Путања/фајл | Опис
| tests/ | Корен тестова.
// TRANSLATION MISSING
|    fuzz/ | Root of fuzz testing.
// TRANSLATION MISSING
|       core/ | Root of fuzz testing for core.
// TRANSLATION MISSING
|       calc-fuzzer.c | Fuzz testing: калкулација израза.
// TRANSLATION MISSING
|       crypto-fuzzer.c | Fuzz testing: криптографске функције.
// TRANSLATION MISSING
|       string-fuzzer.c | Fuzz testing: стрингови.
// TRANSLATION MISSING
|       utf8-fuzzer.c | Fuzz testing: UTF-8.
|    unit/ | Корен unit тестова.
|    tests.cpp | Програм који се користи за извршавање свих тестова.
|    tests-record.cpp | Бележење и претрага у приказаним порукама.