. "$BST_LIB" # BST-TIMEOUT: 300 # One probe run plus ~120 shell extractions. Same shape and # the same figure as 57-libxfixes.test, which carries 300 # for ~180 of them. # libXcomposite 0.4.6 -- the client half of the Composite extension (poky # recipes-graphics/xorg-lib). See libxcomposite_%.bbappend for what the port # adds. # # --------------------------------------------------------------------------- # WHAT IS MEASURED HERE, AND -- FIRST -- WHAT IS NOT CLAIMED # # THIS SUITE DOES NOT EXERCISE REDIRECTION, AND CANNOT. Composite exists to # redirect a window hierarchy to off-screen storage, and every entry point that # does any part of that takes a Display. This image has no X server, so no # display opens and not one of them can complete here -- ever, not merely today. # A reader looking for "the library redirected a window" will not find it, and # should not: it is not a gap in the port, it is what a server-less image # permits. # # libXcursor, two members earlier in this same round, was the opposite case -- # a whole display-free file format to drive end to end. libXcomposite has no # such half. So this member is the honest one about its limits, and what it # asserts instead is chosen to be worth something anyway: # # the ARTEFACTS the archive, the header and the pkg-config file, which # are the practical value of this package: it exists to # be linked against by later compositing and toolkit # work, and that work reads all three. # # the DISPLAY-FREE XCompositeVersion(), the one entry point taking no # SURFACE Display, and XCompositeExtensionName, the wire string # the library asks for the extension by. Both come out # of the ported archive. # # the HONEST-FAILURE each entry point's DOCUMENTED no-extension return, # ARM with a DIFFERENT sentinel per kind so the answers # discriminate rather than reading as a uniform # "nothing works". This is the ticket's "refuse cleanly # when no display can be opened", measured. # # the NEGOTIATED ARM the other side of the same branch, for the exactly two # entry points that still return before the wire once # the extension is present. Without it, a guard that # always returned the failure sentinel would be green # above for the wrong reason. # # the WIRE the protocol constants and the request/reply struct # sizes this ILP32 arm computes. A client that # disagrees with the server here does not fail to # build; it sends the wrong bytes. # # the SYMBOL SET all twelve public names, against the committed list # below. This is the ticket's exported-symbol clause, # and it is what makes a build that silently dropped # part of the API fail here rather than at the first # consumer's link step. # # --------------------------------------------------------------------------- # HOW THE FAILURE ARM IS REACHED WITHOUT UNDEFINED BEHAVIOUR # # Passing a NULL or invented Display straight into an entry point is undefined # behaviour, not a documented failure: XCompositeFindDisplay misses the cache, # falls into XCompositeExtAddDisplay, and that calls XInitExtension(dpy, ...), # which dereferences. A probe that crashed there would be reporting on its own # mistake. # # libXcomposite keeps its OWN extension list rather than using extutil's, and # declares it with external linkage -- `extern XCompositeExtInfo # XCompositeExtensionInfo;' (src/xcompositeint.h) -- while # XCompositeExtFindDisplay's fast path is a COMPARISON of the Display pointer # and never a load through it. So the probe seeds that global with one entry # whose display is a token address and whose codes are NULL, and every entry # point then runs its real prologue out of libXcomposite.a and takes the arm # XCompositeCheckExtension defines. Same mechanism as 57-libxfixes.test; see # the probe source for why it is legitimate for these paths and nothing else. # # --------------------------------------------------------------------------- # NOTHING HERE HAD RUN ON A TARGET WHEN IT WAS WRITTEN, BUT IT IS NOT GUESSWORK # # Every expectation below was MEASURED on 2026-09-07 by a reference run of this # exact probe source, compiled against libxcomposite-native 0.4.6 on x86-64 and # run with no DISPLAY. Ninety-three lines, exit 0. # # THREE OF THOSE VALUES DO NOT CARRY ACROSS THE WORD SIZE, AND THEY ARE THE # ONLY THREE: sizeof-Window, sizeof-Pixmap and sizeof-XserverRegion are XID # widths, so the LP64 reference host answered 8 and this ILP32 arm answers 4. # They are asserted as 4 below -- the target's answer, deliberately not the # reference's. Everything else is a property of the protocol or of explicitly # sized wire fields and carries unchanged. # # --------------------------------------------------------------------------- # NOTHING IS ASSERTED ABOUT A SHARED OBJECT, IN EITHER DIRECTION # # libxcomposite is not in brintos.conf's BRINTOS_PACKAGE_SHARED_ALLOW, so on the # arm shipping today FILES:${PN} (${libdir}/libXcomposite.so.*) matches nothing # and the main package is never emitted. Asserting the .so absent would go red # the day libxcomposite is allow-listed, and asserting it present is false # today; both make the suite arm-dependent for a fact that is a property of the # build configuration rather than of the port. So neither is asserted, and # libXcomposite.a is the artefact this suite is about. Same reading, and the # same reason, as BRINTOS-2375 established for libsombok3, libotr and libevent, # and BRINTOS-2333, -2334 and -2335 applied for libxpm, libxkbfile and # libxcursor. # # THE TICKET'S "asserts the installed libXcomposite.so" CLAUSE IS NARROWED HERE # FOR THAT REASON, to the archive, the header and the pkg-config file. PROBE=${BST_LIBXCOMPOSITE_PROBE:-/usr/libexec/libxcomposite-tests/libxcomposite-probe} ARCHIVE=/usr/lib/libXcomposite.a PCFILE=/usr/lib/pkgconfig/xcomposite.pc INCDIR=/usr/include/X11/extensions tmp=${TMPDIR:-/tmp} out=$tmp/bst-libxcomposite-probe.$$.out # The first BST result line of a suite is dropped by the guest console, so the # suite opens with one that costs nothing to lose. bst_ok libxcomposite/suite-begin # --------------------------------------------------------------------------- # THE ARTEFACTS # --------------------------------------------------------------------------- if [ -f "$ARCHIVE" ]; then bst_ok libxcomposite/archive-present else bst_notok libxcomposite/archive-present "$ARCHIVE missing" fi if [ -s "$ARCHIVE" ]; then bst_ok libxcomposite/archive-nonempty else bst_notok libxcomposite/archive-nonempty "$ARCHIVE empty" fi if [ -f "$INCDIR/Xcomposite.h" ]; then bst_ok libxcomposite/header-Xcomposite.h else bst_notok libxcomposite/header-Xcomposite.h "$INCDIR/Xcomposite.h missing" fi # The header must declare the API, not merely exist -- a truncated or wrong # install would satisfy the check above. XCompositeVersion is the one prototype # that is unique to this header and to no dependency's. if grep -q "XCompositeVersion" "$INCDIR/Xcomposite.h" 2>/dev/null; then bst_ok libxcomposite/header-declares-api else bst_notok libxcomposite/header-declares-api "no XCompositeVersion prototype in $INCDIR/Xcomposite.h" fi if [ -f "$PCFILE" ]; then bst_ok libxcomposite/pkgconfig-present else bst_notok libxcomposite/pkgconfig-present "$PCFILE missing" fi # The .pc must name this library, not merely exist -- a stale or templated file # would satisfy the check above. if grep -q "^Name: *Xcomposite" "$PCFILE" 2>/dev/null; then bst_ok libxcomposite/pkgconfig-names-xcomposite else bst_notok libxcomposite/pkgconfig-names-xcomposite "no 'Name: Xcomposite' in $PCFILE" fi if grep -q "^Version: *0\.4\.6" "$PCFILE" 2>/dev/null; then bst_ok libxcomposite/pkgconfig-version-0.4.6 else bst_notok libxcomposite/pkgconfig-version-0.4.6 "$(grep '^Version:' "$PCFILE" 2>/dev/null)" fi # The two lines a consumer's build actually consumes, which is the ticket's # "reported cflags and libs". -lXcomposite is what makes the archive findable # and -I${includedir} what makes the header findable, so a .pc that lost either # is a package that cannot be linked against however complete its files are. if grep -q '^Cflags: *-I\${includedir}' "$PCFILE" 2>/dev/null; then bst_ok libxcomposite/pkgconfig-cflags else bst_notok libxcomposite/pkgconfig-cflags "$(grep '^Cflags:' "$PCFILE" 2>/dev/null)" fi if grep -q '^Libs: *-L\${libdir} *-lXcomposite' "$PCFILE" 2>/dev/null; then bst_ok libxcomposite/pkgconfig-libs else bst_notok libxcomposite/pkgconfig-libs "$(grep '^Libs:' "$PCFILE" 2>/dev/null)" fi # Requires is the public closure a consumer inherits; Requires.private is what # the bbappend's link closure is spelled out FROM. If upstream ever changes # either, the recipe's hand-named archives are the thing that has to change with # it, and this is where that would first show. The recipe deliberately does NOT # link libXfixes -- Xcomposite.c uses libXfixes for the XserverRegion typedef # only -- so this case is also the pin on the assumption behind that omission. if grep -q "^Requires: *xproto compositeproto" "$PCFILE" 2>/dev/null; then bst_ok libxcomposite/pkgconfig-requires else bst_notok libxcomposite/pkgconfig-requires "$(grep '^Requires:' "$PCFILE" 2>/dev/null)" fi if grep -q "^Requires.private: *x11 xfixes" "$PCFILE" 2>/dev/null; then bst_ok libxcomposite/pkgconfig-requires-private else bst_notok libxcomposite/pkgconfig-requires-private "$(grep '^Requires.private:' "$PCFILE" 2>/dev/null)" fi # --------------------------------------------------------------------------- # THE PROBE # --------------------------------------------------------------------------- if [ -x "$PROBE" ]; then bst_ok libxcomposite/probe-present else bst_notok libxcomposite/probe-present "$PROBE missing or not executable" fi "$PROBE" > "$out" 2>&1 prc=$? if [ "$prc" -eq 0 ]; then bst_ok libxcomposite/probe-exit-0 else bst_notok libxcomposite/probe-exit-0 "exit $prc" fi # The END line is the probe's own statement that it did not die part way. Every # case below reads $out, so without it they would all be reading a truncated # file and reporting the absence of a value as a wrong value. It is also the # ticket's no-crash and no-hang clause: a probe that faulted in an entry point, # or that blocked in a connect, never gets here, and BST-TIMEOUT above is the # wall-clock bound on the second of those. if grep -q '^XCOMPOSITE-PROBE-END$' "$out"; then bst_ok libxcomposite/probe-reached-end else bst_notok libxcomposite/probe-reached-end "no END line; probe died. tail: $(tail -3 "$out" | tr '\n' ' ')" fi # field -- nth whitespace field of the line starting with TAG field() { awk -v t="$1" -v n="$2" '$1==t {print $(n); exit}' "$out"; } expect() { # expect _got=$(field "$2" "$3") if [ "$_got" = "$4" ]; then bst_ok "$1" else bst_notok "$1" "want '$4', got '$_got'" fi } # expect() takes the FIRST line matching the tag, which is right only where the # tag appears once. Most of the probe's output is tag-plus-key -- eleven lines # share XCOMPOSITE-VER alone -- so those are read by their key instead, and a # case written with expect() against a repeated tag would silently assert the # first line's value under a second line's name. keyed() { # keyed _got=$(awk -v t="$2" -v k="$3" -v n="$4" '$1==t && $2==k {print $(n); exit}' "$out") if [ "$_got" = "$5" ]; then bst_ok "$1" else bst_notok "$1" "want '$5', got '$_got'" fi } # The line count, as a FLOOR. Every case below is grepped for by prefix, so a # run that died halfway leaves its remaining cases simply absent -- and absent # reads the same as "the grep found nothing", which is how a truncated run # passes for a short one. 93 is the reference run's count; a floor rather than # an equality so that adding a case to the probe is not a red here as well as a # red in whichever case it belongs to. _total=$(field XCOMPOSITE-TOTAL 2) if [ -n "$_total" ] && [ "$_total" -ge 93 ] 2>/dev/null; then bst_ok libxcomposite/probe-total-floor else bst_notok libxcomposite/probe-total-floor "want >= 93, got '$_total'" fi # --------------------------------------------------------------------------- # THE DISPLAY-FREE SURFACE # # XCompositeVersion() is the only entry point in the library that takes no # Display, and the value it returns is compiled INTO libXcomposite.a from the # headers the library was built against -- so `agree' below compares the # archive's idea of the protocol version with the headers this image ships. A # mismatch means the .a and the xorgproto in the sysroot came from different # places, and nothing else in this suite would notice. # # `formula' restates the header's own composition rule, so a header edit that # moved one component without moving the composed value shows as a disagreement # rather than as two numbers that both changed. # # ext-name is the wire string, read out of the archive's read-only data. A # client that asked for the wrong name would simply never get the extension, on # every server, silently. # --------------------------------------------------------------------------- expect libxcomposite/version-pv XCOMPOSITE-VERSION 2 0.4.6 keyed libxcomposite/ver-pv XCOMPOSITE-VER pv 3 0.4.6 keyed libxcomposite/ver-header-major XCOMPOSITE-VER header-major 3 0 keyed libxcomposite/ver-header-minor XCOMPOSITE-VER header-minor 3 4 keyed libxcomposite/ver-header-revision XCOMPOSITE-VER header-revision 3 2 keyed libxcomposite/ver-header-version XCOMPOSITE-VER header-version 3 402 keyed libxcomposite/ver-lib-version XCOMPOSITE-VER lib-version 3 402 keyed libxcomposite/ver-agree XCOMPOSITE-VER agree 3 yes keyed libxcomposite/ver-formula XCOMPOSITE-VER formula 3 yes keyed libxcomposite/ver-ext-name XCOMPOSITE-VER ext-name 3 Composite keyed libxcomposite/ver-ext-name-match XCOMPOSITE-VER ext-name-matches 3 yes # --------------------------------------------------------------------------- # THE SEEDED EXTENSION LIST # # This is the fixture the whole failure arm rests on, so it is asserted rather # than assumed. find-cached takes the fast path (extinfo->cur matches); # find-walk clears the cache and forces the loop over ->head, which must find # the same entry and re-promote it. Both must return the seeded entry: anything # else means XCompositeFindDisplay reached XCompositeExtAddDisplay, and the # cases below would be measuring undefined behaviour. # --------------------------------------------------------------------------- keyed libxcomposite/list-ndisplays XCOMPOSITE-LIST seeded-ndisplays 3 1 keyed libxcomposite/list-find-cached XCOMPOSITE-LIST find-cached 3 seeded keyed libxcomposite/list-find-walk XCOMPOSITE-LIST find-walk 3 seeded keyed libxcomposite/list-repromotes XCOMPOSITE-LIST walk-repromotes 3 seeded keyed libxcomposite/list-has-ext-seeded XCOMPOSITE-LIST has-ext-seeded 3 0 keyed libxcomposite/list-has-ext-null XCOMPOSITE-LIST has-ext-null 3 0 keyed libxcomposite/list-absent XCOMPOSITE-LIST absent-in-list 3 0 keyed libxcomposite/list-unknown-major XCOMPOSITE-LIST unknown-version 3 major=-1 keyed libxcomposite/list-unknown-minor XCOMPOSITE-LIST unknown-version 4 minor=-1 # --------------------------------------------------------------------------- # THE HONEST-FAILURE ARM -- the ticket's "refuse cleanly", one case per kind # # The sentinels differ on purpose, and that is what makes these discriminate: # # False, out-parameters untouched XCompositeQueryExtension # Status 0, out-parameters untouched XCompositeQueryVersion # 0 the three XID-returning calls # void, having returned at all the five operations # # The `returned' cases are the whole measurement for the void calls, and they # are not weak: a build in which XCompositeSimpleCheckExtension had stopped # short-circuiting would carry on into GetReq and dereference the token, so # reaching the next line is the evidence. The same reading covers # get-overlay-window, the only entry point that waits for a reply: a lost check # there would block on a socket that does not exist, and probe-reached-end above # is what would go red. # # The untouched cases are the part a client actually depends on. A client that # trusted a written-through event base on the failure path would add garbage to # every event code it compared. # --------------------------------------------------------------------------- keyed libxcomposite/fail-query-extension XCOMPOSITE-FAIL query-extension 3 0 keyed libxcomposite/fail-qe-untouched-ev XCOMPOSITE-FAIL query-extension-untouched 3 ev=-1 keyed libxcomposite/fail-qe-untouched-err XCOMPOSITE-FAIL query-extension-untouched 4 err=-1 keyed libxcomposite/fail-query-version XCOMPOSITE-FAIL query-version 3 0 keyed libxcomposite/fail-qv-untouched-major XCOMPOSITE-FAIL query-version-untouched 3 major=-1 keyed libxcomposite/fail-qv-untouched-minor XCOMPOSITE-FAIL query-version-untouched 4 minor=-1 keyed libxcomposite/fail-redirect-window XCOMPOSITE-FAIL redirect-window 3 returned keyed libxcomposite/fail-redirect-subwindows XCOMPOSITE-FAIL redirect-subwindows 3 returned keyed libxcomposite/fail-unredirect-window XCOMPOSITE-FAIL unredirect-window 3 returned keyed libxcomposite/fail-unredirect-subwindows XCOMPOSITE-FAIL unredirect-subwindows 3 returned keyed libxcomposite/fail-region-border-clip XCOMPOSITE-FAIL region-from-border-clip 3 0 keyed libxcomposite/fail-name-window-pixmap XCOMPOSITE-FAIL name-window-pixmap 3 0 keyed libxcomposite/fail-get-overlay-window XCOMPOSITE-FAIL get-overlay-window 3 0 keyed libxcomposite/fail-release-overlay XCOMPOSITE-FAIL release-overlay-window 3 returned # Nothing above may add, remove or cache anything, because every one of them # returned at the guard. A build that had walked past the guard would have # mutated the list, and this is the only case that would say so. keyed libxcomposite/fail-list-unchanged XCOMPOSITE-FAIL list-unchanged 3 yes # --------------------------------------------------------------------------- # THE NEGOTIATED ARM -- the guard PASSING # # Without this section, a guard that always returned the failure sentinel would # be green above for the wrong reason. Here the codes are present, the guard is # true, and the two entry points that can complete without a connection do: # QueryExtension hands back the bases it was given (the other half of the # untouched pair), and QueryVersion reports the cached version and returns 1. # # NOTHING ELSE IS EXERCISED HERE AND THAT IS DELIBERATE: every other entry point # runs LockDisplay on the line after its check, so with a token display there is # no fixture at which it is safe. The `by-design' case is a marker so that a # later edit which "completes" this section is a change to a documented decision # rather than an oversight. # --------------------------------------------------------------------------- keyed libxcomposite/codes-has-ext XCOMPOSITE-CODES has-ext-with-codes 3 1 keyed libxcomposite/codes-query-extension XCOMPOSITE-CODES query-extension 3 1 keyed libxcomposite/codes-bases-ev XCOMPOSITE-CODES query-extension-bases 3 ev=64 keyed libxcomposite/codes-bases-err XCOMPOSITE-CODES query-extension-bases 4 err=128 keyed libxcomposite/codes-query-version XCOMPOSITE-CODES query-version 3 1 keyed libxcomposite/codes-reported-major XCOMPOSITE-CODES query-version-reported 3 major=0 keyed libxcomposite/codes-reported-minor XCOMPOSITE-CODES query-version-reported 4 minor=4 keyed libxcomposite/codes-by-design XCOMPOSITE-CODES nothing-else-exercised 3 by-design keyed libxcomposite/codes-restored XCOMPOSITE-CODES restored 3 0 # --------------------------------------------------------------------------- # THE PROTOCOL CONSTANTS # # Wire values, stated outright from the Composite protocol specification rather # than diffed against a build host -- there is nothing about a second machine # that could make an answer here more true. A shifted opcode is the single most # destructive thing that can go wrong on this wire. # # NumberRequests is DEFINED as the last opcode plus one, so asserting the two # against each other would be a tautology; what is asserted instead is that the # nine opcodes are the nine values 0..8 with no gap and no repeat, which is what # a dispatch table depends on and what a header edit inserting a request in the # middle would break. # --------------------------------------------------------------------------- keyed libxcomposite/const-name XCOMPOSITE-CONST COMPOSITE_NAME 3 Composite keyed libxcomposite/const-major XCOMPOSITE-CONST COMPOSITE_MAJOR 3 0 keyed libxcomposite/const-minor XCOMPOSITE-CONST COMPOSITE_MINOR 3 4 keyed libxcomposite/const-req-queryver XCOMPOSITE-CONST req-QueryVersion 3 0 keyed libxcomposite/const-req-redir XCOMPOSITE-CONST req-RedirectWindow 3 1 keyed libxcomposite/const-req-redir-sub XCOMPOSITE-CONST req-RedirectSubwindows 3 2 keyed libxcomposite/const-req-unredir XCOMPOSITE-CONST req-UnredirectWindow 3 3 keyed libxcomposite/const-req-unredir-sub XCOMPOSITE-CONST req-UnredirectSubwindows 3 4 keyed libxcomposite/const-req-borderclip XCOMPOSITE-CONST req-CreateRegionFromBorderClip 3 5 keyed libxcomposite/const-req-namepixmap XCOMPOSITE-CONST req-NameWindowPixmap 3 6 keyed libxcomposite/const-req-getoverlay XCOMPOSITE-CONST req-GetOverlayWindow 3 7 keyed libxcomposite/const-req-reloverlay XCOMPOSITE-CONST req-ReleaseOverlayWindow 3 8 keyed libxcomposite/const-numrequests XCOMPOSITE-CONST NumberRequests 3 9 keyed libxcomposite/const-opcodes-dense XCOMPOSITE-CONST opcodes-dense-from-0 3 yes keyed libxcomposite/const-opcode-count XCOMPOSITE-CONST opcode-count 3 9 # Composite carries no events and no errors of its own. A header that grew one # would change how a client dispatches on every extension it has, which is why # the zero is asserted rather than left implicit. keyed libxcomposite/const-numevents XCOMPOSITE-CONST NumberEvents 3 0 keyed libxcomposite/const-redir-automatic XCOMPOSITE-CONST RedirectAutomatic 3 0 keyed libxcomposite/const-redir-manual XCOMPOSITE-CONST RedirectManual 3 1 # --------------------------------------------------------------------------- # THE WIRE STRUCTS # # The protocol fixes these sizes: 12 bytes for the seven requests carrying a # payload word, 8 for the two carrying only a window, and 32 for every reply. # On a new arm the thing that can actually go wrong is PADDING -- a CARD16 # aligned differently would silently shift every field after it, and the server # would read a different request from the one the client wrote. # # For the seven sz_ constants that are LITERALS, `sz == sizeof' is a real # cross-check between the specification and the compiler, so both fields are # asserted. For GetOverlayWindowReq, GetOverlayWindowReply and # ReleaseOverlayWindowReq the sz_ constant IS sizeof of the struct it describes, # so that comparison would be a tautology green whatever the compiler did -- # those three are asserted against the protocol's numbers instead. # --------------------------------------------------------------------------- keyed libxcomposite/wire-queryver-sz XCOMPOSITE-WIRE sz-QueryVersionReq 3 12 keyed libxcomposite/wire-queryver-sizeof XCOMPOSITE-WIRE sz-QueryVersionReq 5 12 keyed libxcomposite/wire-queryrep-sz XCOMPOSITE-WIRE sz-QueryVersionReply 3 32 keyed libxcomposite/wire-queryrep-sizeof XCOMPOSITE-WIRE sz-QueryVersionReply 5 32 keyed libxcomposite/wire-redir-sz XCOMPOSITE-WIRE sz-RedirectWindowReq 3 12 keyed libxcomposite/wire-redir-sizeof XCOMPOSITE-WIRE sz-RedirectWindowReq 5 12 keyed libxcomposite/wire-redirsub-sz XCOMPOSITE-WIRE sz-RedirectSubwindowsReq 3 12 keyed libxcomposite/wire-redirsub-sizeof XCOMPOSITE-WIRE sz-RedirectSubwindowsReq 5 12 keyed libxcomposite/wire-unredir-sz XCOMPOSITE-WIRE sz-UnredirectWindowReq 3 12 keyed libxcomposite/wire-unredir-sizeof XCOMPOSITE-WIRE sz-UnredirectWindowReq 5 12 keyed libxcomposite/wire-unredirsub-sz XCOMPOSITE-WIRE sz-UnredirectSubwindowsReq 3 12 keyed libxcomposite/wire-unredirsub-sizeof XCOMPOSITE-WIRE sz-UnredirectSubwindowsReq 5 12 keyed libxcomposite/wire-borderclip-sz XCOMPOSITE-WIRE sz-CreateRegionFromBorderClipReq 3 12 keyed libxcomposite/wire-borderclip-sizeof XCOMPOSITE-WIRE sz-CreateRegionFromBorderClipReq 5 12 keyed libxcomposite/wire-namepixmap-sz XCOMPOSITE-WIRE sz-NameWindowPixmapReq 3 12 keyed libxcomposite/wire-namepixmap-sizeof XCOMPOSITE-WIRE sz-NameWindowPixmapReq 5 12 keyed libxcomposite/wire-getoverlay-req XCOMPOSITE-WIRE sizeof-GetOverlayWindowReq 3 8 keyed libxcomposite/wire-getoverlay-reply XCOMPOSITE-WIRE sizeof-GetOverlayWindowReply 3 32 keyed libxcomposite/wire-reloverlay-req XCOMPOSITE-WIRE sizeof-ReleaseOverlayWindowReq 3 8 keyed libxcomposite/wire-replies-32 XCOMPOSITE-WIRE replies-are-32 3 yes keyed libxcomposite/wire-reqs-mult-4 XCOMPOSITE-WIRE reqs-multiple-of-4 3 yes # THE ONLY THREE VALUES IN THIS SUITE THAT ARE THE TARGET'S RATHER THAN THE # REFERENCE HOST'S. An XID is an unsigned long, so the LP64 reference run # answered 8 and this ILP32 arm answers 4. Asserted as 4 deliberately: the case # exists to catch a typedef that changed shape on this arm, not to compare # architectures. keyed libxcomposite/wire-sizeof-window XCOMPOSITE-WIRE sizeof-Window 3 4 keyed libxcomposite/wire-sizeof-pixmap XCOMPOSITE-WIRE sizeof-Pixmap 3 4 keyed libxcomposite/wire-sizeof-region XCOMPOSITE-WIRE sizeof-XserverRegion 3 4 # --------------------------------------------------------------------------- # THE EXPORTED SYMBOL SET, AGAINST A COMMITTED LIST # # This is the ticket's exported-symbol clause. Twelve names, written out here # rather than counted, because a census by number goes green again the moment # one entry point is lost and another appears and it cannot say which one left. # The probe takes each address, so the STATIC LINK is what proves the archive # still contains it -- a name the build had dropped fails do_compile with that # name, rather than surfacing months later in a consumer's link. # --------------------------------------------------------------------------- for sym in XCompositeQueryExtension XCompositeQueryVersion XCompositeVersion \ XCompositeFindDisplay XCompositeRedirectWindow \ XCompositeRedirectSubwindows XCompositeUnredirectWindow \ XCompositeUnredirectSubwindows XCompositeCreateRegionFromBorderClip \ XCompositeNameWindowPixmap XCompositeGetOverlayWindow \ XCompositeReleaseOverlayWindow; do got=$(awk -v s="$sym" '$1=="XCOMPOSITE-SYM" && $2==s {print $3; exit}' "$out") if [ "$got" = "linked" ]; then bst_ok "libxcomposite/sym-$sym" else bst_notok "libxcomposite/sym-$sym" "want 'linked', got '$got'" fi done expect libxcomposite/sym-count XCOMPOSITE-SYM-COUNT 2 12 expect libxcomposite/sym-null XCOMPOSITE-SYM-NULL 2 0 # The data symbol is not a function pointer, so it is censused separately. Nine # is the length of "Composite"; a truncated or relocated string would still # read as a valid C string and only the length would say so. keyed libxcomposite/sym-data-name-len XCOMPOSITE-SYM-DATA ext-name-len 3 9 # --------------------------------------------------------------------------- # THE DISPLAY THAT IS NOT THERE # # The documented no-server path, and the reason the failure arm above had to # seed the list to say anything at all. What must hold is that XOpenDisplay SAYS # so -- returns NULL, promptly, for each spelling -- rather than crashing, # blocking, or handing back a half-built Display that the first # XCompositeQueryVersion would then walk into. The fixtures are the transports a # display string selects: no DISPLAY at all, the local socket, and an explicit # TCP host. # --------------------------------------------------------------------------- keyed libxcomposite/dpy-no-env XCOMPOSITE-DPY no-env 3 NULL keyed libxcomposite/dpy-unix-0 XCOMPOSITE-DPY unix-0 3 NULL keyed libxcomposite/dpy-unix-99 XCOMPOSITE-DPY unix-99 3 NULL keyed libxcomposite/dpy-tcp XCOMPOSITE-DPY tcp 3 NULL keyed libxcomposite/dpy-reached-end XCOMPOSITE-DPY reached-end 3 yes rm -f "$out"