# BST-TIMEOUT: 600 # one instantiation of a ~3.6 MB probe, a 1000-element # # insertion sort, and two passes over a 784 kB archive . "$BST_LIB" # highway (meta-oe recipes-extended/highway, 1.1.0 at SRCREV 58b52a71) -- # Google's portable SIMD library: one source, the per-target vector code # selected at compile time and dispatched at run time; the vector layer under # libjxl and a long list of codecs. Ninth port of the C++ round (BRINTOS-1094), # after abseil-cpp, re2, gflags, glog, fmt, double-conversion, snappy and # leveldb. # # THE VERSION IS 1.1.0, not the 1.4.0 the ticket names -- that is upstream's # current release, and this layer's meta-openembedded carries 1.1.0. Everything # below is measured against 1.1.0. # # --------------------------------------------------------------------------- # THE FACT THIS SUITE EXISTS TO RECORD: HWY_TARGET IS **EMU128**. # # wasm SIMD is NOT enabled in this toolchain. hwy/detect_targets.h selects the # wasm vector target on __wasm_simd128__, which only -msimd128 defines, and # this distro's wasm feature set (BRINTOS_CXX_FEATURES in # brintos-toolchain-cross_1.0.bb) does not include it. So Highway falls back # to EMU128 -- its portable 128-bit emulation, every op present, four int32 # lanes -- which is a correct and shippable result, not a failure. # # IT IS ASSERTED TWO INDEPENDENT WAYS, because the probe printing "EMU128" is # only the library's own account of itself. The archive's SYMBOLS are the # second witness and cannot be faked by a broken probe: Highway names every # per-target instantiation in a namespace after the target, and the only one # in either archive is N_EMU128. The absence of N_SCALAR matters as much as # the presence of N_EMU128 -- see the negative assertions below. # # --------------------------------------------------------------------------- # TWO CONSUMERS, BECAUSE THEY PROVE DIFFERENT THINGS # # The PAYLOAD blocks assert what a downstream recipe reaches -- the headers, # the two archives, the two pkg-config files, the three CMake package files -- # plus the arm witnesses above. # # data/highway-probe is a CONSUMER of that payload: a program compiled against # these headers and LINKED AGAINST THIS BUILD'S libhwy.a and libhwy_contrib.a, # built by the recipe so it cannot drift from what shipped. # # THE PROBE IS WHY THIS PORT CAN CLAIM ANYTHING AT ALL, and on this package it # earned that in the first run. highway is static-only here and installs no # program, so without a consumer the recipe ships headers and two archives -- # and an undefined symbol, or a refused function, in a static archive is not # an error until something links it. Linking the probe turned up a whole- # program link failure that the recipe's own build could not: wasmld's HWJS-3 # coroutinize pass REFUSES hwy::detail::Fill16BytesStatic, an always_inline # suspender that takes its own address (vqsort-inl.h:52,62), and FATALs. The # recipe compiled, packaged and passed QA before that patch; only a consumer # of VQSort would ever have found out. Same shape as glog (BRINTOS-1101) and # fmt's __udivmodti4 (BRINTOS-1102, linux-in-the-browser#155). # # WHAT IS COMPARED BYTE-FOR-BYTE. The probe splits its output at # ==HWY-RESULTS==: everything above describes the arm and legitimately differs # between wasm32 and x86-64 (that difference is the whole point of the library); # everything below is ANSWERS, and Highway's contract is that answers do not # depend on the target. That half is compared line for line against # data/highway-native.txt -- the identical source built and run on x86-64 from # the highway-native recipe the bbappend adds -- with NO tolerance band and NO # NORMALISATION. One differing line is a defect. # # THAT COMPARISON WAS CHECKED BEFORE IT WAS MADE, on one host with the target as # the only variable: the same probe source built by clang 18 against AVX2 (32 # byte vectors, 8 int32 lanes) and against a forced EMU128 (16 bytes, 4 lanes) # produced a byte-identical 50-line results section. The recipe's own native # arm, built by bitbake with the host gcc, matches both. So a cross-arm # byte-compare is a statement about this port rather than about Highway's # dispatch. # # THE FLOAT CORPORA ARE SMALL INTEGERS ON PURPOSE and every float is printed as # its bit pattern. x86-64 has FMA and this target does not, so MulAdd rounds # once there and twice here; with every product and partial sum exactly # representable in binary32 neither rounds, and the associativity of the # reduction cannot matter either. Decimal printing would also have been # locale-sensitive. # # THE ANCHORED CASES EXIST BECAUSE AN ORACLE CAN BE WRONG. A control captured # from an already-broken build would make every compared line agree with it. So # the things this library's contract fixes independently -- that every vector # answer equals a plain scalar loop over the same corpus, computed inside the # probe on THIS machine, and the shuffle results a fixed 128-bit vector must # give -- are ALSO asserted here against literals. Those hold whatever the # control says. # --------------------------------------------------------------------------- # A root prefix, empty on the target and set only when this suite is validated # natively before it ships. The runner never sets it. R="${BST_HIGHWAY_ROOT:-}" LIBDIR=$R/usr/lib INCDIR=$R/usr/include ARCHIVE=$LIBDIR/libhwy.a CONTRIB=$LIBDIR/libhwy_contrib.a PROBE=$BST_DATA/highway-probe NATIVE=$BST_DATA/highway-native.txt # THE CANARY, which is not an assertion about highway at all. # # brintos_local_verify.py loses a suite's FIRST BST result line before the host # parser ever sees it -- BRINTOS-1149, a defect in our own host-side tooling and # not in the runner, the guest or any package. The harness reports the deficit # (`declared N case(s), N-1 reached the console`) but computes its pass count as # total-minus-failures, so THE DROPPED LINE IS COUNTED AS A PASS. A suite whose # first case is a genuine `not ok` therefore loses the one line that mattered, # silently. # # So the first line out of this file asserts something already true. It hides # nothing -- the harness still reports the deficit and every real case below is # still counted. Same idiom, and the same reason, as 56-snappy (BRINTOS-1104), # 82-double-conversion (BRINTOS-1103) and 83-flatbuffers (BRINTOS-1114). # # Remove this case when 1149 is fixed. bst_ok highway/suite-canary if [ ! -f "$ARCHIVE" ]; then bst_skip highway/present "highway not installed on this image" exit 0 fi bst_ok highway/present nl=' ' tmp=${TMPDIR:-/tmp} # has # A shell `case` rather than a grep: this suite makes ~90 content assertions and # an exec apiece is what killed the first draft of the abseil suite on target, # where every process is a fresh instantiation of a multi-megabyte module. has() { case "$2" in *"$nl$3$nl"*) bst_ok "$1" ;; *) bst_notok "$1" "missing: $3" ;; esac } # sub sub() { case "$2" in *"$3"*) bst_ok "$1" ;; *) bst_notok "$1" "missing: $3" ;; esac } # hasnt -- substring, for "must NOT be there" hasnt() { case "$2" in *"$3"*) bst_notok "$1" "present but must not be: $3" ;; *) bst_ok "$1" ;; esac } # --- the package is whole ---------------------------------------------------- # # BOTH archives, because contrib is where the dot product and vqsort live and # where a consumer like libjxl goes. HWY_ENABLE_CONTRIB is left at its default # ON by the bbappend precisely so this file exists. check hw/archive-hwy test -f "$ARCHIVE" check hw/archive-contrib test -f "$CONTRIB" check hw/hdr-highway test -f "$INCDIR/hwy/highway.h" check hw/hdr-base test -f "$INCDIR/hwy/base.h" check hw/hdr-targets test -f "$INCDIR/hwy/targets.h" check hw/hdr-foreach-target test -f "$INCDIR/hwy/foreach_target.h" check hw/hdr-aligned-alloc test -f "$INCDIR/hwy/aligned_allocator.h" check hw/hdr-ops-emu128 test -f "$INCDIR/hwy/ops/emu128-inl.h" check hw/hdr-ops-wasm128 test -f "$INCDIR/hwy/ops/wasm_128-inl.h" check hw/hdr-contrib-dot test -f "$INCDIR/hwy/contrib/dot/dot-inl.h" check hw/hdr-contrib-vqsort test -f "$INCDIR/hwy/contrib/sort/vqsort.h" check hw/hdr-contrib-math test -f "$INCDIR/hwy/contrib/math/math-inl.h" check hw/pc-libhwy test -f "$LIBDIR/pkgconfig/libhwy.pc" check hw/pc-libhwy-contrib test -f "$LIBDIR/pkgconfig/libhwy-contrib.pc" check hw/cmake-config test -f "$LIBDIR/cmake/hwy/hwy-config.cmake" check hw/cmake-release test -f "$LIBDIR/cmake/hwy/hwy-config-release.cmake" check hw/cmake-version test -f "$LIBDIR/cmake/hwy/hwy-config-version.cmake" # hwy/ops/wasm_128-inl.h ships and is asserted deliberately: the header for the # target this arm did NOT select is still installed, so a later toolchain that # turns on -msimd128 has everything it needs without a recipe change. Its # presence says nothing about which target was compiled -- the symbols below do. # Shape, not absence: this arm converts to shared libraries per recipe # (BRINTOS-1740), so a .so here is a conversion, not a policy breach. bst_lib_shape hw/no-shared-lib "$LIBDIR/libhwy.so*" "$LIBDIR/libhwy_contrib.so*" # --- the installed metadata states the version, and states STATIC ------------ HWH=$nl$(cat "$INCDIR/hwy/highway.h" 2>/dev/null)$nl has hw/ver-major "$HWH" "#define HWY_MAJOR 1" has hw/ver-minor "$HWH" "#define HWY_MINOR 1" has hw/ver-patch "$HWH" "#define HWY_PATCH 0" PC=$nl$(cat "$LIBDIR/pkgconfig/libhwy.pc" 2>/dev/null)$nl has hw/pc-version "$PC" "Version: 1.1.0" has hw/pc-libs "$PC" "Libs: -L\${libdir} -lhwy" # -DHWY_STATIC_DEFINE is not decoration: CMakeLists derives it from # HWY_LIBRARY_TYPE, so the .pc is the build system's own record of which arm was # taken -- STATIC_DEFINE on the static one, SHARED_DEFINE once the package flip # allow-lists highway and cmake builds shared. That makes both lines statements # about the ARM rather than about the package, which is BRINTOS-1930's class: # asserted outright they fail highway for a conversion that worked. Asserted as # the PAIR the build system actually emits, they keep their whole value, because # a consumer compiled with the wrong one of the two gets the wrong linkage decls # either way round. if bst_ps_converted "$LIBDIR/libhwy.so" "$LIBDIR/libhwy.so.*"; then sub hw/pc-shared-define "$PC" "-DHWY_SHARED_DEFINE" hasnt hw/pc-not-static "$PC" "HWY_STATIC_DEFINE" else sub hw/pc-static-define "$PC" "-DHWY_STATIC_DEFINE" hasnt hw/pc-not-shared "$PC" "HWY_SHARED_DEFINE" fi PCC=$nl$(cat "$LIBDIR/pkgconfig/libhwy-contrib.pc" 2>/dev/null)$nl has hw/pc-contrib-version "$PCC" "Version: 1.1.0" # --- the archives are this arm's, and they carry EMU128 and nothing else ----- # # Read through the ar SYMBOL INDEX -- member "/", the map of exported symbol to # member offset -- rather than over the whole body. libhwy.a's index is ~4.9 kB # and libhwy_contrib.a's ~31 kB (measured), so the windows below cover each with # room and are the more precise place to look: the index lists what the archive # EXPORTS. check_out hw/ar-magic "!" head -c 8 "$ARCHIVE" idx=$tmp/bst-hwy-idx.$$ head -c 16384 "$ARCHIVE" | tr -c '\40-\176\n' ' ' > "$idx" 2>/dev/null IDX=$nl$(cat "$idx" 2>/dev/null)$nl head -c 65536 "$CONTRIB" | tr -c '\40-\176\n' ' ' > "$idx" 2>/dev/null CIDX=$nl$(cat "$idx" 2>/dev/null)$nl rm -f "$idx" # THE TARGET, stated by the archive rather than by the probe. Highway compiles # each per-target instantiation into a namespace named after the target, so the # set of N_* namespaces present IS the set of targets built. Exactly one is here # and it is EMU128. sub hw/sym-emu128-hwy "$IDX" "_ZN3hwy8N_EMU128" sub hw/sym-emu128-contrib "$CIDX" "_ZN3hwy8N_EMU128" # ...and the negatives, which carry as much of the claim as the positive. # N_SCALAR is the one that matters most: detect_targets.h demotes the EMU128 # baseline to HWY_SCALAR whenever HWY_BROKEN_EMU128 is set (GCC below 14, or # HWY_NO_LIBCXX), and on SCALAR contrib/sort/shared-inl.h sets VQSORT_ENABLED to # 0 and hwy::VQSort becomes a bare HWY_ASSERT(0) -- a port that silently slid # onto SCALAR would still pass every file-presence case above and then ABORT the # first time anything sorted. That is not hypothetical: it is what a # mis-specified compiler argument produced while this port was being validated. hasnt hw/sym-no-scalar "$IDX" "_ZN3hwy9N_SCALAR" hasnt hw/sym-no-wasm "$IDX" "_ZN3hwy7N_WASM" hasnt hw/sym-no-avx2 "$IDX" "_ZN3hwy6N_AVX2" hasnt hw/sym-no-sse4 "$IDX" "_ZN3hwy6N_SSE4" # The runtime-dispatch entry points and the allocator, all in libhwy.a... sub hw/sym-supported-targets "$IDX" "_ZN3hwy16SupportedTargetsEv" sub hw/sym-have-float64 "$IDX" "_ZN3hwy11HaveFloat64Ev" sub hw/sym-allocate-aligned "$IDX" "_ZN3hwy20AllocateAlignedBytes" # ...and VQSort in libhwy_contrib.a, which is a different archive and a # different symbol set. A port can link the core and still be missing contrib. sub hw/sym-vqsort "$CIDX" "_ZN3hwy6VQSort" # libc++, not some other standard library: the bbappend's whole C++ opt-in is # pointing CXX at wasmc++-glibc so brintos-libcxx resolves. _ZNSt3__1 is libc++'s # inline namespace and nothing else emits it. sub hw/sym-libcxx "$IDX" "_ZNSt3__1" # NO vtables and NO typeinfo anywhere. Asserted deliberately rather than left # unstated, and NOT as evidence about -fno-rtti: highway declares no virtual # function in any installed header, so a correct build of it cannot emit either. # A reader finding none should be able to see that it was expected. hasnt hw/sym-no-vtable "$IDX" "_ZTVN3hwy" hasnt hw/sym-no-typeinfo "$IDX" "_ZTIN3hwy" # The members are LLVM IR BITCODE, not native objects: this toolchain defers # codegen to link time, so every member opens with BC C0 DE (42 43 c0 de) -- not # the ELF magic a native x86-64 highway would carry, and not the \0asm of a # finished wasm module either. This is the ONE assertion in the file that a # native build fails, which makes it an arm witness the headers cannot provide. # # WALKED, NOT ASSUMED, BECAUSE THIS ARCHIVE HAS A LONG-NAME MEMBER. After the # symbol index "/" comes an OPTIONAL "//" member holding the names too long for # the 16-byte inline field -- 44 bytes of it here -- and only then the first # object, whose own name field is the indirection "/0" rather than a filename. # Skipping the "//" member unconditionally would land inside the name table and # read four bytes of text as the member magic. ARHDR=$(head -c 68 "$ARCHIVE" 2>/dev/null | tail -c 60) IDXSZ=$(printf '%s' "$ARHDR" | cut -c49-58 | tr -d ' ') if [ -n "$IDXSZ" ] && [ "$IDXSZ" -gt 0 ] 2>/dev/null; then bst_ok hw/ar-index-sized OFF=$((68 + IDXSZ)) [ $((OFF % 2)) -eq 1 ] && OFF=$((OFF + 1)) NAME2=$(od -An -c -j "$OFF" -N 2 "$ARCHIVE" 2>/dev/null | tr -d ' \n') if [ "$NAME2" = "//" ]; then bst_ok hw/ar-longname-member LNSZ=$(dd if="$ARCHIVE" bs=1 skip=$((OFF + 48)) count=10 2>/dev/null | tr -d ' ') OFF=$((OFF + 60 + LNSZ)) [ $((OFF % 2)) -eq 1 ] && OFF=$((OFF + 1)) else bst_notok hw/ar-longname-member "expected a // long-name member, read '$NAME2'" fi # Assert the name field before the magic, so a wrong magic below cannot be # blamed on arithmetic that landed somewhere other than a member header. Every # object in this archive is named through the long-name table, so the field is # "/" rather than a filename. MNAME=$(od -An -c -j "$OFF" -N 2 "$ARCHIVE" 2>/dev/null | tr -d ' \n') case "$MNAME" in /[0-9]) bst_ok hw/ar-first-member ;; *) bst_notok hw/ar-first-member "expected a / long-name reference, read '$MNAME'" ;; esac MAGIC=$(od -An -tx1 -j $((OFF + 60)) -N 4 "$ARCHIVE" 2>/dev/null | tr -d ' \n') check_eq hw/ar-member-bitcode 4243c0de "$MAGIC" if [ "$MAGIC" = "7f454c46" ]; then bst_notok hw/ar-not-elf "members are ELF -- this is a NATIVE build, not wasm32" else bst_ok hw/ar-not-elf; fi if [ "$MAGIC" = "0061736d" ]; then bst_notok hw/ar-not-wasm-module "members are finished wasm modules, not bitcode" else bst_ok hw/ar-not-wasm-module; fi else bst_notok hw/ar-index-sized "could not read the ar symbol-index size" fi # --- the probe: do the shipped archives COMPUTE, and compute correctly? ------ if [ ! -f "$PROBE" ]; then bst_notok hw/probe-present "$PROBE missing -- the library cannot be proven to run" elif [ ! -f "$NATIVE" ]; then bst_notok hw/native-present "$NATIVE missing -- no x86-64 control for the probe run" else bst_ok hw/probe-present bst_ok hw/native-present # do_install stages data/* at 0644 and the deployed rootfs is read-only at # browser runtime, so the payload cannot be executed where it lies. Stage an # executable copy under TMPDIR, as every probe-driven suite here does. pd=$tmp/bst-highway.$$ p=$pd/highway-probe mkdir -p "$pd" 2>/dev/null if cp "$PROBE" "$p" 2>/dev/null && chmod 0755 "$p" 2>/dev/null && [ -x "$p" ]; then bst_ok hw/probe-exec out=$("$p" 2>"$pd/run.err"); rc=$? errout=$(cat "$pd/run.err" 2>/dev/null) rm -rf "$pd" if [ "$rc" -eq 0 ]; then bst_ok hw/probe-rc else bst_notok hw/probe-rc "probe exited $rc"; fi # The library writes nothing to stderr on a successful run. Its failure # channel under -fno-exceptions is HWY_ASSERT -> hwy::Abort, which prints # there and abort()s -- and that is exactly how a VQSort on a SCALAR target # ends. A port that slid onto SCALAR would surface here even if some of the # surviving output still matched. if [ -z "$errout" ]; then bst_ok hw/probe-silent-stderr else bst_notok hw/probe-silent-stderr "$(_bst_1line "$errout")"; fi O=$nl$out$nl # The whole-stream gate. Kept separate from the anchored cases below, # because a probe that died partway would leave those it never reached with # nothing to disagree with and could look like a shorter clean run. It is # also the case that catches an abort: stdout is block-buffered here, so a # probe that abort()s loses EVERYTHING it printed, not just the tail. case "$O" in *"${nl}highway-probe-end${nl}") bst_ok hw/probe-complete ;; *) bst_notok hw/probe-complete "probe did not reach its final line" ;; esac # The version the probe was COMPILED against (the recipe's PV) beside the # one the INSTALLED HEADER carries. The recipe filename, the source's CMake # project() version and hwy/highway.h are three separate claims; this line # is where a header/archive mismatch becomes visible rather than inferred. has hw/probe-version "$O" "highway-probe 1.1.0 hdr=1.1.0" # === 1. the target, from the library's own mouth ========================== # # The symbol assertions above already established EMU128 from the archive. # These are the same claim through the other channel -- what the library # reports at run time -- and the two agreeing is the point. has hw/target-emu128 "$O" "hw/target|EMU128" has hw/static-target-emu128 "$O" "hw/static-target|EMU128" has hw/compiled-only-emu128 "$O" "hw/compiled-targets|EMU128" sub hw/supported-has-emu128 "$O" "hw/supported-targets|" # Not SCALAR, stated separately so the report says which of the two # fallbacks this image took rather than only that it took one. hasnt hw/target-not-scalar "$O" "hw/target|SCALAR" hasnt hw/target-not-wasm "$O" "hw/target|WASM" # The lane counts EMU128 must have: 128 bits, so 16 u8 / 4 i32 / 4 f32. A # target that reported EMU128 and then handed out one-lane vectors would # pass the name assertions and fail these. has hw/lanes-u8 "$O" "hw/lanes-u8|16" has hw/lanes-i32 "$O" "hw/lanes-i32|4" has hw/lanes-f32 "$O" "hw/lanes-f32|4" has hw/not-scalable "$O" "hw/have-scalable|0" has hw/have-float64 "$O" "hw/have-float64|1" # === 2. the byte-compare against x86-64 ================================== # # Only the results half. The arm half above is expected to differ and is # asserted by name instead. res=$(printf '%s\n' "$out" | sed -n '/^==HWY-RESULTS==$/,$p') if [ "$res" = "$(cat "$NATIVE" 2>/dev/null)" ]; then bst_ok hw/results-match-x86-64 else first=$(printf '%s\n' "$res" | diff - "$NATIVE" 2>/dev/null | head -4) bst_notok hw/results-match-x86-64 "$(_bst_1line "${first:-results differ from the control}")" fi # === 3. every answer equals a plain scalar loop, stated without the control # # The probe computes each quantity twice -- once through Highway's vector # ops at the dispatched target, once through a scalar loop in its own source # that uses no Highway op at all -- and prints a verdict. These cases are # the port's correctness claim ON THIS MACHINE, independent of any oracle. # # THE COUNT IS ASSERTED, not just the absence of a DIFFERS token. A probe # that emitted nothing would satisfy "no DIFFERS-FROM-SCALAR anywhere" # perfectly -- that is the vacuous-green shape this port's siblings kept # finding -- so the number of successful verdicts is pinned too. Seven: # dot/i32, dot/f32, dot/f32-contrib, minmax/i32, minmax/u8, mask/i32 and # sort/i32. hasnt hw/no-scalar-divergence "$O" "DIFFERS-FROM-SCALAR" check_eq hw/scalar-agree-count 7 \ "$(printf '%s\n' "$out" | grep -c 'SAME-AS-SCALAR$')" hasnt hw/no-alloc-failure "$O" "alloc|FAILED" # === 4. anchored values ================================================== # # The dot products, min/max and shuffles as literals, so a missing or stale # oracle cannot take them down with it. THE SHUFFLES ARE THE CHEAPEST THING # TO READ WHEN THE COMPARE GOES RED: they are pure lane permutations of a # literal input on a FIXED 128-bit vector, so they depend on no corpus, no # arithmetic and no lane count, and if they are wrong the vector layer is # wrong at the bottom. has hw/dot-i32 "$O" "dot/i32|-10277769" has hw/dot-i32-ref "$O" "dot/i32-scalar|-10277769" has hw/dot-f32 "$O" "dot/f32|c5cfe000" has hw/dot-f32-contrib "$O" "dot/f32-contrib|c5cfe000" has hw/minmax-i32-min "$O" "minmax/i32-min|-1000" has hw/minmax-i32-max "$O" "minmax/i32-max|997" has hw/minmax-u8 "$O" "minmax/u8-max|255" has hw/shuf-identity "$O" "shuf/identity|11111111 22222222 33333333 44444444" has hw/shuf-reverse "$O" "shuf/reverse|44444444 33333333 22222222 11111111" has hw/shuf-reverse2 "$O" "shuf/reverse2|22222222 11111111 44444444 33333333" has hw/shuf-1032 "$O" "shuf/shuffle1032|33333333 44444444 11111111 22222222" has hw/shuf-0321 "$O" "shuf/shuffle0321|22222222 33333333 44444444 11111111" has hw/shuf-2103 "$O" "shuf/shuffle2103|44444444 11111111 22222222 33333333" has hw/shuf-ilo "$O" "shuf/interleave-lo|11111111 aaaaaaaa 22222222 bbbbbbbb" has hw/shuf-ihi "$O" "shuf/interleave-hi|33333333 cccccccc 44444444 dddddddd" has hw/shuf-oddeven "$O" "shuf/odd-even|aaaaaaaa 22222222 cccccccc 44444444" has hw/shuf-concat-lo "$O" "shuf/concat-lo-lo|11111111 22222222 aaaaaaaa bbbbbbbb" has hw/shuf-concat-hi "$O" "shuf/concat-hi-hi|33333333 44444444 cccccccc dddddddd" has hw/shuf-table "$O" "shuf/table-lookup|44444444 11111111 33333333 22222222" # TableLookupBytes with a reversing index over 0x10..0x1f: the first four # bytes out must be 1f 1e 1d 1c. has hw/shuf-table-bytes "$O" "shuf/table-bytes-first4|1f 1e 1d 1c" # Saturating arithmetic at both rails: 127+1 and 127+127 must clamp to 127, # -128+-1 and -128+-128 to -128. A wrapping implementation gives -128 and 0 # in the first two positions, which is a wrong answer rather than an error. has hw/sat-i8-edges "$O" "sat/i8-add-edges|127 127 -128 -128" # Masks: the corpus has 522 negative int32 of 1024, and on the fixed # four-lane pattern {5,7,-3,9} the first negative is lane 2 and there is # exactly one. has hw/mask-negatives "$O" "mask/i32-negatives|522" has hw/mask-first "$O" "mask/first-negative|2" has hw/mask-count "$O" "mask/count|1" has hw/mask-all-true "$O" "mask/all-true|1" has hw/mask-all-false "$O" "mask/all-false|0" # contrib/sort. THE ORDERED FLAG AND THE ENDPOINTS ARE THE POINT: VQSort # seeds its pivot from entropy that is deliberately not reproducible, so the # only thing that can be asserted about the sort is its RESULT -- which is # what the probe compares against an insertion sort of the same corpus. This # is also the case that would have caught the whole-program link refusal # that shipped before the bbappend's patch. has hw/sort-ordered "$O" "sort/i32-ordered|1" has hw/sort-endpoints "$O" "sort/i32-first-last|-999 995" has hw/sort-digest "$O" "sort/i32-digest|0242bd60560e6449" # The corpora themselves, so a divergence in the probe's own generator is # not mistaken for a divergence in the library. If these go red, nothing # below them means anything. has hw/corpus-i32-a "$O" "corpus/i32-a|45910b0560c9bbd9" has hw/corpus-f32-a "$O" "corpus/f32-a|26e11c1f7acc1876" has hw/corpus-u8 "$O" "corpus/u8|d58be701c049230e" else bst_notok hw/probe-exec "could not stage an executable copy of the probe under $tmp" fi fi