Skip to content

Commit

Permalink
mctp/test: Update refcount checking in route fragment tests
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jeremy Kerr authored and David S. Miller committed Nov 18, 2021
1 parent 4cdf85e commit f6ef47e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions net/mctp/test/route-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,6 @@ static void mctp_test_fragment(struct kunit *test)
rt = mctp_test_create_route(&init_net, NULL, 10, mtu);
KUNIT_ASSERT_TRUE(test, rt);

/* The refcount would usually be incremented as part of a route lookup,
* but we're setting the route directly here.
*/
refcount_inc(&rt->rt.refs);

rc = mctp_do_fragment_route(&rt->rt, skb, mtu, MCTP_TAG_OWNER);
KUNIT_EXPECT_FALSE(test, rc);

Expand Down

0 comments on commit f6ef47e

Please sign in to comment.