From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Vorel Date: Mon, 20 May 2019 21:58:05 +0200 Subject: [LTP] [PATCH] shmctl01: don't use hardcoded index == 0 for SHM_STAT test In-Reply-To: References: Message-ID: <20190520195805.GA22932@x230> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it Hi Jan, > Test fails on SHM_STAT testcase: > shmctl01 5 TFAIL : shmctl01.c:173: shmctl01 call failed > errno = 22 : Invalid argument > shmctl(0, SHM_STAT, 0x601060) = -EINVAL > since following commit: > commit 99db46ea292780cd978d56932d9445b1e8bdafe8 > Author: Manfred Spraul > Date: Tue May 14 15:46:36 2019 -0700 > ipc: do cyclic id allocation for the ipc object. > Don't rely on index 0 being always available, but instead > use (maximum) index returned by SHM_INFO. > Signed-off-by: Jan Stancek Reviewed-by: Petr Vorel Good catch + further improvements. Kind regards, Petr