. "$BST_LIB" # BST-TIMEOUT: 180 # One probe run -- four vdp_device_create_x11 attempts, six # dlopen()s, no I/O beyond /etc and the module directory -- # plus ~70 shell extractions from its output. An order of # magnitude under 57-libxcomposite's 300 for ~180 of them, # because none of the work here is per-case. # libvdpau 1.5 -- the VDPAU dispatch wrapper (meta-oe recipes-graphics/vdpau). # See libvdpau_%.bbappend for what the port adds. # # --------------------------------------------------------------------------- # WHAT IS MEASURED HERE, AND -- FIRST -- WHAT IS NOT CLAIMED # # THIS SUITE DOES NOT DECODE OR PRESENT ANY VIDEO, AND CANNOT. libvdpau is not a # video library: it is a wrapper with ONE exported function, # vdp_device_create_x11, which resolves a back-end driver, dlopen()s it, and # hands everything through to it. Every VDPAU operation a reader might look for # -- surfaces, decoders, mixers, presentation queues -- lives in that back-end # and is reached only through a get_proc_address the back-end returns. There is # no VDPAU back-end for wasm32-hwjs and there will not be one, so not one of # them can be called here, ever, not merely today. # # What is left is worth a package anyway, and is what this suite is about: # # the DLOPEN ARM the shared-object search and load, on a statically # linked wasm32 target. The wrapper builds two path # shapes and tries each; the probe also calls dlopen() # directly, so "the loader refused" is separable from # "libvdpau mishandled a refusal" -- which the wrapper's # own return cannot do, since both are # VDP_STATUS_NO_IMPLEMENTATION. # # the REFUSAL ARM each reachable path through _vdp_open_driver, asserted # to return the documented status AND to leave both # out-parameters untouched. A refusal that wrote a # half-built device handle would satisfy a status check # and would hand a caller a handle to nothing. # # the ABI the status enumeration, the func ids and the descriptor # layouts this ILP32 arm computes. These ARE the wire # between a client built here and a driver built # anywhere; a disagreement does not fail to build. # # the ARTEFACTS the archives, the two headers, the pkg-config file and # its moduledir variable, and the wrapper config file -- # read back out of dpkg's own file lists, which is what # makes it a statement about the packaging rather than # about tar. # # --------------------------------------------------------------------------- # TWO CLAUSES OF THE TICKET DO NOT HOLD AGAINST THE 1.5 SOURCE, AND ARE NOT # QUIETLY DROPPED # # 1. "vdp_get_error_string asserted to return the documented, non-NULL string # for every VdpStatus the header enumerates -- a pure offline surface". # THERE IS NO SUCH SYMBOL IN THIS LIBRARY. vdpau.h declares VdpGetErrorString # as a TYPEDEF; a client obtains the function by asking a DRIVER's # get_proc_address for VDP_FUNC_ID_GET_ERROR_STRING. With no driver there is # no get_proc_address and so no error-string function, from a shell or from # anywhere else -- the surface is not offline, it is driver-side. What is # asserted instead is the func id a caller would ask for and the full status # enumeration it would be describing, below. # # 2. "a VDPAU_DRIVER value containing a path separator, which the library # documents as rejected". Reachable in principle, NOT reachable here. # _vdp_open_driver rejects such a value by setting it aside and falling # through to _vdp_get_driver_name_from_dri2(display, screen), which opens # with RootWindow(display, screen) -- a DEREFERENCE of the Display. This # image has no X server, so no Display exists, and passing NULL or an # invented pointer in is undefined behaviour rather than a documented # refusal. Rejecting the value is precisely what routes control into the # display, so the case cannot be separated from the thing that makes it # unreachable. It is reported here rather than faked; the same reading is why # every reachable case sets VDPAU_DRIVER to a separator-free name, which # short-circuits the DRI2 branch and leaves `display' untouched by every line # that then runs. # # That short-circuit works only while the wrapper can read VDPAU_DRIVER at # all. It reads it through secure_getenv(), which on this arm returns NULL in # every process (brintos/linux#107), and the recipe's patch 0003 is what lets # the variable through. path-too-long below is the case that proves it: a # 4,499-character VDPAU_DRIVER can overrun PATH_MAX only if it was read. # # --------------------------------------------------------------------------- # NOTHING HERE HAD RUN ON A TARGET WHEN IT WAS WRITTEN, BUT IT IS NOT GUESSWORK # # Every expectation below was MEASURED on 2026-09-12 by a reference run of this # exact probe source against libvdpau 1.5's own vdpau_wrapper.c compiled for # x86-64 with no DISPLAY. Fifty-seven lines, exit 0. # # THREE OF THOSE VALUES DO NOT CARRY ACROSS THE WORD SIZE, AND THEY ARE THE ONLY # THREE: sizeof-VdpBitstreamBuffer and the two offsets within it. That structure # holds a `void const * bitstream', so the LP64 reference answered 24/8/16 and # this ILP32 arm answers 12/4/8. They are asserted as the TARGET's answers # below, deliberately not the reference's. Everything else in VDPAU is # fixed-width integers, floats and enumerators, and carries unchanged. # # THE REFERENCE WAS BUILT WITH DRI2=0 AND THE TARGET IS BUILT WITH DRI2=1. That # difference reaches no case here: every measured case sets a separator-free # VDPAU_DRIVER, and _vdp_open_driver consults DRI2 only when it does not have # one. It is stated because it is the kind of gap that is invisible once the # numbers agree. # # --------------------------------------------------------------------------- # NOTHING IS ASSERTED ABOUT A SHARED OBJECT, IN EITHER DIRECTION # # libvdpau is not in brintos.conf's BRINTOS_PACKAGE_SHARED_ALLOW, so on the arm # shipping today FILES:${PN}'s .so globs match nothing and the wrapper ships as # libvdpau.a. Asserting a .so absent would go red the day libvdpau is # allow-listed; asserting one present is false today. Neither is asserted, the # same reading BRINTOS-2375 established and BRINTOS-2333/-2334/-2335 applied. # # There is an irony here worth naming rather than leaving for a reader to # notice: a dispatch wrapper that exists to BE a shared object and to LOAD # another one ships as a static archive whose load always fails. That is the # honest state of VDPAU on this arm, and it is what the cases below say. PROBE=${BST_LIBVDPAU_PROBE:-/usr/libexec/libvdpau-tests/libvdpau-probe} ARCHIVE=/usr/lib/libvdpau.a TRACE_ARCHIVE=/usr/lib/vdpau/libvdpau_trace.a PCFILE=/usr/lib/pkgconfig/vdpau.pc INCDIR=/usr/include/vdpau CFGFILE=/etc/vdpau_wrapper.cfg tmp=${TMPDIR:-/tmp} out=$tmp/bst-libvdpau-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 libvdpau/suite-begin # --------------------------------------------------------------------------- # THE ARTEFACTS # --------------------------------------------------------------------------- if [ -s "$ARCHIVE" ]; then bst_ok libvdpau/archive-present else bst_notok libvdpau/archive-present "$ARCHIVE missing or empty" fi # The trace module. Upstream builds it as a second shared object installed into # moduledir and dlopen()ed when VDPAU_TRACE is set; on this arm it is an archive # that nothing can ever load, which makes it the one artefact here whose # presence is worth less than the fact that it BUILT -- the static patch had to # move both meson targets, and this is where a patch that moved only src/ would # show as a missing file rather than as a build that died. if [ -s "$TRACE_ARCHIVE" ]; then bst_ok libvdpau/trace-archive-present else bst_notok libvdpau/trace-archive-present "$TRACE_ARCHIVE missing or empty" fi if [ -f "$INCDIR/vdpau.h" ]; then bst_ok libvdpau/header-vdpau.h else bst_notok libvdpau/header-vdpau.h "$INCDIR/vdpau.h missing" fi if [ -f "$INCDIR/vdpau_x11.h" ]; then bst_ok libvdpau/header-vdpau_x11.h else bst_notok libvdpau/header-vdpau_x11.h "$INCDIR/vdpau_x11.h missing" fi # The headers must declare the API, not merely exist -- a truncated install # would satisfy the checks above. vdp_device_create_x11 is the library's whole # public surface and is declared in vdpau_x11.h; VdpGetErrorString is the # typedef the ticket's missing-symbol clause is about, and it lives in vdpau.h. if grep -q "vdp_device_create_x11" "$INCDIR/vdpau_x11.h" 2>/dev/null; then bst_ok libvdpau/header-declares-create else bst_notok libvdpau/header-declares-create "no vdp_device_create_x11 declaration in $INCDIR/vdpau_x11.h" fi if grep -q "VdpGetErrorString" "$INCDIR/vdpau.h" 2>/dev/null; then bst_ok libvdpau/header-declares-error-string-typedef else bst_notok libvdpau/header-declares-error-string-typedef "no VdpGetErrorString typedef in $INCDIR/vdpau.h" fi if [ -f "$PCFILE" ]; then bst_ok libvdpau/pkgconfig-present else bst_notok libvdpau/pkgconfig-present "$PCFILE missing" fi if grep -q "^Name: *VDPAU" "$PCFILE" 2>/dev/null; then bst_ok libvdpau/pkgconfig-names-vdpau else bst_notok libvdpau/pkgconfig-names-vdpau "$(grep '^Name:' "$PCFILE" 2>/dev/null)" fi if grep -q "^Version: *1\.5" "$PCFILE" 2>/dev/null; then bst_ok libvdpau/pkgconfig-version-1.5 else bst_notok libvdpau/pkgconfig-version-1.5 "$(grep '^Version:' "$PCFILE" 2>/dev/null)" fi if grep -q '^Libs: *-L\${libdir} *-lvdpau' "$PCFILE" 2>/dev/null; then bst_ok libvdpau/pkgconfig-libs else bst_notok libvdpau/pkgconfig-libs "$(grep '^Libs:' "$PCFILE" 2>/dev/null)" fi # moduledir is not decoration: it is the pkg-config variable a consumer reads to # find where back-end drivers go, AND it is the string the wrapper was COMPILED # with as VDPAU_MODULEDIR. The probe's absent-module case exercises that exact # path shape, so if this line ever disagreed with the built-in value the suite # would be measuring one directory and the library searching another. if grep -q "^moduledir=/usr/lib/vdpau$" "$PCFILE" 2>/dev/null; then bst_ok libvdpau/pkgconfig-moduledir else bst_notok libvdpau/pkgconfig-moduledir "$(grep '^moduledir' "$PCFILE" 2>/dev/null)" fi # The wrapper's config file. init_config() fopen()s it on the first # vdp_device_create_x11 call, so it is on the path every case below runs # through; a malformed or absent one is silently tolerated by the library, # which is why its presence is asserted here rather than inferred from a pass. if grep -q '^enable_flash_uv_swap=' "$CFGFILE" 2>/dev/null; then bst_ok libvdpau/wrapper-cfg else bst_notok libvdpau/wrapper-cfg "$CFGFILE missing or has no enable_flash_uv_swap line" fi # --------------------------------------------------------------------------- # THE PACKAGING, read out of dpkg's own file lists. # # This is the ticket's "the .deb installs on target with dpkg and the files the # recipe promises land where the packaging says". A stat would be satisfied by a # payload that arrived on this image by some other route; the file list is what # actually reads the packaging. Four packages, because this recipe splits four # ways on a static arm and each of them can go wrong on its own -- most easily # libvdpau-staticdev, whose ${libdir}/vdpau/lib*.a entry the bbappend has to add # by hand because the default glob does not reach that subdirectory. # --------------------------------------------------------------------------- check_out libvdpau/pkg-archive "/usr/lib/libvdpau.a" cat /var/lib/dpkg/info/libvdpau-staticdev.list check_out libvdpau/pkg-trace "/usr/lib/vdpau/libvdpau_trace.a" cat /var/lib/dpkg/info/libvdpau-staticdev.list check_out libvdpau/pkg-header "/usr/include/vdpau/vdpau.h" cat /var/lib/dpkg/info/libvdpau-dev.list check_out libvdpau/pkg-pkgconfig "/usr/lib/pkgconfig/vdpau.pc" cat /var/lib/dpkg/info/libvdpau-dev.list check_out libvdpau/pkg-cfg "/etc/vdpau_wrapper.cfg" cat /var/lib/dpkg/info/libvdpau.list check_out libvdpau/pkg-probe "/usr/libexec/libvdpau-tests/libvdpau-probe" cat /var/lib/dpkg/info/libvdpau-tests.list # --------------------------------------------------------------------------- # THE PROBE # --------------------------------------------------------------------------- if [ -x "$PROBE" ]; then bst_ok libvdpau/probe-present else bst_notok libvdpau/probe-present "$PROBE missing or not executable" fi "$PROBE" > "$out" 2>&1 prc=$? if [ "$prc" -eq 0 ]; then bst_ok libvdpau/probe-exit-0 else bst_notok libvdpau/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 this # suite's no-crash clause: four calls into a wrapper whose failure path runs # dlopen, dlclose, an atexit destructor and a pthread_once are four chances to # fault, and BST-TIMEOUT above is the wall-clock bound on the hang. if grep -q '^VDPAU-PROBE-END$' "$out"; then bst_ok libvdpau/probe-reached-end else bst_notok libvdpau/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 this probe's output is tag-plus-key -- sixteen lines # share VDPAU-ABI 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 } # keyed2 -- for VDPAU-CREATE and # VDPAU-DL, whose lines are tag + case-name + field-name + value. Four of the # create groups share every field name between them, so the case name has to # participate in the match or all four would read the first group's answers. keyed2() { _got=$(awk -v t="$2" -v k="$3" -v s="$4" -v n="$5" '$1==t && $2==k && $3==s {print $(n); exit}' "$out") if [ "$_got" = "$6" ]; then bst_ok "$1" else bst_notok "$1" "want '$6', 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. 57 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. # # 56, not the reference's 57: the probe's dlopen(NULL) self-handle line is gone # (lib#194 -- the call ends the process on this arm), so the reference shape is # one line shorter than when it was taken. # # 64 since the two header-macro lines and the two NULL out-parameter groups # (six lines) were added. _total=$(field VDPAU-TOTAL 2) if [ -n "$_total" ] && [ "$_total" -ge 64 ] 2>/dev/null; then bst_ok libvdpau/probe-total-floor else bst_notok libvdpau/probe-total-floor "want >= 64, got '$_total'" fi # The version the probe was compiled with, which is ${PV} out of the recipe. # It is what says the archive the probe linked came from the 1.5 build rather # than from a copy left in the sysroot by something else. expect libvdpau/probe-pv VDPAU-VERSION 3 1.5 # pkg-config's own answer, beside the .pc file's text above: a Version line # pkg-config cannot parse, or a vdpau.pc it does not find on its search path, # passes the grep and fails here. check_eq libvdpau/pkgconfig-modversion 1.5 "$(pkg-config --modversion vdpau 2>/dev/null)" # The version macros the installed header defines. Neither carries 1.5: # VDPAU_VERSION and VDPAU_INTERFACE_VERSION are both 1, the API generation the # 1.x wrapper implements, so they are asserted as the literals they are. keyed libvdpau/hdr-vdpau-version VDPAU-HDR vdpau-version 3 1 keyed libvdpau/hdr-interface-version VDPAU-HDR interface-version 3 1 # --------------------------------------------------------------------------- # THE STATUS ENUMERATION # # VdpStatus is what every entry point in the API returns. Only VDP_STATUS_OK # carries an explicit `= 0'; every other member is positional, so a header edit # that inserted one would renumber everything after it. That is an ABI break # between a client built on this image and a driver built anywhere else, and # nothing in the build would notice -- both sides compile, and the numbers on # the wire simply stop meaning the same thing. The eleven asserted here are the # ends and the interesting middle of a 26-member enumeration: # NO_IMPLEMENTATION is the status this whole image lives in, and ERROR = 25 is # the last member, so pinning it pins the COUNT as well as the value. # --------------------------------------------------------------------------- keyed libvdpau/enum-ok VDPAU-ENUM ok 3 0 keyed libvdpau/enum-no-implementation VDPAU-ENUM no-implementation 3 1 keyed libvdpau/enum-display-preempted VDPAU-ENUM display-preempted 3 2 keyed libvdpau/enum-invalid-handle VDPAU-ENUM invalid-handle 3 3 keyed libvdpau/enum-invalid-pointer VDPAU-ENUM invalid-pointer 3 4 keyed libvdpau/enum-invalid-size VDPAU-ENUM invalid-size 3 20 keyed libvdpau/enum-invalid-value VDPAU-ENUM invalid-value 3 21 keyed libvdpau/enum-invalid-struct-version VDPAU-ENUM invalid-struct-version 3 22 keyed libvdpau/enum-resources VDPAU-ENUM resources 3 23 keyed libvdpau/enum-handle-device-mismatch VDPAU-ENUM handle-device-mismatch 3 24 keyed libvdpau/enum-error VDPAU-ENUM error 3 25 # --------------------------------------------------------------------------- # THE FUNC IDS # # A VDPAU client asks a driver for an entry point by integer, so these numbers # ARE the wire between a client built here and a driver built anywhere else. # get-error-string is 0, which is the answer to the ticket's missing-symbol # clause: the error-string function is not absent from VDPAU, it is the # driver-side entry point a client would ask for by this id. # pq-target-create-x11 comes from vdpau_x11.h and base-winsys from vdpau.h, so # the pair also asserts that the two headers this package installs agree -- # and that they are both 4096 is upstream's definition, not a coincidence. # --------------------------------------------------------------------------- keyed libvdpau/funcid-get-error-string VDPAU-FUNCID get-error-string 3 0 keyed libvdpau/funcid-get-proc-address VDPAU-FUNCID get-proc-address 3 1 keyed libvdpau/funcid-get-api-version VDPAU-FUNCID get-api-version 3 2 keyed libvdpau/funcid-get-information-string VDPAU-FUNCID get-information-string 3 4 keyed libvdpau/funcid-device-destroy VDPAU-FUNCID device-destroy 3 5 keyed libvdpau/funcid-base-winsys VDPAU-FUNCID base-winsys 3 4096 keyed libvdpau/funcid-pq-target-create-x11 VDPAU-FUNCID pq-target-create-x11 3 4096 # --------------------------------------------------------------------------- # THE DESCRIPTOR LAYOUTS # # A client that disagrees with its driver here does not fail to build; it hands # over the wrong bytes. VdpBitstreamBuffer is the only one that moves with the # word size -- it holds a `void const *' -- and the three values below are the # TARGET's, 12/4/8, against the reference host's 24/8/16. It is in this suite # precisely because it is the structure the two architectures disagree about. # --------------------------------------------------------------------------- keyed libvdpau/abi-sizeof-device VDPAU-ABI sizeof-VdpDevice 3 4 keyed libvdpau/abi-sizeof-status VDPAU-ABI sizeof-VdpStatus 3 4 keyed libvdpau/abi-sizeof-funcid VDPAU-ABI sizeof-VdpFuncId 3 4 keyed libvdpau/abi-sizeof-point VDPAU-ABI sizeof-VdpPoint 3 8 keyed libvdpau/abi-sizeof-rect VDPAU-ABI sizeof-VdpRect 3 16 keyed libvdpau/abi-sizeof-color VDPAU-ABI sizeof-VdpColor 3 16 keyed libvdpau/abi-sizeof-procamp VDPAU-ABI sizeof-VdpProcamp 3 20 keyed libvdpau/abi-sizeof-bitstream VDPAU-ABI sizeof-VdpBitstreamBuffer 3 12 keyed libvdpau/abi-offset-rect-x1 VDPAU-ABI offset-VdpRect-x1 3 8 keyed libvdpau/abi-offset-color-a VDPAU-ABI offset-VdpColor-alpha 3 12 keyed libvdpau/abi-offset-procamp-h VDPAU-ABI offset-VdpProcamp-hue 3 16 keyed libvdpau/abi-offset-bs-ptr VDPAU-ABI offset-VdpBitstreamBuffer-bitstream 3 4 keyed libvdpau/abi-offset-bs-bytes VDPAU-ABI offset-VdpBitstreamBuffer-bytes 3 8 keyed libvdpau/abi-procamp-version VDPAU-ABI procamp-version 3 0 keyed libvdpau/abi-bitstream-version VDPAU-ABI bitstream-buffer-version 3 0 # --------------------------------------------------------------------------- # dlopen ITSELF # # Called by the probe rather than through the wrapper, so that "the loader # refused" is separable from "libvdpau mishandled a refusal". The wrapper cannot # make that distinction for us: both come back as VDP_STATUS_NO_IMPLEMENTATION. # # absent-module is the path shape _vdp_open_driver builds first # (VDPAU_MODULEDIR/libvdpau_%s.so.1) and absent-bare the fallback shape it tries # second (libvdpau_%s.so, left to the loader's search path). Both must come back # NULL WITH dlerror() SET. The dlerror half is not redundant: a NULL handle with # a CLEAR dlerror is what would make the wrapper print "Failed to open VDPAU # backend (null)", which is the shape a statically linked loader stub is most # likely to produce, and it would leave the library with nothing to report. # # THE SELF HANDLE IS DELIBERATELY NOT ASSERTED. dlopen(NULL) on a statically # linked image may or may not return a handle; that is a property of this # distro's libc arm rather than of this port, and pinning it here would make # libvdpau's suite go red the day the arm changes for reasons nothing to do with # VDPAU. The probe reports it so a reader can see the answer. # --------------------------------------------------------------------------- keyed2 libvdpau/dl-absent-module-null VDPAU-DL absent-module handle 4 null keyed2 libvdpau/dl-absent-module-err VDPAU-DL absent-module dlerror 4 set keyed2 libvdpau/dl-absent-bare-null VDPAU-DL absent-bare handle 4 null keyed2 libvdpau/dl-absent-bare-err VDPAU-DL absent-bare dlerror 4 set # --------------------------------------------------------------------------- # THE WRAPPER'S OWN REFUSALS # # Three distinct paths through _vdp_open_driver plus a repeat, each reached with # a separator-free VDPAU_DRIVER so the Display is never dereferenced: # # no-driver VDPAU_DRIVER_PATH unset: both dlopen shapes tried, both fail. # This is the state the image is permanently in. # driver-path VDPAU_DRIVER_PATH set to a directory that does not exist. A # DIFFERENT branch reaching the same documented status, so a # regression confined to the VDPAU_DRIVER_PATH arm still names # itself rather than hiding behind no-driver's red. # path-too-long a driver name long enough to overrun PATH_MAX. The only arm # that returns WITHOUT calling dlopen at all -- snprintf's # return is checked against the buffer size -- so it is the one # case that proves the length check is live rather than dead # code that a buffer overrun would walk straight past. # retry no-driver again, last. The wrapper calls _vdp_close_driver() # on a failed open and leaves _vdp_imp_device_create_x11_proc # NULL, so a second call must redo the whole search and answer # identically. A failure memoised as success, or a # double-dlclose, appears here and nowhere else. # # EACH GROUP ASSERTS THE OUT-PARAMETERS AS WELL AS THE STATUS, and that is the # half that is easy to leave out. The probe seeds *device and *get_proc_address # with sentinels; a refusal that wrote either would satisfy a status check and # would still hand its caller a handle to nothing. # --------------------------------------------------------------------------- for c in no-driver driver-path path-too-long retry; do keyed2 "libvdpau/create-$c-status" VDPAU-CREATE "$c" status 4 1 keyed2 "libvdpau/create-$c-nostatus" VDPAU-CREATE "$c" is-no-implementation 4 yes keyed2 "libvdpau/create-$c-device" VDPAU-CREATE "$c" device-untouched 4 yes keyed2 "libvdpau/create-$c-gpa" VDPAU-CREATE "$c" gpa-untouched 4 yes done # NULL OUT-PARAMETERS, the ticket's error paths. vdp_device_create_x11 checks # neither pointer; with no back-end it returns before writing either, so the # documented refusal is the status and the pointer that was supplied left at its # sentinel. A wrapper that wrote through the NULL one would not get as far as # printing these lines, and probe-reached-end would say so. for c in null-device null-gpa; do keyed2 "libvdpau/create-$c-status" VDPAU-CREATE "$c" status 4 1 keyed2 "libvdpau/create-$c-nostatus" VDPAU-CREATE "$c" is-no-implementation 4 yes done keyed2 libvdpau/create-null-device-gpa VDPAU-CREATE null-device gpa-untouched 4 yes keyed2 libvdpau/create-null-gpa-device VDPAU-CREATE null-gpa device-untouched 4 yes # The wrapper's own diagnostics, which are the other half of "refuses the # documented way": a status alone cannot tell no-driver from path-too-long, # since both are VDP_STATUS_NO_IMPLEMENTATION. These two strings are what # separates them, and they are literals in vdpau_wrapper.c rather than anything # the loader chose, so asserting them is not asserting libc's wording. if grep -q '^Failed to open VDPAU backend ' "$out"; then bst_ok libvdpau/diag-open-failed else bst_notok libvdpau/diag-open-failed "no 'Failed to open VDPAU backend' line in the probe output" fi if grep -q '^Failed to construct driver path: path too long$' "$out"; then bst_ok libvdpau/diag-path-too-long else bst_notok libvdpau/diag-path-too-long "no 'Failed to construct driver path' line -- the PATH_MAX branch was not taken" fi rm -f "$out"