[LTP] [PATCH] shmctl01: don't use hardcoded index == 0 for SHM_STAT test
Petr Vorel
pvorel@suse.cz
Tue May 21 16:10:31 CEST 2019
Hi Jan, Cyril,
> ----- Original Message -----
> > Hi!
> > > +static void func_sstat_setup(void)
> > > +{
> > > + struct shm_info tmp;
> > > + int ret;
> > > +
> > > + ret = shmctl(shm_id_1, SHM_INFO, (void *)&tmp);
> > > + if (ret < 0)
> > > + tst_resm(TFAIL|TERRNO, "shmctl(SHM_INFO)");
> > I wonder if it makes sense to continue here if shmctl() has failed,
> > maybe we should do tst_brkm(TBROK ...) instead.
> It is 'setup phase', but it also is kind-of test for shmctl() as well.
> We don't risk much if we continue, worst case is we get one more fail.
> @Petr: Do you have any preference?
Cyril's point makes sense, but I prefer Jan's way.
Kind regards,
Petr
More information about the ltp
mailing list