Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,27 @@ jobs:
--runtime-c build/clang18-matrix/runtime_c/libquarry_runtime_c.a \
--work build/interop-clang18 --require-all'

# #85: run this fixture under Clang, not only the default GCC suite.
# Checked optional preconditions also catch invalid metadata lookups reliably.
- name: Clang 18 generic runtime conformance
run: |
docker compose run --rm dev sh -ec '
cmake --build build/clang18-matrix --parallel \
--target generic_runtime_conformance_test generic_runtime_conformance_fixture_generator
ctest --test-dir build/clang18-matrix --output-on-failure \
-R "^generic_runtime_conformance_(test|fixture_check)$"
cmake -S . -B build/clang18-conformance-sanitized \
-DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=clang-18 -DCMAKE_CXX_COMPILER=clang++-18 \
"-DCMAKE_C_FLAGS=-fsanitize=address,undefined -fno-omit-frame-pointer" \
"-DCMAKE_CXX_FLAGS=-fsanitize=address,undefined -fno-omit-frame-pointer -D_GLIBCXX_ASSERTIONS" \
-DCMAKE_EXE_LINKER_FLAGS=-fsanitize=address,undefined
cmake --build build/clang18-conformance-sanitized --parallel \
--target generic_runtime_conformance_test generic_runtime_conformance_fixture_generator
ASAN_OPTIONS=detect_leaks=1:halt_on_error=1 \
UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1 \
ctest --test-dir build/clang18-conformance-sanitized --output-on-failure \
-R "^generic_runtime_conformance_(test|fixture_check)$"'

# Docker creates private temporary directories and Go's BRF files are
# mode 0600. Give the host runner ownership before upload-artifact walks
# the evidence; keep the test's normal file permissions intact.
Expand Down
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
git \
golang-go \
libabsl-dev \
libclang-rt-18-dev \
libnewlib-arm-none-eabi \
libprotobuf-dev \
libyaml-dev \
Expand Down
7 changes: 6 additions & 1 deletion tests/runtime/generic_runtime_conformance_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,12 @@ TEST(GenericRuntimeConformance, ValidFixture) {
EXPECT_EQ(view->record_array(10)->element(0)->field(0)->as_signed(), -4);
EXPECT_EQ(view->record_array(10)->element(1)->field(0)->as_signed(), 8);
EXPECT_EQ(view->record_array(10)->element(0)->nested_record(1)->field(0)->as_unsigned(), 101U);
EXPECT_FALSE(view->is_present(*schema->find_field(parent->record_id, 11U)));
// find_field takes a QBS table index, not Parent's wire record ID.
ASSERT_FALSE(schema->find_field(parent->record_id, 11U).has_value());
const auto absent_field = view->field_metadata(11U);
ASSERT_TRUE(absent_field.has_value());
EXPECT_FALSE(view->is_present(*absent_field));
EXPECT_FALSE(view->field(11U).has_value());
ASSERT_TRUE(view->array(12));
EXPECT_EQ(view->array(12)->size(), 0U);
}
Expand Down
Loading