Hi fellow SOers
i'm working on a automated UI testing environment, right now it works pretty decent. The basic idea is that i create a virtual framebuffer instance with:
Xvfb :1 -screen 0 1024x768x24 -fbdir vfb_test/fbdir &
then, to run an application inside it (say, xcalc) i would do
export DISPLAY=localhost=1.0
xterm -e '/usr/X11/bin/xcalc' &
then i interact the ui by sending xcb/Xlib events from the testing app. Also from time to time i need to read directly what the UI is looking at a given point, which i do with:
int fd = open("vfb_test/fbdir/Xvfb_screen0" , O_RDONLY);
memblock = (char*)mmap( NULL , page_size , PROT_READ , MAP_SHARED , fd , offset );
i am happy with the results, but i have the following issues:
1) the current framework works on a single Xvfb; but i would like to run many instances of Xvfb to test in parallel, see how this scales with the number of processors (likely i need to change :1 by :N, but i'm not sure if there aren't issues with that approach)
2) i would like to get hardware acceleration, but i don't know what would have to change (how do i run multiple hw accelerated X11 instance? do i need to?)