Commit e2b8699d authored by Evan Hunt's avatar Evan Hunt

migrate t_timers to lib/isc/tests/timer_test

parent 874e2fc7
......@@ -16,5 +16,4 @@ keycreate
keydelete
gssapi_krb
t_tasks
t_timers
makejournal
......@@ -32,8 +32,8 @@ ISCCFGDEPLIBS = ../../lib/isccfg/libisccfg.@A@
LIBS = @LIBS@
SUBDIR = db dst names \
rbt resolver tasks timers system @PKCS11_TOOLS@ optional
SUBDIR = db dst names rbt resolver tasks system \
@PKCS11_TOOLS@ optional
TESTDIRS = system
......
# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# See the COPYRIGHT file distributed with this work for additional
# information regarding copyright ownership.
srcdir = @srcdir@
VPATH = @srcdir@
top_srcdir = @top_srcdir@
@BIND9_MAKE_INCLUDES@
CINCLUDES = ${TEST_INCLUDES} ${ISC_INCLUDES}
CDEFINES =
CWARNINGS =
ISCLIBS = ../../../lib/isc/libisc.@A@ @ISC_OPENSSL_LIBS@
ISCDEPLIBS = ../../../lib/isc/libisc.@A@
DEPLIBS = ${ISCDEPLIBS}
LIBS = ${ISCLIBS} @LIBS@
TLIB = ../../../lib/tests/libt_api.@A@
TARGETS = t_timers@EXEEXT@
SRCS = t_timers.c
@BIND9_MAKE_RULES@
t_timers@EXEEXT@: t_timers.@O@ ${DEPLIBS} ${TLIB}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ t_timers.@O@ ${TLIB} ${LIBS}
test: t_timers@EXEEXT@
-@./t_timers@EXEEXT@ -c @top_srcdir@/t_config -b @srcdir@ -q 60 -a
testhelp:
@./t_timers@EXEEXT@ -h
clean distclean::
rm -f ${TARGETS}
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\t_timers.c">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|@PLATFORM@">
<Configuration>Debug</Configuration>
<Platform>@PLATFORM@</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|@PLATFORM@">
<Configuration>Release</Configuration>
<Platform>@PLATFORM@</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{4E6F5A7C-89AA-4259-99DB-F89DAE418B3F}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>t_timers</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
<LinkIncremental>true</LinkIncremental>
<OutDir>..\..\..\..\Build\$(Configuration)\</OutDir>
<IntDir>.\$(Configuration)\</IntDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\..\..\..\Build\$(Configuration)\</OutDir>
<IntDir>.\$(Configuration)\</IntDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@PLATFORM@'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<FunctionLevelLinking>true</FunctionLevelLinking>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<BrowseInformation>true</BrowseInformation>
<AdditionalIncludeDirectories>.\;..\..\..\..\;@LIBXML2_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\tests\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<OutputFile>..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<AdditionalLibraryDirectories>..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\tests\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@LIBXML2_LIB@libisc.lib;libtests.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|@PLATFORM@'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>@INTRINSIC@</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InlineFunctionExpansion>OnlyExplicitInline</InlineFunctionExpansion>
<WholeProgramOptimization>false</WholeProgramOptimization>
<StringPooling>true</StringPooling>
<PrecompiledHeaderOutputFile>.\$(Configuration)\$(TargetName).pch</PrecompiledHeaderOutputFile>
<AssemblerListingLocation>.\$(Configuration)\</AssemblerListingLocation>
<ObjectFileName>.\$(Configuration)\</ObjectFileName>
<ProgramDataBaseFileName>$(OutDir)$(TargetName).pdb</ProgramDataBaseFileName>
<AdditionalIncludeDirectories>.\;..\..\..\..\;@LIBXML2_INC@..\..\..\..\lib\isc\win32;..\..\..\..\lib\isc\win32\include;..\..\..\..\lib\isc\include;..\..\..\..\lib\tests\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<CompileAs>CompileAsC</CompileAs>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>false</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<OutputFile>..\..\..\..\Build\$(Configuration)\$(TargetName)$(TargetExt)</OutputFile>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>..\..\..\..\lib\isc\win32\$(Configuration);..\..\..\..\lib\tests\win32\$(Configuration);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>@LIBXML2_LIB@libisc.lib;libtests.lib;ws2_32.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="..\t_timers.c" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
</Project>
\ No newline at end of file
......@@ -24157,7 +24157,7 @@ ac_config_commands="$ac_config_commands chmod"
# elsewhere if there's a good reason for doing so.
#
ac_config_files="$ac_config_files make/Makefile make/mkdep Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/delv/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/python/Makefile bin/python/isc/Makefile bin/python/isc/utils.py bin/python/isc/tests/Makefile bin/python/dnssec-checkds.py bin/python/dnssec-coverage.py bin/python/dnssec-keymgr.py bin/python/isc/__init__.py bin/python/isc/checkds.py bin/python/isc/coverage.py bin/python/isc/dnskey.py bin/python/isc/eventlist.py bin/python/isc/keydict.py bin/python/isc/keyevent.py bin/python/isc/keymgr.py bin/python/isc/keyseries.py bin/python/isc/keyzone.py bin/python/isc/policy.py bin/python/isc/rndc.py bin/python/isc/tests/dnskey_test.py bin/python/isc/tests/policy_test.py bin/rndc/Makefile bin/tests/Makefile bin/tests/db/Makefile bin/tests/dst/Makefile bin/tests/dst/Kdh.+002+18602.key bin/tests/dst/Kdh.+002+18602.private bin/tests/dst/Kdh.+002+48957.key bin/tests/dst/Kdh.+002+48957.private bin/tests/dst/Ktest.+001+00002.key bin/tests/dst/Ktest.+001+54622.key bin/tests/dst/Ktest.+001+54622.private bin/tests/dst/Ktest.+003+23616.key bin/tests/dst/Ktest.+003+23616.private bin/tests/dst/Ktest.+003+49667.key bin/tests/dst/dst_2_data bin/tests/dst/t2_data_1 bin/tests/dst/t2_data_2 bin/tests/dst/t2_dsasig bin/tests/dst/t2_rsasig bin/tests/headerdep_test.sh bin/tests/names/Makefile bin/tests/optional/Makefile bin/tests/pkcs11/Makefile bin/tests/pkcs11/benchmarks/Makefile bin/tests/rbt/Makefile bin/tests/resolver/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlz/prereq.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile bin/tests/system/inline/checkdsa.sh bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tests/tasks/Makefile bin/tests/timers/Makefile bin/tests/virtual-time/Makefile bin/tests/virtual-time/conf.sh bin/tools/Makefile contrib/scripts/check-secure-delegation.pl contrib/scripts/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl isc-config.sh lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/$arch/Makefile lib/isc/$arch/include/Makefile lib/isc/$arch/include/isc/Makefile lib/isc/$thread_dir/Makefile lib/isc/$thread_dir/include/Makefile lib/isc/$thread_dir/include/isc/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/include/pk11/Makefile lib/isc/include/pkcs11/Makefile lib/isc/tests/Makefile lib/isc/nls/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isc/unix/include/pkcs11/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/isccfg/tests/Makefile lib/ns/Makefile lib/ns/include/Makefile lib/ns/include/ns/Makefile lib/ns/tests/Makefile lib/tests/Makefile lib/tests/include/Makefile lib/tests/include/tests/Makefile lib/samples/Makefile lib/samples/Makefile-postinstall unit/Makefile unit/unittest.sh"
ac_config_files="$ac_config_files make/Makefile make/mkdep Makefile bin/Makefile bin/check/Makefile bin/confgen/Makefile bin/confgen/unix/Makefile bin/delv/Makefile bin/dig/Makefile bin/dnssec/Makefile bin/named/Makefile bin/named/unix/Makefile bin/nsupdate/Makefile bin/pkcs11/Makefile bin/python/Makefile bin/python/isc/Makefile bin/python/isc/utils.py bin/python/isc/tests/Makefile bin/python/dnssec-checkds.py bin/python/dnssec-coverage.py bin/python/dnssec-keymgr.py bin/python/isc/__init__.py bin/python/isc/checkds.py bin/python/isc/coverage.py bin/python/isc/dnskey.py bin/python/isc/eventlist.py bin/python/isc/keydict.py bin/python/isc/keyevent.py bin/python/isc/keymgr.py bin/python/isc/keyseries.py bin/python/isc/keyzone.py bin/python/isc/policy.py bin/python/isc/rndc.py bin/python/isc/tests/dnskey_test.py bin/python/isc/tests/policy_test.py bin/rndc/Makefile bin/tests/Makefile bin/tests/db/Makefile bin/tests/dst/Makefile bin/tests/dst/Kdh.+002+18602.key bin/tests/dst/Kdh.+002+18602.private bin/tests/dst/Kdh.+002+48957.key bin/tests/dst/Kdh.+002+48957.private bin/tests/dst/Ktest.+001+00002.key bin/tests/dst/Ktest.+001+54622.key bin/tests/dst/Ktest.+001+54622.private bin/tests/dst/Ktest.+003+23616.key bin/tests/dst/Ktest.+003+23616.private bin/tests/dst/Ktest.+003+49667.key bin/tests/dst/dst_2_data bin/tests/dst/t2_data_1 bin/tests/dst/t2_data_2 bin/tests/dst/t2_dsasig bin/tests/dst/t2_rsasig bin/tests/headerdep_test.sh bin/tests/names/Makefile bin/tests/optional/Makefile bin/tests/pkcs11/Makefile bin/tests/pkcs11/benchmarks/Makefile bin/tests/rbt/Makefile bin/tests/resolver/Makefile bin/tests/system/Makefile bin/tests/system/conf.sh bin/tests/system/dlz/prereq.sh bin/tests/system/dlzexternal/Makefile bin/tests/system/dlzexternal/ns1/dlzs.conf bin/tests/system/dyndb/Makefile bin/tests/system/dyndb/driver/Makefile bin/tests/system/inline/checkdsa.sh bin/tests/system/pipelined/Makefile bin/tests/system/rndc/Makefile bin/tests/system/rpz/Makefile bin/tests/system/rsabigexponent/Makefile bin/tests/system/tkey/Makefile bin/tests/tasks/Makefile bin/tests/virtual-time/Makefile bin/tests/virtual-time/conf.sh bin/tools/Makefile contrib/scripts/check-secure-delegation.pl contrib/scripts/zone-edit.sh doc/Makefile doc/arm/Makefile doc/arm/noteversion.xml doc/arm/pkgversion.xml doc/arm/releaseinfo.xml doc/doxygen/Doxyfile doc/doxygen/Makefile doc/doxygen/doxygen-input-filter doc/misc/Makefile doc/tex/Makefile doc/tex/armstyle.sty doc/xsl/Makefile doc/xsl/isc-docbook-chunk.xsl doc/xsl/isc-docbook-html.xsl doc/xsl/isc-manpage.xsl doc/xsl/isc-notes-html.xsl isc-config.sh lib/Makefile lib/bind9/Makefile lib/bind9/include/Makefile lib/bind9/include/bind9/Makefile lib/dns/Makefile lib/dns/include/Makefile lib/dns/include/dns/Makefile lib/dns/include/dst/Makefile lib/dns/tests/Makefile lib/irs/Makefile lib/irs/include/Makefile lib/irs/include/irs/Makefile lib/irs/include/irs/netdb.h lib/irs/include/irs/platform.h lib/irs/tests/Makefile lib/isc/$arch/Makefile lib/isc/$arch/include/Makefile lib/isc/$arch/include/isc/Makefile lib/isc/$thread_dir/Makefile lib/isc/$thread_dir/include/Makefile lib/isc/$thread_dir/include/isc/Makefile lib/isc/Makefile lib/isc/include/Makefile lib/isc/include/isc/Makefile lib/isc/include/isc/platform.h lib/isc/include/pk11/Makefile lib/isc/include/pkcs11/Makefile lib/isc/tests/Makefile lib/isc/nls/Makefile lib/isc/unix/Makefile lib/isc/unix/include/Makefile lib/isc/unix/include/isc/Makefile lib/isc/unix/include/pkcs11/Makefile lib/isccc/Makefile lib/isccc/include/Makefile lib/isccc/include/isccc/Makefile lib/isccfg/Makefile lib/isccfg/include/Makefile lib/isccfg/include/isccfg/Makefile lib/isccfg/tests/Makefile lib/ns/Makefile lib/ns/include/Makefile lib/ns/include/ns/Makefile lib/ns/tests/Makefile lib/tests/Makefile lib/tests/include/Makefile lib/tests/include/tests/Makefile lib/samples/Makefile lib/samples/Makefile-postinstall unit/Makefile unit/unittest.sh"
#
......@@ -25234,7 +25234,6 @@ do
"bin/tests/system/rsabigexponent/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/rsabigexponent/Makefile" ;;
"bin/tests/system/tkey/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/system/tkey/Makefile" ;;
"bin/tests/tasks/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/tasks/Makefile" ;;
"bin/tests/timers/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/timers/Makefile" ;;
"bin/tests/virtual-time/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tests/virtual-time/Makefile" ;;
"bin/tests/virtual-time/conf.sh") CONFIG_FILES="$CONFIG_FILES bin/tests/virtual-time/conf.sh" ;;
"bin/tools/Makefile") CONFIG_FILES="$CONFIG_FILES bin/tools/Makefile" ;;
......
......@@ -5351,7 +5351,6 @@ AC_CONFIG_FILES([
bin/tests/system/rsabigexponent/Makefile
bin/tests/system/tkey/Makefile
bin/tests/tasks/Makefile
bin/tests/timers/Makefile
bin/tests/virtual-time/Makefile
bin/tests/virtual-time/conf.sh
bin/tools/Makefile
......
......@@ -28,4 +28,5 @@ tp: socket_test
tp: symtab_test
tp: task_test
tp: taskpool_test
tp: timer_test
tp: time_test
......@@ -35,7 +35,7 @@ SRCS = isctest.c aes_test.c atomic_test.c buffer_test.c \
print_test.c queue_test.c radix_test.c random_test.c \
regex_test.c result_test.c safe_test.c sockaddr_test.c \
socket_test.c socket_test.c symtab_test.c task_test.c \
taskpool_test.c time_test.c
taskpool_test.c time_test.c timer_test.c
SUBDIRS =
TARGETS = aes_test@EXEEXT@ atomic_test@EXEEXT@ buffer_test@EXEEXT@ \
......@@ -47,7 +47,7 @@ TARGETS = aes_test@EXEEXT@ atomic_test@EXEEXT@ buffer_test@EXEEXT@ \
random_test@EXEEXT@ regex_test@EXEEXT@ result_test@EXEEXT@ \
safe_test@EXEEXT@ sockaddr_test@EXEEXT@ socket_test@EXEEXT@ \
socket_test@EXEEXT@ symtab_test@EXEEXT@ task_test@EXEEXT@ \
taskpool_test@EXEEXT@ time_test@EXEEXT@
taskpool_test@EXEEXT@ time_test@EXEEXT@ timer_test@EXEEXT@
@BIND9_MAKE_RULES@
......@@ -165,6 +165,10 @@ time_test@EXEEXT@: time_test.@O@ ${ISCDEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
time_test.@O@ ${ISCLIBS} ${LIBS}
timer_test@EXEEXT@: timer_test.@O@ isctest.@O@ ${ISCDEPLIBS}
${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} -o $@ \
timer_test.@O@ isctest.@O@ ${ISCLIBS} ${LIBS}
unit::
sh ${top_builddir}/unit/unittest.sh
......
......@@ -64,7 +64,7 @@ ATF_TC_BODY(atomic_xadd, tc) {
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
memset(counters, 0, sizeof(counters));
......@@ -126,7 +126,7 @@ ATF_TC_BODY(atomic_xaddq, tc) {
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
memset(counters, 0, sizeof(counters));
......@@ -196,7 +196,7 @@ ATF_TC_BODY(atomic_store, tc) {
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
memset(counters, 0, sizeof(counters));
......@@ -273,7 +273,7 @@ ATF_TC_BODY(atomic_storeq, tc) {
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
memset(counters, 0, sizeof(counters));
......
......@@ -31,7 +31,7 @@ ATF_TC_BODY(isc_buffer_reserve, tc) {
isc_result_t result;
isc_buffer_t *b;
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
b = NULL;
......@@ -105,7 +105,7 @@ ATF_TC_BODY(isc_buffer_reallocate, tc) {
isc_result_t result;
isc_buffer_t *b;
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
b = NULL;
......@@ -142,7 +142,7 @@ ATF_TC_BODY(isc_buffer_dynamic, tc) {
size_t last_length = 10;
int i;
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
b = NULL;
......@@ -205,7 +205,7 @@ ATF_TC_BODY(isc_buffer_printf, tc) {
isc_buffer_t *b, sb;
char buf[8];
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
/*
......
......@@ -28,7 +28,7 @@ ATF_TC_BODY(isc_counter, tc) {
isc_counter_t *counter = NULL;
int i;
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_counter_create(mctx, 0, &counter);
......
......@@ -9,12 +9,11 @@
* information regarding copyright ownership.
*/
/* $Id$ */
/*! \file */
#include <config.h>
#include <stdlib.h>
#include <time.h>
#include <isc/app.h>
......@@ -70,15 +69,24 @@ cleanup_managers(void) {
}
static isc_result_t
create_managers(void) {
create_managers(unsigned int workers) {
isc_result_t result;
char *p;
if (workers == 0) {
#ifdef ISC_PLATFORM_USETHREADS
ncpus = isc_os_ncpus();
workers = isc_os_ncpus();
#else
ncpus = 1;
workers = 1;
#endif
}
p = getenv("ISC_TASK_WORKERS");
if (p != NULL) {
workers = atoi(p);
}
CHECK(isc_taskmgr_create(mctx, ncpus, 0, &taskmgr));
CHECK(isc_taskmgr_create(mctx, workers, 0, &taskmgr));
CHECK(isc_task_create(taskmgr, 0, &maintask));
isc_taskmgr_setexcltask(taskmgr, maintask);
......@@ -92,7 +100,9 @@ create_managers(void) {
}
isc_result_t
isc_test_begin(FILE *logfile, isc_boolean_t start_managers) {
isc_test_begin(FILE *logfile, isc_boolean_t start_managers,
unsigned int workers)
{
isc_result_t result;
isc_mem_debugging |= ISC_MEM_DEBUGRECORD;
......@@ -127,8 +137,9 @@ isc_test_begin(FILE *logfile, isc_boolean_t start_managers) {
ncpus = 1;
#endif
if (start_managers)
CHECK(create_managers());
if (start_managers) {
CHECK(create_managers(workers));
}
return (ISC_R_SUCCESS);
......
......@@ -9,8 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id$ */
/*! \file */
#include <config.h>
......@@ -43,7 +41,18 @@ extern isc_socketmgr_t *socketmgr;
extern int ncpus;
isc_result_t
isc_test_begin(FILE *logfile, isc_boolean_t start_managers);
isc_test_begin(FILE *logfile, isc_boolean_t start_managers,
unsigned int workers);
/*%<
* Begin test, logging to 'logfile' or default if not specified.
*
* If 'start_managers' is set, start a task manager, timer manager,
* and socket manager.
*
* If 'workers' is zero, use the number of CPUs on the system as a default;
* otherwise, set up the task manager with the specified number of worker
* threads. The environment variable ISC_TASK_WORKERS overrides this value.
*/
void
isc_test_end(void);
......
......@@ -60,7 +60,7 @@ ATF_TC_BODY(isc_mem, tc) {
unsigned int i, j;
int rval;
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_mem_create(0, 0, &localmctx);
......@@ -152,7 +152,7 @@ ATF_TC_BODY(isc_mem_total, tc) {
ssize_t diff;
int i;
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
/* Local alloc, free */
......@@ -219,7 +219,7 @@ ATF_TC_BODY(isc_mem_inuse, tc) {
ssize_t diff;
void *ptr;
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
mctx2 = NULL;
......@@ -264,7 +264,7 @@ ATF_TC_BODY(isc_mem_noflags, tc) {
result = isc_stdio_open("mem.output", "w", &f);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_mem_createx2(0, 0, default_memalloc, default_memfree,
......@@ -316,7 +316,7 @@ ATF_TC_BODY(isc_mem_recordflag, tc) {
result = isc_stdio_open("mem.output", "w", &f);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_test_begin(NULL, ISC_FALSE);
result = isc_test_begin(NULL, ISC_FALSE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_mem_createx2(0, 0, default_memalloc, default_memfree,
......@@ -366,7 +366,7 @@ ATF_TC_BODY(isc_mem_traceflag, tc) {
f = freopen("mem.output", "w", stderr);
ATF_REQUIRE(f != NULL);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_mem_createx2(0, 0, default_memalloc, default_memfree,
......
......@@ -9,8 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id$ */
/*! \file */
#include <config.h>
......@@ -38,7 +36,7 @@ ATF_TC_BODY(parse_overflow, tc) {
isc_uint32_t output;
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_parse_uint32(&output, "1234567890", 10);
......
......@@ -9,8 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id$ */
/*! \file */
#include <config.h>
......@@ -60,7 +58,7 @@ ATF_TC_BODY(create_pool, tc) {
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_pool_create(mctx, 8, poolfree, poolinit, taskmgr, &pool);
......@@ -84,7 +82,7 @@ ATF_TC_BODY(expand_pool, tc) {
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_pool_create(mctx, 10, poolfree, poolinit, taskmgr, &pool1);
......@@ -138,7 +136,7 @@ ATF_TC_BODY(get_objects, tc) {
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_pool_create(mctx, 2, poolfree, poolinit, taskmgr, &pool);
......
......@@ -9,8 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id$ */
/*! \file */
#include <config.h>
......@@ -63,7 +61,7 @@ ATF_TC_BODY(queue_valid, tc) {
item_init(&four, 4);
item_init(&five, 5);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
ATF_CHECK(ISC_QUEUE_EMPTY(queue));
......
......@@ -38,7 +38,7 @@ ATF_TC_BODY(isc_radix_search, tc) {
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_radix_create(mctx, &radix, 32);
......
......@@ -41,7 +41,7 @@ ATF_TC_BODY(sockaddr_hash, tc) {
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
in.s_addr = inet_addr("127.0.0.1");
......
......@@ -157,7 +157,7 @@ ATF_TC_BODY(udp_sendto, tc) {
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
in.s_addr = inet_addr("127.0.0.1");
......@@ -232,7 +232,7 @@ ATF_TC_BODY(udp_dup, tc) {
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
in.s_addr = inet_addr("127.0.0.1");
......@@ -334,7 +334,7 @@ ATF_TC_BODY(udp_dscp_v4, tc) {
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
in.s_addr = inet_addr("127.0.0.1");
......@@ -439,7 +439,7 @@ ATF_TC_BODY(udp_dscp_v6, tc) {
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
n = inet_pton(AF_INET6, "::1", &in6.s6_addr);
......@@ -544,7 +544,7 @@ ATF_TC_BODY(tcp_dscp_v4, tc) {
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
in.s_addr = inet_addr("127.0.0.1");
......@@ -644,7 +644,7 @@ ATF_TC_BODY(tcp_dscp_v6, tc) {
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
n = inet_pton(AF_INET6, "::1", &in6.s6_addr);
......
......@@ -9,8 +9,6 @@
* information regarding copyright ownership.
*/
/* $Id$ */
/*! \file */
#include <config.h>
......@@ -50,7 +48,7 @@ ATF_TC_BODY(symtab_grow, tc) {
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_symtab_create(mctx, 3, undefine, NULL, ISC_FALSE, &st);
......
......@@ -71,7 +71,7 @@ ATF_TC_BODY(create_task, tc) {
UNUSED(tc);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_task_create(taskmgr, 0, &task);
......@@ -102,7 +102,7 @@ ATF_TC_BODY(all_events, tc) {
result = isc_mutex_init(&set_lock);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_task_create(taskmgr, 0, &task);
......@@ -158,7 +158,7 @@ ATF_TC_BODY(privileged_events, tc) {
result = isc_mutex_init(&set_lock);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
#ifdef ISC_PLATFORM_USETHREADS
......@@ -287,7 +287,7 @@ ATF_TC_BODY(privilege_drop, tc) {
result = isc_mutex_init(&set_lock);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);
result = isc_test_begin(NULL, ISC_TRUE);
result = isc_test_begin(NULL, ISC_TRUE, 0);
ATF_REQUIRE_EQ(result, ISC_R_SUCCESS);