Re: [Intel-gfx] [PATCH igt] igt: Add basic framework for GVT-g testing

2016-06-22 Thread Wang, Zhi A
Thanks. :P I'm asking our QA to test this patch with upstream kernel. :P Will let you know the result once it's done. > -Original Message- > From: Chris Wilson [mailto:ch...@chris-wilson.co.uk] > Sent: Tuesday, June 21, 2016 4:36 PM > To: Wang, Zhi A > Cc: intel-gfx@lists.freedesktop.org

Re: [Intel-gfx] [PATCH igt] igt: Add basic framework for GVT-g testing

2016-06-21 Thread Chris Wilson
On Tue, Jun 21, 2016 at 01:24:26PM +, Wang, Zhi A wrote: > > + while ((vtcon = readdir(dir))) { > > + int fd, len; > > + > > + if (strncmp(vtcon->d_name, "vtcon", 5)) > > + continue; > > + > > + sprintf(buf, "%s/%s/name", path, vtcon->d_name); >

Re: [Intel-gfx] [PATCH igt] igt: Add basic framework for GVT-g testing

2016-06-21 Thread Wang, Zhi A
Thanks. I'm learning the test framework :P Just have a few questions: > -Original Message- > From: Chris Wilson [mailto:chris.ickle.wil...@gmail.com] On Behalf Of Chris > Wilson > Sent: Tuesday, June 21, 2016 2:36 PM > To: intel-gfx@lists.freedesktop.org > Cc: Chris Wilson ; Wang, Zhi A >

Re: [Intel-gfx] [PATCH igt] igt: Add basic framework for GVT-g testing

2016-06-21 Thread Wang, Zhi A
Ha, I see. Additional signal handler to call the exit handlers. :P > -Original Message- > From: Chris Wilson [mailto:ch...@chris-wilson.co.uk] > Sent: Tuesday, June 21, 2016 3:22 PM > To: Wang, Zhi A > Cc: intel-gfx@lists.freedesktop.org > Subject: Re: [PATCH igt] igt: Add basic framework

Re: [Intel-gfx] [PATCH igt] igt: Add basic framework for GVT-g testing

2016-06-21 Thread Chris Wilson
On Tue, Jun 21, 2016 at 12:17:48PM +, Wang, Zhi A wrote: > To me, atexit is not reliable. As if something wrong happened during the test > and an unexpected signal was received, the prog would be aborted. atexit() > would not work on that case. Better do failsafe work in parent process and >

Re: [Intel-gfx] [PATCH igt] igt: Add basic framework for GVT-g testing

2016-06-21 Thread Wang, Zhi A
> -Original Message- > From: Chris Wilson [mailto:ch...@chris-wilson.co.uk] > Sent: Tuesday, June 21, 2016 3:08 PM > To: Wang, Zhi A > Cc: intel-gfx@lists.freedesktop.org > Subject: Re: [PATCH igt] igt: Add basic framework for GVT-g testing > > On Tue, Jun 21, 2016 at 12:01:02PM +,

Re: [Intel-gfx] [PATCH igt] igt: Add basic framework for GVT-g testing

2016-06-21 Thread Wang, Zhi A
> -Original Message- > From: Chris Wilson [mailto:ch...@chris-wilson.co.uk] > Sent: Tuesday, June 21, 2016 3:08 PM > To: Wang, Zhi A > Cc: intel-gfx@lists.freedesktop.org > Subject: Re: [PATCH igt] igt: Add basic framework for GVT-g testing > > On Tue, Jun 21, 2016 at 12:01:02PM +,

Re: [Intel-gfx] [PATCH igt] igt: Add basic framework for GVT-g testing

2016-06-21 Thread Chris Wilson
On Tue, Jun 21, 2016 at 12:01:02PM +, Wang, Zhi A wrote: > > > > -Original Message- > > From: Chris Wilson [mailto:ch...@chris-wilson.co.uk] > > Sent: Tuesday, June 21, 2016 2:55 PM > > To: intel-gfx@lists.freedesktop.org > > Cc: Wang, Zhi A > > Subject: Re: [PATCH igt] igt: Add basi

Re: [Intel-gfx] [PATCH igt] igt: Add basic framework for GVT-g testing

2016-06-21 Thread Wang, Zhi A
> -Original Message- > From: Chris Wilson [mailto:ch...@chris-wilson.co.uk] > Sent: Tuesday, June 21, 2016 2:55 PM > To: intel-gfx@lists.freedesktop.org > Cc: Wang, Zhi A > Subject: Re: [PATCH igt] igt: Add basic framework for GVT-g testing > > On Tue, Jun 21, 2016 at 12:36:06PM +0100,

Re: [Intel-gfx] [PATCH igt] igt: Add basic framework for GVT-g testing

2016-06-21 Thread Chris Wilson
On Tue, Jun 21, 2016 at 12:36:06PM +0100, Chris Wilson wrote: > +static bool is_gvt_enabled(void) > +{ > + FILE *file; > + int value; > + bool enabled = false; > + > + file = fopen("/sys/module/i915/parameters/enable_gvt", "r"); > + if (!file) > + return false; > + >

[Intel-gfx] [PATCH igt] igt: Add basic framework for GVT-g testing

2016-06-21 Thread Chris Wilson
We don't do anything yet other than try to load the module. Initial sanity checks to come. Signed-off-by: Chris Wilson Cc: Zhi Wang --- lib/Makefile.sources | 2 + lib/igt_gvt.c | 119 + lib/igt_gvt.h | 33 ++ te