tests: epair: Don't fail if we load if_epair

kldload() returns a positive integer when it loads a ko, so check that the
return value is -1 to detect error cases, not that it's different from zero.

MFC after:	3 days
X-MFC-With:	r357234
This commit is contained in:
Kristof Provost 2020-02-01 19:40:11 +00:00
parent f0a273c00f
commit 50214f86c5
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=357375

View File

@ -53,7 +53,7 @@ ATF_TC_BODY(params, tc)
int s;
s = kldload("if_epair");
if (s != 0 && errno != EEXIST)
if (s == -1 && errno != EEXIST)
atf_tc_fail("Failed to load if_epair");
s = socket(AF_INET, SOCK_DGRAM, 0);