[Intel-gfx] [PATCH igt] igt: Add basic framework for GVT-g testing
Chris Wilson
chris at chris-wilson.co.uk
Tue Jun 21 13:36:18 UTC 2016
On Tue, Jun 21, 2016 at 01:24:26PM +0000, 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);
> > + fd = open(buf, O_RDONLY);
> > + if (fd < 0)
> > + continue;
> > +
> > + len = read(fd, buf, sizeof(buf) - 1);
> Will i-g-t use SIGALRM in global test framework? If yes, maybe we should check len == -1 && errno == -EINTR or set SA_RESTART in sigaction(SIGALRM).
Interrupts tend to be added on demand, If we are being thorough, then
yes we should do a readN / writeN here. (Not that I think either kernfs
here reports EINTR.)
> > +static void unload_i915(void)
> > +{
> > + unbind_fbcon();
> > + /* pkill alsact */
> > +
>
> Is there any reason that we should care about alsact? Are you concerned about sound card configuration tool will cause i915 unload failure? BTW I think maybe it should be alsactl?
Yes, the sound driver can keep i915 loaded, so we need to kill anything
keeping the snd_hda_intel alive before we can (recursively) remove i915.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list