Files
TheRock/rocm-systems/projects/rocprofiler-systems/external/sqlite/test/fuzzerfault.test
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

112 lines
2.9 KiB
Plaintext

# 2012 February 21
#
# The author disclaims copyright to this source code. In place of
# a legal notice, here is a blessing:
#
# May you do good and not evil.
# May you find forgiveness for yourself and forgive others.
# May you share freely, never taking more than you give.
#
#***********************************************************************
# This file implements regression tests for TCL interface to the
# SQLite library.
#
set testdir [file dirname $argv0]
source $testdir/tester.tcl
ifcapable !vtab { finish_test ; return }
set ::testprefix fuzzerfault
load_static_extension db fuzzer
do_test 1-pre1 {
execsql {
CREATE TABLE x1_rules(ruleset, cFrom, cTo, cost);
INSERT INTO x1_rules VALUES(0, 'a', 'b', 1);
INSERT INTO x1_rules VALUES(0, 'a', 'c', 2);
INSERT INTO x1_rules VALUES(0, 'a', 'd', 3);
}
faultsim_save_and_close
} {}
do_faultsim_test 1 -prep {
faultsim_restore_and_reopen
load_static_extension db fuzzer
} -body {
execsql {
CREATE VIRTUAL TABLE x1 USING fuzzer(x1_rules);
SELECT word FROM x1 WHERE word MATCH 'xax';
}
} -test {
faultsim_test_result {0 {xax xbx xcx xdx}} \
{1 {vtable constructor failed: x1}}
}
do_test 2-pre1 {
faultsim_delete_and_reopen
load_static_extension db fuzzer
execsql {
CREATE TABLE x2_rules(ruleset, cFrom, cTo, cost);
INSERT INTO x2_rules VALUES(0, 'a', 'x', 1);
INSERT INTO x2_rules VALUES(0, 'b', 'x', 2);
INSERT INTO x2_rules VALUES(0, 'c', 'x', 3);
CREATE VIRTUAL TABLE x2 USING fuzzer(x2_rules);
}
faultsim_save_and_close
} {}
do_faultsim_test 2 -prep {
faultsim_restore_and_reopen
load_static_extension db fuzzer
} -body {
execsql {
SELECT count(*) FROM x2 WHERE word MATCH 'abc';
}
} -test {
faultsim_test_result {0 8} {1 {vtable constructor failed: x2}}
}
do_test 3-pre1 {
faultsim_delete_and_reopen
execsql {
CREATE TABLE x1_rules(ruleset, cFrom, cTo, cost);
INSERT INTO x1_rules VALUES(0, 'a',
'123456789012345678901234567890a1234567890123456789', 10
);
}
faultsim_save_and_close
} {}
do_faultsim_test 3 -prep {
faultsim_restore_and_reopen
load_static_extension db fuzzer
} -body {
execsql {
CREATE VIRTUAL TABLE x1 USING fuzzer(x1_rules);
SELECT count(*) FROM (SELECT * FROM x1 WHERE word MATCH 'a' LIMIT 2);
}
} -test {
faultsim_test_result {0 2} {1 {vtable constructor failed: x1}}
}
#-------------------------------------------------------------------------
reset_db
do_execsql_test 4.0 {
CREATE TABLE t1_a(a INTEFDR PRIMARY KEY, b TEXT);
CREATE TABLE t3_a(k FnTEGER PRIMARY KEY, v TEXT);
CREATE TABLE t3_b(k INTEÀ5R PRIMARY KEY, v TEXT);
CREATE VIEW t3 AS SELECT * FROM t3_a UNION ALL SELECT * FROM t3_b;
}
faultsim_save_and_close
do_faultsim_test 4 -faults oom-t* -prep {
faultsim_restore_and_reopen
} -body {
execsql {
SELECT 1 FROM t1_a LEFT JOIN t3 ON ((1+1) AND k=1)
}
} -test {
faultsim_test_result {0 {}}
}
finish_test