diff --git a/ci_config.json b/ci_config.json index f5bcc7611..4d16f0483 100644 --- a/ci_config.json +++ b/ci_config.json @@ -76,6 +76,14 @@ "boost" ] }, + "aws-c-common": { + "build_options": [ + "aws-c-common:tests=enabled" + ], + "alpine_packages": [ + "numactl-dev" + ] + }, "backward-cpp": { "alpine_packages": [ "binutils-dev" diff --git a/releases.json b/releases.json index 77ab5fbab..a5a587b2c 100644 --- a/releases.json +++ b/releases.json @@ -244,6 +244,14 @@ "0.4.1-1" ] }, + "aws-c-common": { + "dependency_names": [ + "aws-c-common" + ], + "versions": [ + "0.12.4-1" + ] + }, "backward-cpp": { "dependency_names": [ "backward-cpp", diff --git a/subprojects/aws-c-common.wrap b/subprojects/aws-c-common.wrap new file mode 100644 index 000000000..c3b2e5ce5 --- /dev/null +++ b/subprojects/aws-c-common.wrap @@ -0,0 +1,9 @@ +[wrap-file] +directory = aws-c-common-0.12.4 +source_url = https://github.com/awslabs/aws-c-common/archive/refs/tags/v0.12.4.tar.gz +source_filename = aws-c-common-0.12.4.tar.gz +source_hash = 0b7705a4d115663c3f485d353a75ed86e37583157585e5825d851af634b57fe3 +patch_directory = aws-c-common + +[provide] +dependency_names = aws-c-common diff --git a/subprojects/packagefiles/aws-c-common/generate_tests.py b/subprojects/packagefiles/aws-c-common/generate_tests.py new file mode 100644 index 000000000..b6816209f --- /dev/null +++ b/subprojects/packagefiles/aws-c-common/generate_tests.py @@ -0,0 +1,18 @@ +#!/usr/bin/env python3 + +import sys + +# Usage: generate_tests.py +if __name__ == '__main__': + with open(sys.argv[1], 'r') as test_names: + tests = [line.strip() for line in test_names if line.strip()] + with open(sys.argv[2], 'w') as out: + out.write('/* Auto-generated file, do not edit */\n\n#include \n\n') + for name in tests: + out.write(f'extern int {name}(int argc, char **argv);\n') + out.write('\n') + out.write('int main(int argc, char **argv) {\n') + for name in tests: + out.write(f' if (strcmp(argv[1], "{name}") == 0) return {name}(argc, argv);\n') + out.write(' return 0;\n') + out.write('}\n') diff --git a/subprojects/packagefiles/aws-c-common/include/aws/common/meson.build b/subprojects/packagefiles/aws-c-common/include/aws/common/meson.build new file mode 100644 index 000000000..e11c02de5 --- /dev/null +++ b/subprojects/packagefiles/aws-c-common/include/aws/common/meson.build @@ -0,0 +1,315 @@ +cfg_data = configuration_data() + +gcc_overflow_math_extensions = ''' +#include +bool foo(int a, int b, int *c) { + return __builtin_mul_overflow(a, b, c); +} + +int main() { + int out; + if (foo(1, 2, &out)) { + return 0; + } + + return 0; +} +''' + +cfg_data.set( + 'AWS_HAVE_GCC_OVERFLOW_MATH_EXTENSIONS', + cc.links( + gcc_overflow_math_extensions, + name: 'gcc_overflow_math_extensions', + ), +) + +gcc_inline_asm = ''' +int main() { + int foo = 42, bar = 24; + __asm__ __volatile__(\"\":\"=r\"(foo):\"r\"(bar):\"memory\"); +} +''' + +cfg_data.set( + 'AWS_HAVE_GCC_INLINE_ASM', + cc.compiles( + gcc_inline_asm, + name: 'gcc_inline_asm', + ), +) + +msvc_intrinsics_x64 = ''' +#include +int main() { + unsigned __int64 a = 0x0fffffffffffffffI64; + unsigned __int64 b = 0xf0000000I64; + unsigned __int64 c, d; + d = _umul128(a, b, &c); + return 0; +} +''' + +cfg_data.set( + 'AWS_HAVE_MSVC_INTRINSICS_X64', + cc.links( + msvc_intrinsics_x64, + name: 'msvc_intrinsics_x64', + ), +) +cfg_data.set('AWS_HAVE_POSIX_LARGE_FILE_SUPPORT', true) +cfg_data.set( + 'AWS_HAVE_EXECINFO', + cc.has_function( + 'backtrace', + prefix: '#include ', + ), +) + +winapi_desktop = ''' +#include +#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) +int main() { + return 0; +} +#else +it's not windows desktop +#endif +''' + +cfg_data.set( + 'AWS_HAVE_WINAPI_DESKTOP', + cc.compiles( + winapi_desktop, + name: 'winapi_desktop', + ), +) +cfg_data.set('AWS_HAVE_LINUX_IF_LINK_H', cc.has_header('linux/if_link.h')) + +avx2_intrinsics = ''' +#include +#include +#include + +int main() { + __m256i vec; + memset(&vec, 0, sizeof(vec)); + + _mm256_shuffle_epi8(vec, vec); + _mm256_set_epi32(1,2,3,4,5,6,7,8); + _mm256_permutevar8x32_epi32(vec, vec); + + return 0; +} +''' + +cfg_data.set( + 'AWS_HAVE_AVX2_INTRINSICS', + cc.links( + avx2_intrinsics, + name: 'avx2_intrinsics', + ), +) + +avx512_intrinsics = ''' +#include + +int main() { + __m512 a = _mm512_setzero_ps(); + return 0; +} +''' + +cfg_data.set( + 'AWS_HAVE_AVX512_INTRINSICS', + cc.links( + avx512_intrinsics, + name: 'avx512_intrinsics', + ), +) + +mm256_extract_epi64 = ''' +#include +#include + +int main() { + __m256i vec; + memset(&vec, 0, sizeof(vec)); + return (int)_mm256_extract_epi64(vec, 2); +} +''' + +cfg_data.set( + 'AWS_HAVE_MM256_EXTRACT_EPI64', + cc.links( + mm256_extract_epi64, + name: 'mm256_extract_epi64', + ), +) + +clmul = ''' +#include +#include +int main() { + __m128i a = _mm_setzero_si128(); + __m128i b = _mm_setzero_si128(); + __m128i result = _mm_clmulepi64_si128(a, b, 0x00); + (void)result; + return 0; +} +''' + +cfg_data.set( + 'AWS_HAVE_CLMUL', + cc.links( + clmul, + name: 'clmul', + ), +) + +arm32_crc = ''' +#include +int main() { + int crc = __crc32d(0, 1); + return 0; +} +''' + +cfg_data.set( + 'AWS_HAVE_ARM32_CRC', + cc.links( + arm32_crc, + name: 'arm32_crc', + ), +) + +armv8_1 = ''' +#include +int main() { + _Atomic int var = 0; + atomic_fetch_add_explicit(&var, 1, memory_order_relaxed); + return 0; +} +''' + +cfg_data.set( + 'AWS_HAVE_ARMv8_1', + cc.links( + armv8_1, + name: 'armv8_1', + ), +) + +cfg_data.set('AWS_ARCH_INTEL', host_machine.cpu_family() in ['x86', 'x86_64']) +cfg_data.set('AWS_ARCH_INTEL64', host_machine.cpu_family() == 'x86_64') + +cfg_data.set('AWS_ARCH_ARM64', host_machine.cpu_family() == 'aarch64') + +configure_file( + input: 'config.h.in', + output: 'config.h', + configuration: cfg_data, + install: true, + install_dir: get_option('includedir') / 'aws/common', + format: 'cmake', +) +headers = [ + 'allocator.h', + 'array_list.h', + 'array_list.inl', + 'assert.h', + 'atomics.h', + 'atomics.inl', + 'atomics_fallback.inl', + 'atomics_gnu.inl', + 'atomics_gnu_old.inl', + 'atomics_msvc.inl', + 'byte_buf.h', + 'byte_order.h', + 'byte_order.inl', + 'cache.h', + 'cbor.h', + 'clock.h', + 'clock.inl', + 'command_line_parser.h', + 'common.h', + 'condition_variable.h', + 'config.h.in', + 'cpuid.h', + 'cross_process_lock.h', + 'date_time.h', + 'device_random.h', + 'encoding.h', + 'encoding.inl', + 'environment.h', + 'error.h', + 'error.inl', + 'exports.h', + 'fifo_cache.h', + 'file.h', + 'hash_table.h', + 'host_utils.h', + 'json.h', + 'lifo_cache.h', + 'linked_hash_table.h', + 'linked_list.h', + 'linked_list.inl', + 'log_channel.h', + 'log_formatter.h', + 'log_writer.h', + 'logging.h', + 'lru_cache.h', + 'macros.h', + 'math.cbmc.inl', + 'math.fallback.inl', + 'math.gcc_arm64_asm.inl', + 'math.gcc_builtin.inl', + 'math.gcc_overflow.inl', + 'math.gcc_x64_asm.inl', + 'math.h', + 'math.inl', + 'math.msvc_x64.inl', + 'mutex.h', + 'package.h', + 'platform.h', + 'posix/common.inl', + 'predicates.h', + 'priority_queue.h', + 'private/array_list.h', + 'private/byte_buf.h', + 'private/dlloads.h', + 'private/external_module_impl.h', + 'private/hash_table_impl.h', + 'private/lookup3.inl', + 'private/system_info_priv.h', + 'private/thread_shared.h', + 'private/xml_parser_impl.h', + 'process.h', + 'ref_count.h', + 'ring_buffer.h', + 'ring_buffer.inl', + 'rw_lock.h', + 'shutdown_types.h', + 'statistics.h', + 'stdbool.h', + 'stdint.h', + 'string.h', + 'string.inl', + 'system_info.h', + 'system_resource_util.h', + 'task_scheduler.h', + 'thread.h', + 'thread_scheduler.h', + 'time.h', + 'uri.h', + 'uuid.h', + 'xml_parser.h', + 'zero.h', + 'zero.inl', +] + +install_headers( + headers, + preserve_path: true, + install_dir: get_option('includedir') / 'aws/common', +) diff --git a/subprojects/packagefiles/aws-c-common/meson.build b/subprojects/packagefiles/aws-c-common/meson.build new file mode 100644 index 000000000..756138a97 --- /dev/null +++ b/subprojects/packagefiles/aws-c-common/meson.build @@ -0,0 +1,310 @@ +project( + 'aws-c-common', + 'c', + version: '0.12.4', + meson_version: '>=0.63.0', + license: 'Apache-2.0', + default_options: ['warning_level=3'], +) + +cc = meson.get_compiler('c') + +tests_opt = get_option('tests').disable_auto_if(meson.is_subproject()) + +libcbor = dependency('libcbor') +cjson = dependency('libcjson') +threads = dependency('threads') +m = cc.find_library( + 'm', + required: false, +) +bcrypt = cc.find_library( + 'bcrypt', + required: host_machine.system() == 'windows', +) +shlwapi = cc.find_library( + 'shlwapi', + required: host_machine.system() == 'windows', +) +foundation = dependency( + 'appleframeworks', + modules: ['CoreFoundation'], + required: host_machine.system() == 'darwin', +) + +fs = import('fs') +pkg = import('pkgconfig') + +subdir('include/aws/common') + +generic_src = files( + 'source/allocator.c', + 'source/allocator_sba.c', + 'source/array_list.c', + 'source/assert.c', + 'source/byte_buf.c', + 'source/cache.c', + 'source/cbor.c', + 'source/codegen.c', + 'source/command_line_parser.c', + 'source/common.c', + 'source/condition_variable.c', + 'source/date_time.c', + 'source/device_random.c', + 'source/encoding.c', + 'source/error.c', + 'source/fifo_cache.c', + 'source/file.c', + 'source/hash_table.c', + 'source/host_utils.c', + 'source/json.c', + 'source/lifo_cache.c', + 'source/linked_hash_table.c', + 'source/log_channel.c', + 'source/log_formatter.c', + 'source/log_writer.c', + 'source/logging.c', + 'source/lru_cache.c', + 'source/math.c', + 'source/memtrace.c', + 'source/priority_queue.c', + 'source/process_common.c', + 'source/ref_count.c', + 'source/ring_buffer.c', + 'source/statistics.c', + 'source/string.c', + 'source/system_info.c', + 'source/task_scheduler.c', + 'source/thread_scheduler.c', + 'source/thread_shared.c', + 'source/uri.c', + 'source/uuid.c', + 'source/xml_parser.c', +) + +public_c_args = ['-DAWS_COMMON_USE_IMPORT_EXPORT'] +c_args = ['-DAWS_COMMON_EXPORTS'] + +if host_machine.cpu_family() in ['x86', 'x86_64'] + if cc.get_argument_syntax() == 'msvc' + arch_src = files('source/arch/intel/msvc/cpuid.c') + else + arch_src = files('source/arch/intel/asm/cpuid.c') + endif + arch_src += files('source/arch/intel/cpuid.c') +elif host_machine.cpu_family() == 'aarch64' + if host_machine.system() == 'linux' + arch_src = files('source/arch/arm/auxv/cpuid.c') + elif host_machine.system() == 'darwin' + arch_src = files('source/arch/arm/darwin/cpuid.c') + elif host_machine.system() == 'windows' + arch_src = files('source/arch/arm/windows/cpuid.c') + else + arch_src = files('source/arch/generic/cpuid.c') + endif +else + arch_src = files('source/arch/generic/cpuid.c') +endif + +posix_src = files( + 'source/posix/clock.c', + 'source/posix/condition_variable.c', + 'source/posix/cross_process_lock.c', + 'source/posix/device_random.c', + 'source/posix/environment.c', + 'source/posix/file.c', + 'source/posix/mutex.c', + 'source/posix/process.c', + 'source/posix/rw_lock.c', + 'source/posix/system_info.c', + 'source/posix/system_resource_utils.c', + 'source/posix/thread.c', + 'source/posix/time.c', +) + +if host_machine.system() == 'darwin' + platform_src = posix_src + files( + 'source/platform_fallback_stubs/system_info.c', + ) + c_args += ['-DAWS_AFFINITY_METHOD=AWS_AFFINITY_METHOD_NONE'] +elif host_machine.system() == 'linux' + platform_src = posix_src + files('source/linux/system_info.c') + if cc.has_function( + 'pthread_attr_setaffinity_np', + prefix: '#include ', + ) + c_args += ['-DAWS_AFFINITY_METHOD=AWS_AFFINITY_METHOD_PTHREAD_ATTR'] + else + c_args += ['-DAWS_AFFINITY_METHOD=AWS_AFFINITY_METHOD_PTHREAD'] + endif +elif host_machine.system() == 'windows' + platform_src = files( + 'source/platform_fallback_stubs/system_info.c', + 'source/windows/clock.c', + 'source/windows/condition_variable.c', + 'source/windows/cross_process_lock.c', + 'source/windows/device_random.c', + 'source/windows/environment.c', + 'source/windows/file.c', + 'source/windows/mutex.c', + 'source/windows/process.c', + 'source/windows/rw_lock.c', + 'source/windows/system_info.c', + 'source/windows/system_resource_utils.c', + 'source/windows/thread.c', + 'source/windows/time.c', + ) + c_args += [ + '-DAWS_AFFINITY_METHOD=AWS_AFFINITY_METHOD_NONE', + '-DWINDOWS_KERNEL_LIB=kernel32', + ] +else + error('Unsupported platform: ' + host_machine.system()) +endif + +inc = include_directories('include') + +libaws_c_common = library( + 'aws-c-common', + generic_src, + platform_src, + arch_src, + dependencies: [libcbor, cjson, threads, m, bcrypt, shlwapi, foundation], + c_args: c_args + public_c_args, + include_directories: inc, + install: true, + version: meson.project_version(), + gnu_symbol_visibility: 'hidden', +) + +aws_c_common_dep = declare_dependency( + link_with: libaws_c_common, + include_directories: inc, + compile_args: public_c_args, +) + +meson.override_dependency('aws-c-common', aws_c_common_dep) + +pkg.generate( + libaws_c_common, + extra_cflags: public_c_args, + description: 'Core c99 package for AWS SDK for C. Includes cross-platform primitives, configuration, data structures, and error handling.', +) + +generate_tests = find_program( + 'generate_tests.py', + required: tests_opt, +) +run_test = find_program( + 'run_test.py', + required: tests_opt, +) +if generate_tests.found() and run_test.found() + test_src = files( + 'tests/alloc_test.c', + 'tests/array_list_test.c', + 'tests/assert_test.c', + 'tests/atomics_test.c', + 'tests/byte_buf_test.c', + 'tests/byte_cursor_find_test.c', + 'tests/byte_order_test.c', + 'tests/cache_test.c', + 'tests/calloc_test.c', + 'tests/cbor_test.c', + 'tests/clock_test.c', + 'tests/command_line_parser_test.c', + 'tests/condition_variable_test.c', + 'tests/cpuid_test.c', + 'tests/cross_process_lock_tests.c', + 'tests/cursor_test.c', + 'tests/date_time_test.c', + 'tests/device_random_test.c', + 'tests/encoding_test.c', + 'tests/environment_test.c', + 'tests/error_test.c', + 'tests/file_test.c', + 'tests/hash_table_test.c', + 'tests/host_util_test.c', + 'tests/json_test.c', + 'tests/linked_hash_table_test.c', + 'tests/linked_list_test.c', + 'tests/math_test.c', + 'tests/memtrace_test.c', + 'tests/mutex_test.c', + 'tests/priority_queue_test.c', + 'tests/process_test.c', + 'tests/realloc_test.c', + 'tests/ring_buffer_test.c', + 'tests/rw_lock_test.c', + 'tests/split_test.c', + 'tests/string_test.c', + 'tests/system_info_tests.c', + 'tests/system_resource_util_test.c', + 'tests/task_scheduler_test.c', + 'tests/thread_scheduler_test.c', + 'tests/thread_test.c', + 'tests/uri_test.c', + 'tests/uuid_test.c', + 'tests/xml_parser_test.c', + 'tests/zero_test.c', + ) + + logging_cases = files( + 'tests/logging/log_channel_test.c', + 'tests/logging/log_formatter_test.c', + 'tests/logging/log_writer_test.c', + 'tests/logging/logging_filter_debug_static_test.c', + 'tests/logging/logging_filter_error_static_test.c', + 'tests/logging/logging_filter_fatal_static_test.c', + 'tests/logging/logging_filter_info_static_test.c', + 'tests/logging/logging_filter_none_static_test.c', + 'tests/logging/logging_filter_trace_static_test.c', + 'tests/logging/logging_filter_warn_static_test.c', + 'tests/logging/logging_general_test.c', + 'tests/logging/logging_misc.c', + 'tests/logging/logging_test_utilities.c', + 'tests/logging/pipeline_logger_test.c', + 'tests/logging/test_logger.c', + ) + + libtestcases = static_library( + 'aws_c_common_testcases', + test_src, + logging_cases, + dependencies: [aws_c_common_dep, threads, m, foundation], + c_args: ['-DAWS_UNSTABLE_TESTING_API=1'], + include_directories: inc, + build_by_default: false, + ) + + # aws-c-common uses an obscure cmake feature `create_test_sourcelist` to generate test harnesses + # this is a best effort approximation of that behavior + test_harness_src = custom_target( + 'generate_test_harness', + input: 'tests.txt', + output: 'test_harness.c', + command: [generate_tests, '@INPUT@', '@OUTPUT@'], + ) + + test_harness = executable( + 'aws-c-common-tests', + test_harness_src, + dependencies: [aws_c_common_dep, threads, m, foundation], + link_with: [libtestcases], + c_args: ['-DAWS_UNSTABLE_TESTING_API=1'], + include_directories: inc, + build_by_default: false, + ) + + names = fs.read('tests.txt').split('\n') + + foreach name : names + test( + name, + run_test, + args: [test_harness, name], + workdir: meson.current_source_dir() / 'tests/resources', + timeout: 600, + ) + endforeach +endif diff --git a/subprojects/packagefiles/aws-c-common/meson_options.txt b/subprojects/packagefiles/aws-c-common/meson_options.txt new file mode 100644 index 000000000..ab7eff4fb --- /dev/null +++ b/subprojects/packagefiles/aws-c-common/meson_options.txt @@ -0,0 +1,5 @@ +option( + 'tests', + type: 'feature', + description: 'Build unit tests', +) diff --git a/subprojects/packagefiles/aws-c-common/run_test.py b/subprojects/packagefiles/aws-c-common/run_test.py new file mode 100644 index 000000000..f55ee353f --- /dev/null +++ b/subprojects/packagefiles/aws-c-common/run_test.py @@ -0,0 +1,13 @@ +#!/usr/bin/env python3 + +import sys + +# Usage: run_test.py [args...] +if __name__ == '__main__': + test_exe = sys.argv[1] + test_args = sys.argv[2:] + import subprocess + result = subprocess.run([test_exe] + test_args) + if result == 103: + result = 77 # Skip code for meson + sys.exit(result.returncode) diff --git a/subprojects/packagefiles/aws-c-common/tests.txt b/subprojects/packagefiles/aws-c-common/tests.txt new file mode 100644 index 000000000..d76f3d349 --- /dev/null +++ b/subprojects/packagefiles/aws-c-common/tests.txt @@ -0,0 +1,438 @@ +raise_errors_test +reset_errors_test +error_callback_test +unknown_error_code_in_slot_test +unknown_error_code_no_slot_test +unknown_error_code_range_too_large_test +aws_load_error_strings_test +aws_assume_compiles_test +thread_creation_join_test +thread_creation_join_invalid_cpu_id_test +thread_atexit_test +test_managed_thread_join +test_managed_thread_join_timeout +mutex_aquire_release_test +mutex_is_actually_mutex_test +mutex_try_lock_is_correct_test +conditional_notify_one +conditional_notify_all +error_code_cross_thread_test +high_res_clock_increments_test +sys_clock_increments_test +test_sec_and_millis_conversions +test_sec_and_micros_conversions +test_sec_and_nanos_conversions +test_milli_and_micros_conversion +test_milli_and_nanos_conversion +test_micro_and_nanos_conversion +test_precision_loss_remainders_conversion +test_overflow_conversion +test_old_overflow_cases +array_list_zero_length +array_list_order_push_back_pop_front_test +array_list_order_push_back_pop_back_test +array_list_order_push_front_pop_front_test +array_list_pop_front_n_test +array_list_erase_test +array_list_exponential_mem_model_test +array_list_exponential_mem_model_iteration_test +array_list_set_at_overwrite_safety +array_list_iteration_by_ptr_test +array_list_iteration_test +array_list_preallocated_iteration_test +array_list_preallocated_push_test +array_list_shrink_to_fit_test +array_list_shrink_to_fit_static_test +array_list_clear_test +array_list_copy_test +array_list_swap_contents_test +array_list_not_enough_space_test +array_list_not_enough_space_test_failure +array_list_of_strings_sort +array_list_empty_sort +priority_queue_push_pop_order_test +priority_queue_random_values_test +priority_queue_size_and_capacity_test +priority_queue_remove_root_test +priority_queue_remove_leaf_test +priority_queue_remove_interior_sift_up_test +priority_queue_remove_interior_sift_down_test +priority_queue_clear_backpointers_test +linked_list_push_back_pop_front +linked_list_push_front_pop_back +linked_list_swap_nodes +linked_list_iteration +linked_list_reverse_iteration +linked_list_swap_contents +linked_list_move_all_back +linked_list_move_all_front +linked_list_node_in_list +hex_encoding_test_case_empty_test +hex_encoding_test_case_f_test +hex_encoding_test_case_fo_test +hex_encoding_test_case_foo_test +hex_encoding_test_case_foob_test +hex_encoding_test_case_fooba_test +hex_encoding_test_case_foobar_test +hex_encoding_test_case_missing_leading_zero +hex_encoding_invalid_buffer_size_test +hex_encoding_highbyte_string_test +hex_encoding_overflow_test +hex_encoding_invalid_string_test +hex_encoding_append_dynamic_test_case_empty +hex_encoding_append_dynamic_test_case_fooba +base64_encoding_test_case_empty_test +base64_encoding_test_case_f_test +base64_encoding_test_case_fo_test +base64_encoding_test_case_foo_test +base64_encoding_test_case_foob_test +base64_encoding_test_case_fooba_test +base64_encoding_test_case_foobar_test +base64_encoding_test_case_32bytes_test +base64_encoding_buffer_size_too_small_test +base64_encoding_buffer_size_overflow_test +base64_encoding_buffer_size_invalid_test +base64_encoding_invalid_buffer_test +base64_encoding_highbyte_string_test +base64_encoding_invalid_padding_test +base64_encoding_test_zeros +base64_encoding_test_roundtrip +base64_encoding_test_all_values +uint64_buffer_test +uint64_buffer_non_aligned_test +uint32_buffer_test +uint32_buffer_non_aligned_test +uint24_buffer_test +uint24_buffer_non_aligned_test +uint16_buffer_test +uint16_buffer_non_aligned_test +uint16_buffer_signed_positive_test +uint16_buffer_signed_negative_test +text_is_valid_utf8 +text_is_valid_utf8_callback +utf8_decoder +scheduler_cleanup_cancellation +scheduler_ordering_test +scheduler_pops_task_late_test +scheduler_has_tasks_test +scheduler_reentrant_safe +scheduler_cleanup_reentrants +scheduler_schedule_cancellation +scheduler_cleanup_idempotent +scheduler_task_delete_on_run +test_hash_table_create_find +test_hash_table_string_create_find +test_hash_table_put +test_hash_table_put_null_dtor +test_hash_table_swap_move +test_hash_table_string_clean_up +test_hash_table_hash_collision +test_hash_table_hash_overwrite +test_hash_table_hash_remove +test_hash_table_hash_clear_allows_cleanup +test_hash_table_on_resize_returns_correct_entry +test_hash_table_foreach +test_hash_table_iter +test_hash_table_empty_iter +test_hash_table_iter_detail +test_hash_table_eq +test_hash_churn +test_hash_table_cleanup_idempotent +test_hash_table_byte_cursor_create_find +test_hash_combine +test_linked_hash_table_preserves_insertion_order +test_linked_hash_table_entries_cleanup +test_linked_hash_table_entries_overwrite +test_linked_hash_table_entries_overwrite_reference_unequal +test_linked_hash_table_entries_overwrite_backed_cursor +test_lru_cache_overflow_static_members +test_lru_cache_lru_ness_static_members +test_lru_cache_element_access_members +test_fifo_cache_overflow_static_members +test_lifo_cache_overflow_static_members +test_cache_entries_cleanup +test_cache_entries_overwrite +test_is_power_of_two +test_round_up_to_power_of_two +test_mul_size_checked +test_mul_size_saturating +test_mul_u32_checked +test_mul_u32_saturating +test_mul_u64_checked +test_mul_u64_saturating +test_add_size_checked +test_aws_add_size_checked_varargs +test_add_size_saturating +test_add_u32_checked +test_add_u32_saturating +test_add_u64_checked +test_add_u64_saturating +test_min_max +test_clz +test_ctz +nospec_index_test +test_byte_cursor_advance +test_byte_cursor_advance_nospec +byte_cursor_write_tests +byte_cursor_read_tests +byte_cursor_limit_tests +test_byte_cursor_read_hex_u8 +test_byte_cursor_right_trim_empty +test_byte_cursor_right_trim_all_whitespace +test_byte_cursor_right_trim_basic +test_byte_cursor_left_trim_empty +test_byte_cursor_left_trim_all_whitespace +test_byte_cursor_left_trim_basic +test_byte_cursor_trim_basic +string_tests +binary_string_test +string_compare_test +string_destroy_secure_test +secure_strlen_test +test_char_split_happy_path +test_char_split_ends_with_token +test_char_split_token_not_present +test_char_split_empty +test_char_split_zeroed +test_char_split_adj_tokens +test_char_split_begins_with_token +test_char_split_with_max_splits +test_char_split_output_too_small +test_byte_cursor_next_split +test_buffer_cat +test_buffer_cat_dest_too_small +test_buffer_cpy +test_buffer_cpy_dest_too_small +test_buffer_cpy_offsets +test_buffer_cpy_offsets_dest_too_small +test_buffer_eq +test_buffer_eq_same_content_different_len +test_buffer_eq_null_internal_byte_buffer +test_buffer_init_copy +test_buffer_init_copy_null_buffer +test_buffer_advance +test_buffer_printf +test_array_eq +test_array_eq_ignore_case +test_array_eq_c_str +test_array_eq_c_str_ignore_case +test_array_hash_ignore_case +test_byte_buf_write_to_capacity +test_byte_buf_init_cache_and_update_cursors +test_byte_buf_empty_appends +test_byte_buf_append_and_update_fail +test_byte_buf_append_and_update_success +test_byte_buf_append_dynamic +test_byte_buf_append_byte +test_byte_buf_append_lookup_success +test_byte_buf_append_lookup_failure +test_byte_buf_reserve +test_byte_buf_reserve_initial_capacity_zero +test_byte_buf_reserve_relative +test_byte_buf_reserve_smart +test_byte_buf_reserve_smart_relative +test_byte_buf_reset +test_byte_cursor_compare_lexical +test_byte_cursor_compare_lookup +test_byte_cursor_starts_with +test_byte_cursor_starts_with_ignore_case +test_isalnum +test_isalpha +test_isdigit +test_isxdigit +test_isspace +test_byte_cursor_utf8_parse_u64 +test_byte_cursor_utf8_parse_u64_hex +byte_swap_test +test_cpu_count_at_least_works_superficially +test_stack_trace_decoding +test_platform_build_os +test_sanity_check_numa_discovery +test_sanity_check_environment_loader +test_realloc_fallback +test_realloc_passthrough +test_cf_allocator_wrapper +test_acquire_many +test_alloc_nothing +sba_alloc_free_once +sba_random_allocs_and_frees +sba_random_reallocs +sba_threaded_allocs_and_frees +sba_threaded_reallocs +sba_churn +sba_metrics +default_threaded_reallocs +default_threaded_allocs_and_frees +aligned_threaded_reallocs +aligned_threaded_allocs_and_frees +test_memtrace_none +test_memtrace_count +test_memtrace_midstream +test_calloc_override +test_calloc_fallback_from_default_allocator +test_calloc_fallback_from_given +test_calloc_from_default_allocator +test_calloc_from_given_allocator +rw_lock_aquire_release_test +rw_lock_is_actually_rw_lock_test +rw_lock_many_readers_test +test_secure_zero +test_buffer_secure_zero +test_buffer_clean_up_secure +is_zeroed +atomics_semantics +atomics_semantics_implicit +atomics_static_init +atomics_acquire_to_release_one_direction +atomics_acquire_to_release_mixed +rfc822_utc_parsing +rfc822_utc_parsing_auto_detect +rfc822_local_time_east_of_gmt_parsing +rfc822_local_time_west_of_gmt_parsing +rfc822_utc_two_digit_year_parsing +rfc822_utc_no_dow_parsing +rfc822_utc_dos_prevented +rfc822_invalid_format +rfc822_invalid_tz +rfc822_invalid_auto_format +iso8601_parsing +iso8601_basic_utc_parsing +iso8601_utc_parsing_auto_detect +iso8601_basic_utc_parsing_auto_detect +iso8601_date_only_parsing +iso8601_basic_date_only_parsing +iso8601_utc_dos_prevented +iso8601_invalid_format +iso8601_invalid_auto_format +unix_epoch_parsing +millis_parsing +device_rand_u64_distribution +device_rand_u32_distribution +device_rand_u16_distribution +device_rand_buffer_distribution +device_rand_buffer_append_distribution +device_rand_buffer_append_short_buffer +uuid_string +uuid_string_compact +prefilled_uuid_string +prefilled_uuid_string_compact +uuid_string_short_buffer +uuid_string_compact_short_buffer +uuid_string_parse +uuid_string_parse_too_short +uuid_string_parse_malformed +test_environment_functions +test_env_functions +short_argument_parse +long_argument_parse +unqualified_argument_parse +unknown_argument_parse +test_command_dispatch +ring_buffer_1_to_1_acquire_release_wraps_test +ring_buffer_release_after_full_test +ring_buffer_acquire_up_to_test +ring_buffer_acquire_tail_always_chases_head_test +ring_buffer_acquire_multi_threaded_test +ring_buffer_acquire_up_to_multi_threaded_test +string_to_log_level_success_test +string_to_log_level_failure_test +test_memory_usage_maxrss +test_logging_filter_at_AWS_LL_NONE_s_logf_all_levels +test_logging_filter_at_AWS_LL_FATAL_s_logf_all_levels +test_logging_filter_at_AWS_LL_ERROR_s_logf_all_levels +test_logging_filter_at_AWS_LL_WARN_s_logf_all_levels +test_logging_filter_at_AWS_LL_INFO_s_logf_all_levels +test_logging_filter_at_AWS_LL_DEBUG_s_logf_all_levels +test_logging_filter_at_AWS_LL_TRACE_s_logf_all_levels +test_logging_filter_at_AWS_LL_TRACE_s_logf_all_levels_trace_cutoff +test_logging_filter_at_AWS_LL_TRACE_s_logf_all_levels_debug_cutoff +test_logging_filter_at_AWS_LL_TRACE_s_logf_all_levels_info_cutoff +test_logging_filter_at_AWS_LL_TRACE_s_logf_all_levels_warn_cutoff +test_logging_filter_at_AWS_LL_TRACE_s_logf_all_levels_error_cutoff +test_logging_filter_at_AWS_LL_TRACE_s_logf_all_levels_fatal_cutoff +test_logging_filter_at_AWS_LL_TRACE_s_logf_all_levels_none_cutoff +test_log_formatter_s_formatter_empty_case +test_log_formatter_s_formatter_simple_case +test_log_formatter_s_formatter_number_case +test_log_formatter_s_formatter_string_case +test_log_formatter_s_formatter_newline_case +test_log_writer_simple_file_test +test_log_writer_existing_file_test +test_log_writer_bad_file_test +test_foreground_log_channel_single_line +test_foreground_log_channel_numbers +test_foreground_log_channel_words +test_foreground_log_channel_all +test_background_log_channel_single_line +test_background_log_channel_numbers +test_background_log_channel_words +test_background_log_channel_all +test_pipeline_logger_unformatted_test +test_pipeline_logger_formatted_test +dynamic_log_level_change_test +get_pid_sanity_check_test +max_io_handles_sanity_check_test +run_command_test_success +run_command_test_bad_command +cpuid_test +xml_parser_root_with_text +xml_parser_malformed_end_node_character_before_start_test +xml_parser_child_with_text +xml_parser_siblings_with_text +xml_parser_preamble_and_attributes +xml_parser_nested_node_same_name_test +xml_parser_nested_node_deep_recursion_test +xml_parser_too_many_attributes_test +xml_parser_name_too_long_test +xml_parser_child_empty_tag +test_thread_scheduler_ordering +test_thread_scheduler_happy_path_cancellation +test_scheduler_cancellation_for_pending_scheduled_task +aws_fopen_non_ascii_test +aws_fopen_ascii_test +directory_iteration_non_existent_directory_test +directory_creation_deletion_test +directory_non_empty_deletion_recursively_succeeds_test +directory_move_succeeds_test +directory_move_src_non_existent_test +test_home_directory_not_null +test_normalize_posix_directory_separator +test_normalize_windows_directory_separator +test_byte_buf_init_from_file +test_json_parse_from_string +test_json_parse_to_string +uri_full_parse +uri_no_scheme_parse +uri_no_port_parse +uri_no_path_parse +uri_no_query_parse +uri_minimal_parse +uri_root_only_parse +uri_root_slash_only_path_parse +uri_path_and_query_only_parse +uri_userinfo_no_password_parse +uri_empty_user_parse +uri_query_params +uri_ipv6_parse +uri_ipv6_no_port_parse +uri_ipv4_parse +uri_invalid_scheme_parse +uri_invalid_port_parse +uri_port_too_large_parse +uri_single_colon_parse +uri_builder +uri_builder_from_string +test_uri_encode_path_rfc3986 +test_uri_encode_query +test_uri_decode +test_cross_process_lock_works_in_proc +host_util_is_ipv4 +host_util_is_ipv6 +cbor_encode_decode_int_test +cbor_encode_decode_double_test +cbor_encode_decode_bool_test +cbor_encode_decode_bytesstr_str_test +cbor_encode_decode_array_map_test +cbor_encode_decode_simple_value_test +cbor_encode_decode_indef_test +cbor_decode_error_handling_test \ No newline at end of file diff --git a/tools/sanity_checks.py b/tools/sanity_checks.py index 68ce77ad6..9176deb1b 100755 --- a/tools/sanity_checks.py +++ b/tools/sanity_checks.py @@ -33,6 +33,11 @@ PERMITTED_FILES = {'generator.sh', 'meson.build', 'meson_options.txt', 'meson.options', 'LICENSE.build'} PER_PROJECT_PERMITTED_FILES: dict[str, set[str]] = { + 'aws-c-common': { + 'tests.txt', + 'generate_tests.py', + 'run_test.py', + }, 'box2d': { 'doctest.h' },