Skip to content
  • Alan Coopersmith's avatar
    Use unique display name for each xi2 test program [v3] · da887726
    Alan Coopersmith authored and Keith Packard's avatar Keith Packard committed
    
    
    make -j 8 check was sporadically failing in different xi2 tests.
    After adding the asserts in the previous commit to catch xkb failure
    it became easier to catch the failures and see that multiple tests
    were running at once trying to write to /tmp/server-(null).xkm and
    then delete it, and interfering with each other.
    
    Putting a unique string into the display variable let them each write
    to their own file and not interfere with others.
    
    v2: Fix Linux bits:
    
      Add #include <errno.h> to get a declaration of
      program_invocation_name on Linux.
    
      Use only the last portion of the pathname so that the resulting
      display name doesn't contain any slashes.
    
    v3: use program_invocation_short_name on Linux
    
      This is the same as program_invocation_name, except is has
      stripped off any path prefix.
    
    Signed-off-by: default avatarAlan Coopersmith <alan.coopersmith@oracle.com>
    Reviewed-by: default avatarPeter Hutterer <peter.hutterer@who-t.net>
    Reviewed-by: default avatarAdam Jackson <ajax@redhat.com>
    Signed-off-by: default avatarKeith Packard <keithp@keithp.com>
    da887726