[PATCH xserver 3/6] tests: Convert test/xi2/ to single binary

Mihail Konev k.mvc at ya.ru
Thu Jan 12 08:24:05 UTC 2017


On Mon, Jan 09, 2017 at 01:29:17PM +1000, Peter Hutterer wrote:
> > +#ifndef INSIDE_PROTOCOL_COMMON
> > +
> > +extern int enable_XISetEventMask_wrap;
> > +extern int enable_GrabButton_wrap;
> > +
> > +#endif /* INSIDE_PROTOCOL_COMMON */
> 
> something tells me this woudl be nicer solved by just having a header that
> applies to all tests vs a header that applies to the protocol-common bits
> only. Would be nice as follow-up.
> 
> > +#define INSIDE_PROTOCOL_COMMON
> >  #include "protocol-common.h"
> 
> this seems odd: we have a #define here but the only thing it does is declare
> two externs at the bottom of the header file. Can't we just move those
> extern int here? Skips the ifdefs and makes the code cleaner.

But this is a negated define, and would be:

  protocol-common.h -> protocol-common-priv.h
  protocol-common.h:
    #include "protocol-common-priv.h"
    extern int
    extern int

> 
> Unfortunately, this breaks make check.
> 
> _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
> _XSERVTransMakeAllCOTSServerListeners: server already running
> XTEST_DIR must be set to the directory of the xtest repository.
> SKIP scripts/xephyr-glamor-piglit.sh (exit status: 77)
> 
> 1/6 still passes it but 2/6 doesn't build, so it's one of those two patches.
> Please fix this and re-send the series (with a v3 subjectprefix). Test suite
> failures really shouldn't happen during a test suite refactoring, that's the
> one time all the attention is on the test suite ;)
> 
> Cheers,
>    Peter
> 

It looks like xvfb-piglit.sh misses PIGLIT_DIR and XTEST_DIR in
the environment, which must be provided to make by user.
However, I didn't tested the scripts, as:

On c49e820f796c27cbd2907709576a3fb672acd453 (introduces test/scripts/xephyr-glamor-piglit.sh),
recent b5dffbbac193aa640ffcfa0a431c21b862854e53,
and v4 3/6 (after 'make -C test clean').
In terminal window:

  ./configure --enable-xvfb --enable-kdrive --enable-xephyr --enable-glamor
  make
  make check
  # ok; 2 tests were SKIPped:
  #  test/scripts/xvfb-piglit.sh
  #  test/scripts/xephyr-glamor-piglit.sh

  cd ~/piglit
  make
  # ok

  cd ~/xts
  make
  -----------
  make[3]: Entering directory '~/xts/xts5/fonts'
  bdftopcf -t -o xtfont4.pcf xtfont4.bdf
  BDF Error on line 32: character 'ascii001' has out of range width, -8
  bdftopcf: bdf input, xtfont4.bdf, corrupt
  Makefile:767: recipe for target 'xtfont4.pcf' failed
  ...
  # Any autotools-ed version of bdftopcf fails on the file ...
  # yet xtfont4.bdf never changed.

  cd ~/xserver
  PIGLIT_DIR=$HOME/piglit XTEST_DIR=$HOME/xts make check
  --------------
  make[5]: Entering directory '~/xserver/test'
  PASS: list
  PASS: ...
  PASS: input
  FAIL: scripts/xvfb-piglit.sh
  # Freezes. ^C
  make[5]: *** Deleting file 'scripts/xephyr-glamor-piglit.sh.log'
  ...
  --------------
  cat test/scripts/xvfb-piglit.sh.log
  --------------
  _XSERVTransSocketUNIXCreateListener: ...SocketCreateListener() failed
  _XSERVTransMakeAllCOTSServerListeners: server already running
  [001/475] skip: 1 |                    ^
  [002/475] skip: 2 /                  Xvfb needs an unused :DISPLAY argument
                                       (or to be run without another X).
                                       Adding it into xvfb-piglit.sh makes these two
                                       lines disappear; but changes nothing else
                                       (at least on recent master).

On deae9c7e846e244e5d62b2dcfb6663fde0e12cbb (introduces test/scripts/):

   make check
   # ok; 1 test was skipped

   PIGLIT_DIR=$HOME/piglit XTEST_DIR=$HOME/xts make check
   # scripts/xvfb-piglit.sh fails
   ---------------
   xauth:  file ~/.serverauth.19121 does not exist
   xinit: XFree86_VT property unexpectedly has 0 items instead of 1
   [001/473] skip: 1 |
   [002/473] skip: 2 /
   ...



More information about the xorg-devel mailing list