From mboxrd@z Thu Jan 1 00:00:00 1970 From: Cyril Hrubis Date: Tue, 21 May 2019 11:58:33 +0200 Subject: [LTP] [PATCH] shmctl01: don't use hardcoded index == 0 for SHM_STAT test In-Reply-To: References: Message-ID: <20190521095833.GA12205@rei> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it 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. Otherwise it looks good, acked. -- Cyril Hrubis chrubis@suse.cz