# BST-TIMEOUT: 2700 # measured 940 s on target 2026-08-12. The `other` half of # # upstream's suite is 29 entries but far more than 29 # # execs: test-augtool.sh alone drives 22 augtool runs out # # of tests/test-augtool/, and most of the put/save scripts # # drive several apiece. Set at ~2.9x the measurement -- a # # shared build host, and 19 of those execs currently abort # # early on the system() gap below, so a fixed platform # # makes this suite longer. . "$BST_LIB" # augeas 1.12.0 -- the configuration-file editing API: it parses /etc files into # an editable tree through a library of LENSES (bidirectional parsers, one per # file format), lets you edit the tree, and writes the files back preserving # what it did not touch. augtool is the shell front end, augmatch the read-only # query tool, augparse the lens compiler/test driver. # See augeas_%.bbappend for what the port adds and why. # # --------------------------------------------------------------------------- # WHAT THIS SUITE IS, AND WHY IT IS NOT A PROBE # # It closes on the PACKAGE'S OWN UPSTREAM SUITE. augeas ships a large one under # tests/, declared TESTS = $(check_SCRIPTS) $(check_PROGRAMS) and driven by # `make check`; the bbappend stages exactly what the generated tests/Makefile # declares, so what runs here is upstream's suite and not our reading of it. # # 253 upstream entries in three groups: # # 224 lens-.sh every lens augeas ships, parsed and put back against # upstream's own sample text. THESE RUN IN THE SIBLING # FILE 81-augeas-lenses.test -- see the split note below. # 22 test-*.sh augtool/augmatch end-to-end over tests/root, a sample # /etc tree: reading every file without error, save # semantics (.augnew/.augsave/backup/symlink/mode # preservation), the interpreter, span reporting. # 7 check_PROGRAMS C unit tests linked against the library this image # ships: fatest (the finite-automaton engine underneath # every lens), test-xpath, test-load, test-save, # test-api, test-run, test-perf. # # This file runs the 29 in the second and third groups -- run-ptest's `other` # group. The measured reference is an x86-64 build of the same tarball, # configured --disable-shared like this arm: 249 pass / 4 skip / 0 fail of 253, # of which the `other` group is 25 pass / 4 skip / 0 fail of 29. # # --------------------------------------------------------------------------- # WHY THE SUITE IS SPLIT ACROSS TWO FILES # # Every upstream entry here is a fresh wasm module instantiation, and the guest # does not return memory on process exit -- so 253 of them in one boot is past # what a single guest survives. That is the spawn budget the brintos-selftests # packager README describes, and the reason 77-sqlite3 is three files rather than # one. run-ptest therefore takes a GROUP argument and each file drives one group, # so the host driver can give each its own guest. The split follows upstream's # own grouping -- `lens` is exactly $(lens_tests) -- rather than an arbitrary # shard, so each file's report is a statement about something. # # THAT IS ALSO WHY ptest-runner DOES NOT DRIVE THIS. ptest-runner invokes # run-ptest with no arguments, which is the `all` group -- precisely the # whole-suite run the spawn budget forbids. The payload is still an ordinary, # conformant ptest (asserted below: the directory, the executable run-ptest, # ptest-runner's presence), and `ptest-runner augeas` remains the right thing to # do on a host with memory to spare; it is not what a ticket gate can afford. # # --------------------------------------------------------------------------- # THE FOUR ROOT-GATED UPSTREAM TESTS SKIP, AND THE REASON IS WORTH READING # # test-put-mount.sh, -augnew, -augsave and test-nonwritable.sh guard themselves # with `[ "$UID" != 0 -o "$(uname -s)" != "Linux" ]` and exit 77. $UID is a bash # variable; /bin/sh on this image is busybox ash, which does not set it, so the # guard takes its skip branch even though the run IS root. The native reference # skips the same four for the stated reason (not root). Same verdict, different # mechanism -- and moot either way, since the three mount tests need bind mounts # and the fourth needs chattr(1), neither of which exists here. They are reported # skip BY NAME, out of upstream's own exit 77, so the report stays faithful to # upstream's TESTS list rather than being four entries shorter with nothing # saying so. ptestdir=/usr/lib/augeas/ptest lensdir=/usr/share/augeas/lenses/dist runner=/usr/bin/ptest-runner # Upstream's own counts for this arm, as staged by do_install_ptest from the # generated tests/Makefile. Asserted rather than assumed: a suite that is # silently shorter than upstream declared reads exactly like a suite that passed. want_other=29 # 22 check_SCRIPTS that are not lens-*.sh, plus 7 check_PROGRAMS want_lens=224 # driven by 81-augeas-lenses.test; asserted here as a list count want_progs=7 want_lenses=224 # lens modules the augeas-lenses package installs tmp=${TMPDIR:-/tmp}/bst-augeas.$$ mkdir -p "$tmp" 2>/dev/null || tmp=/tmp # ----------------------------------------------------------- what shipped ---- # The three tools. augeas is one of the ports whose MAIN package is the point: # unlike gmp/libmpc/libbsd, this one installs binaries. check_rc augeas/augtool 0 test -x /usr/bin/augtool check_rc augeas/augparse 0 test -x /usr/bin/augparse check_rc augeas/augmatch 0 test -x /usr/bin/augmatch # The library half. Static-only arm: libaugeas.a IS the library, and libfa.a is # the finite-automaton engine augeas builds alongside it and installs separately. check_rc augeas/ar 0 test -s /usr/lib/libaugeas.a check_rc augeas/fa-ar 0 test -s /usr/lib/libfa.a # The standing static-only invariant, asserted for the same reason 80-libbsd.test # asserts it: a shared object here would mean the distro's --disable-shared did # not reach this recipe. check_rc augeas/no-so 1 test -e /usr/lib/libaugeas.so check_rc augeas/hdr 0 test -s /usr/include/augeas.h check_rc augeas/fa-hdr 0 test -s /usr/include/fa.h check_rc augeas/pc 0 test -s /usr/lib/pkgconfig/augeas.pc # THE LENSES ARE THE PACKAGE'S REAL PAYLOAD -- without them augtool parses # nothing -- and they are a separate .deb (augeas-lenses) that nothing else on # this image pulls in, because lib${BPN}, which RDEPENDS on it upstream, is empty # and unbuilt on a static-only arm. augeas-ptest RDEPENDS on it explicitly for # exactly that reason, so a regression in that dependency shows up here. # Counted by glob expansion rather than `ls | wc -l`, which would fork twice. set -- "$lensdir"/*.aug check_eq augeas/lens-count "$want_lenses" "$#" # lenses/tests/*.aug ships too (dist_lenstest_DATA), which is what makes the 224 # lens cases runnable against the INSTALLED lens directory rather than a private # copy staged into the ptest payload. If this count is short, 81-augeas-lenses # has nothing to parse. set -- "$lensdir"/tests/*.aug check_eq augeas/lens-test-count "$want_lens" "$#" # ------------------------------------------------------- the ptest payload ---- check_rc augeas/ptest-dir 0 test -d "$ptestdir" check_rc augeas/ptest-script 0 test -x "$ptestdir/run-ptest" check_rc augeas/ptest-tests 0 test -d "$ptestdir/tests" check_rc augeas/ptest-progs 0 test -d "$ptestdir/tests/progs" check_rc augeas/ptest-root 0 test -d "$ptestdir/tests/root" check_rc augeas/ptest-modules 0 test -d "$ptestdir/tests/modules" check_rc augeas/ptest-xpath 0 test -s "$ptestdir/tests/xpath.tests" check_rc augeas/ptest-run 0 test -s "$ptestdir/tests/run.tests" # The lenses symlink is the mechanism by which the suite reads the installed # lenses; a dangling one would fail all 224 lens cases with an error that names # the lens, not the link, so it is asserted directly. check_rc augeas/ptest-lensdir 0 test -d "$ptestdir/lenses" set -- "$ptestdir"/tests/progs/* check_eq augeas/prog-count "$want_progs" "$#" # The payload is a conformant ptest even though this file does not drive it # through ptest-runner -- see the header. if [ -x "$runner" ]; then bst_ok augeas/ptest-runner-present else bst_skip augeas/ptest-runner-present "this image ships no ptest-runner" fi # ------------------------------------------------- run upstream's `other` ----- # One run, one capture, then a `while read` that spawns nothing: printf and test # are ash builtins and the parse below is not a per-case command substitution. out=$tmp/other.out sh "$ptestdir/run-ptest" other > "$out" 2>&1 # THE THREE EXPECTED REDS, EACH A PLATFORM GAP WITH AN ISSUE, NOT A PORT DEFECT. # # test-load, test-save glibc's system(3) never executes /bin/sh on this arm: # every call comes back status 127 while the shell's own # fork, pipes and the identical command line all work. # Upstream's cutest run() helper is one system() call, so # 19 subtests across these two programmes fail on the # harness rather than on augeas. brintos/hardwarejs#23 # # test-preserve.sh umask() returns -38 (ENOSYS) rather than the previous # mask, so the script computes its expected mode from # garbage: "Expected mode 0664 due to 37777777732 umask". # brintos/hardwarejs#22 # # Both were found by this suite, which is the point of closing on upstream's own # tests: neither is reachable from a probe we would have thought to write. KNOWN_RED='test-load test-save test-preserve.sh' red_why() { case "$1" in test-load|test-save) echo "glibc system(3) returns 127 without exec'ing /bin/sh (brintos/hardwarejs#23)" ;; test-preserve.sh) echo "umask() returns -38/ENOSYS, so the expected mode is garbage (brintos/hardwarejs#22)" ;; *) echo "upstream check entry failed" ;; esac } npass=0 nfail=0 nskip=0 failed= while read -r verdict name _rest; do case "$verdict" in PASS:) bst_ok "augeas/t-$name"; npass=$((npass + 1)) ;; FAIL:) bst_notok "augeas/t-$name" "$(red_why "$name")"; nfail=$((nfail + 1)) failed="$failed $name" ;; SKIP:) bst_skip "augeas/t-$name" "upstream self-skip (exit 77): needs root-only bind mounts or chattr" nskip=$((nskip + 1)) ;; esac done < "$out" # The tallies are asserted separately from the individual cases because they fail # differently: a red above is one broken behaviour, whereas a short total means # entries never ran at all -- a truncated capture, a scratch directory the run # could not create, or a payload that lost files after do_install_ptest. Without # this, a run that produced three PASS lines and died would read as three green # cases and nothing else. check_eq augeas/suite-total "$want_other" "$((npass + nfail + nskip))" # THE RED SET, NOT THE RED COUNT -- so a fixed platform gap and a newly broken # case cannot cancel out into a green tally. See the sibling file for the same # assertion and the reasoning. got=$(printf '%s\n' $failed | sort | tr '\n' ' ') want=$(printf '%s\n' $KNOWN_RED | sort | tr '\n' ' ') check_eq augeas/known-red-set "$want" "$got" rm -rf "$tmp"