Re: [RFC][PATCH] ftracetest: Fix hist unsupported result in hist selftests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, May 23, 2016 at 09:50:45PM -0400, Steven Rostedt wrote:
> On Tue, 24 May 2016 08:54:38 +0900
> Namhyung Kim <namhyung@xxxxxxxxxx> wrote:
> 
> > Hi Steve,
> > 
> > On Mon, May 23, 2016 at 03:15:38PM -0400, Steven Rostedt wrote:
> > > 
> > > [ Folks, is this a proper work around? ]
> > > 
> > > When histograms are not configured in the kernel, the ftracetest histogram
> > > selftests should return "unsupported" and not "Failed". To detect this, the
> > > test scripts have:
> > > 
> > >  FEATURE=`grep hist events/sched/sched_process_fork/trigger`
> > >  if [ -z "$FEATURE" ]; then
> > >      echo "hist trigger is not supported"
> > >      exit_unsupported
> > >  fi
> > > 
> > > The problem is that '-e' is in effect and any error will cause the program
> > > to terminate. The grep for 'hist' fails, because it is not compiled it (thus
> > > unsupported), but because grep has an error code for failing to find the
> > > string, it causes the program to terminate, and is marked as a failed test.  
> > 
> > We have a feature check before doing grep, doesn't it detect such
> > case?
> > 
> >   if [ ! -f events/sched/sched_process_fork/trigger ]; then
> >       echo "event trigger is not supported"
> >       exit_unsupported
> >   fi
> > 
> 
> Triggers exist, but the "hist" trigger does not, and that's what is
> being checked.

Why not checking "hist" file then?

Thanks,
Namhyung
--
To unsubscribe from this list: send the line "unsubscribe linux-kselftest" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]

  Powered by Linux