Re: [PATCH] selftest.c: gracefully handle NULL in assert_streq

2016-07-19 Thread Jeff Law
On 07/19/2016 07:04 AM, David Malcolm wrote: If a NULL is passed in as the expected or actual value for an ASSERT_STREQ, the call to strcmp within selftest::assert_streq can segfault, leading to a failure of -fself-test without indicating which test failed. Handle this more gracefully by checkin

[PATCH] selftest.c: gracefully handle NULL in assert_streq

2016-07-19 Thread David Malcolm
If a NULL is passed in as the expected or actual value for an ASSERT_STREQ, the call to strcmp within selftest::assert_streq can segfault, leading to a failure of -fself-test without indicating which test failed. Handle this more gracefully by checking for NULL, so that information on the failing