From mboxrd@z Thu Jan 1 00:00:00 1970 From: Petr Vorel Date: Mon, 7 Dec 2020 15:22:40 +0100 Subject: [LTP] [PATCH 3/5] syscalls/fanotify09: Read variable length events In-Reply-To: References: <20201204095930.866421-1-amir73il@gmail.com> <20201204095930.866421-4-amir73il@gmail.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it Hi Amir, > > > In preparation of testing events with filename info, teach the > > > how to read variable length events and parse the name info. > > This commit broke umount() on old kernels. (LTP lib doing multiple attempts is > > useless here). Not sure what exactly is being used, it's not by staing in > > mounted directory. Any idea how to fix it? > --- a/testcases/kernel/syscalls/fanotify/fanotify09.c > +++ b/testcases/kernel/syscalls/fanotify/fanotify09.c > @@ -265,6 +265,7 @@ static void test_fanotify(unsigned int n) > for (i = 1; i < NUM_GROUPS; i++) { > ret = read(fd_notify[i], event_buf, FAN_EVENT_METADATA_LEN); > if (ret > 0) { > + event = (struct fanotify_event_metadata *)event_buf; > event_res(TFAIL, i, event, ""); > if (event->fd != FAN_NOFD) > SAFE_CLOSE(event->fd); > The fix exists in the following patch, therefore I did not notice the > mid series regression. While this is valid to be added in this commit and I'll add it, it does not fix our solution. I might not be clear: since this commit it's broken. Thus any other tip? Kind regards, Petr > Thanks, > Amir.