From: Jeff McGee Subject: Re: [PATCH] pm_rps: Improve file I/O and restore utilities Date: Fri, 10 Jan 2014 14:50:52 -0600 Message-ID: <20140110205052.GB14542@jeffdesk> References: <1389374442-20325-1-git-send-email-jeff.mcgee@intel.com> <20140110173859.GJ4770@phenom.ffwll.local> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by gabe.freedesktop.org (Postfix) with ESMTP id A433EFC486 for ; Fri, 10 Jan 2014 12:44:47 -0800 (PST) Content-Disposition: inline In-Reply-To: <20140110173859.GJ4770@phenom.ffwll.local> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces@lists.freedesktop.org Errors-To: intel-gfx-bounces@lists.freedesktop.org To: Daniel Vetter Cc: intel-gfx@lists.freedesktop.org List-Id: intel-gfx@lists.freedesktop.org On Fri, Jan 10, 2014 at 06:38:59PM +0100, Daniel Vetter wrote: > On Fri, Jan 10, 2014 at 11:20:42AM -0600, jeff.mcgee@intel.com wrote: > > From: Jeff McGee > > > > Use unbuffered file I/O to simplify and ensure proper sysfs access. > > Bionic C library may not re-read a read-only file unless unbuffered, > > which results in failure to monitor changes in gt_cur_freq_mhz. > > > > Adapt do_writeval to assert that no write error occurs when we expect > > none. > > > > Expand use of restore_assert macro to ensure that original min/max > > frequencies are always in place after a test failure. > > The above three changs should be split into three patches, so that in case > something blows up we don't have to dig out the test functionality changes > from the switch to raw io. > > Also I think we should replace restore_assert with an igt cleanup handler. > Those are a bit more robust and will also clean up even when the test > process has caught a signal. > > See igt_install_exit_handler. there's already plenty of examples all over > the tree. > > Thanks, Daniel > -- > Daniel Vetter > Software Engineer, Intel Corporation > +41 (0) 79 365 57 48 - http://blog.ffwll.ch I agree. New patches coming. Thanks Jeff