From: Cyril Hrubis Date: Tue, 31 Oct 2017 13:12:57 +0100 Subject: [LTP] [PATCH 11/18] sigwaitinfo: catch SEGV and report success for bad_address2 testcase In-Reply-To: <20171026141447.26749-12-punit.agrawal@arm.com> References: <20171026141447.26749-1-punit.agrawal@arm.com> <20171026141447.26749-12-punit.agrawal@arm.com> Message-ID: <20171031121257.GJ14550@rei.lan> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it Hi! > The bad_address2 testcase passes (void *)1 as a sigset pointer to the > sigwaitinfo syscall. Unsurprisingly, this segfaults in libc rather than > returning -1 (errno = EFAULT) as LTP expects. > > This patch registers a SIGSEGV handler to catch any SEGV's generated by > the sigwaitinfo syscall and treat them as success. Can we, pretty please, rather run the test in a child process and catch the SEGFAULT using the waitpid()? The whole longjmp() stuff is overcomplicated solution for the problem. -- Cyril Hrubis chrubis@suse.cz