1
0
mirror of https://github.com/samba-team/samba.git synced 2025-01-11 05:18:09 +03:00
samba-mirror/ctdb/tests/UNIT/cunit/rb_test_001.sh
Martin Schwenke 667265b685 ctdb-tests: Limit red-black tree test to 5s of random inserts
rb_test_001.sh runs for 60s even though rb_tree.c is almost never
modified.  This generally extends test time by an unreasonable amount
of time.

Add an optional timeout (in seconds) argument to rb_test, defaulting
to 60, and pass 5 from rb_test_001.sh.  If anyone ever significantly
updates rb_tree.c then they can run rb_test directly with its default
60s timeout... or for as long as they like.

Reported-by: Volker Lendecke <vl@samba.org>
Signed-off-by: Martin Schwenke <mschwenke@ddn.com>
Reviewed-by: Volker Lendecke <vl@samba.org>

Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Thu Feb 29 13:20:40 UTC 2024 on atb-devel-224
2024-02-29 13:20:40 +00:00

34 lines
425 B
Bash
Executable File

#!/bin/sh
timeout=5
. "${TEST_SCRIPTS_DIR}/unit.sh"
output="\
testing trbt_insertarray32_callback
traverse data:3
traverse data:2
traverse data:1
deleting key4
traverse data:3
traverse data:2
traverse data:1
deleting key2
traverse data:3
traverse data:1
deleting key3
traverse data:3
deleting key1
run random insert and delete for ${timeout} seconds
deleting all entries"
ok "$output"
unit_test rb_test "$timeout"