Skip to content

Commit f6ef47e

Browse files
jk-ozlabsdavem330
authored andcommitted
mctp/test: Update refcount checking in route fragment tests
In 99ce45d, we moved a route refcount decrement from mctp_do_fragment_route into the caller. This invalidates the assumption that the route test makes about refcount behaviour, so the route tests fail. This change fixes the test case to suit the new refcount behaviour. Fixes: 99ce45d ("mctp: Implement extended addressing") Signed-off-by: Jeremy Kerr <jk@codeconstruct.com.au> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 4cdf85e commit f6ef47e

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

net/mctp/test/route-test.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -150,11 +150,6 @@ static void mctp_test_fragment(struct kunit *test)
150150
rt = mctp_test_create_route(&init_net, NULL, 10, mtu);
151151
KUNIT_ASSERT_TRUE(test, rt);
152152

153-
/* The refcount would usually be incremented as part of a route lookup,
154-
* but we're setting the route directly here.
155-
*/
156-
refcount_inc(&rt->rt.refs);
157-
158153
rc = mctp_do_fragment_route(&rt->rt, skb, mtu, MCTP_TAG_OWNER);
159154
KUNIT_EXPECT_FALSE(test, rc);
160155

0 commit comments

Comments
 (0)