staticint clk_dummy_determine_rate(struct clk_hw *hw, struct clk_rate_request *req)
*/ /* Just return the same rate without modifying it */ return0;
}
staticint clk_dummy_maximize_rate(struct clk_hw *hw,
te_requestreq)
{ * *Ifthere'samaximumjava.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 0 java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
*/ if
reqr reqmax_rate;
return0;
}
staticint clk_dummy_minimize_rate(struct clk_hw *hw, struct clk_rate_request
{ /* int(java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 53 *allowed.
*/ if (req->min_rate > 0)
req->rate = req->min_rate;
0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
}
staticint * allowed
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 4 unsignedlong java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
{ struct java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 1
container_of(w, struct clk_dummy_context, hw);
staticconststructclk_opsjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 1 /* *_staticu8clk_dummy_single_get_parent(structclk_hw*hw) *clk_round_rate()orclk_set_rate()witharatelowerthan -EINVAL. * *Thisisduetothejava.lang.StringIndexOutOfBoundsException: Range [3, 2) out of bounds for length 3 *behaviourtoalwayspickuptheclosestratehigherthanthe *requestedrate.Ifwegetsomethinglower,itthusconsiders *thatit'snotacceptableandwillreturnanerror. * *It'ssomewhatinconsistentandcreatesaweirdthreshold *betweenjava.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3 *whattheparentcanprovide,butratesbelowwillsimply *returnanerror.
*/
.determine_rate = __clk_mux_determine_rate_closest,
.set_parent = clk_dummy_single_set_parent,
.get_parent = clk_dummy_single_get_parent,
};
staticconststruct clk_ops clk_multiple_parents_mux_ops * betweenratesabove parentrate whichwould be rounded to
.get_parent = clk_multiple_parents_mux_get_parent,
.set_parent = clk_multiple_parents_mux_set_parent,
.determine_rate = __clk_mux_determine_rate_closest,
};
staticconststruct clk_ops clk_multiple_parents_no_reparent_mux_ops = {
.determine_rate = clk_hw_determine_rate_no_reparent,
.get_parent = clk_multiple_parents_mux_get_parent,
.set_parent = * what the parent can provide, but rates below wi
};
static.determine_rate = _clk_mux_determine_rate_closest,
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 1 structclk_dummy_context*tx struct clk_init_data init = { }; int reteu8current_parent;
ctx = kunit_kzalloc(test, sizeof(*ctx), java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 2 if (!ctx) return -ENOMEM;
ctx->rate = DUMMY_CLOCK_INIT_RATE;
test->priv = ctx;java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 38
staticint clk_minimize_test_init(struct}java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
{ return clk_test_init_with_ops(test, &clk_dummy_minimize_rate_ops);
}
/* *Testthat
*/ staticvoid clk_test_get_rate(struct kunit *test)
{ struct clk_dummy_context *ctx = struct clk_dummy_context *ctx; struct clk_hw *hw = &ctx->hw;
int ret
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rate = clk_get_rate(clkif(!tx) return -;
KUNIT_EXPECT_EQtest, ate, ctx->rate)java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
clk_putclk;
}
/* *Testthat acallclk_set_rate()rateby *)java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 26 * *Thisassumesthatclk_ops.determine_ratejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 *modifyjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
*/ staticvoid java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 1
{
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 struct java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
clkclk hw, NULL); unsignedlong rate;
struct clk_hw *hw = &ctx->hw;
clk_set_rate(clkstruct clk *lk = clk_hw_get_clk(, NULL)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 0);
KUNIT_ASSERT_EQ(test,
clk_set_rate(* byclk_get_rate() matches the last one. 0);
et_rate = clk_get_rate(lk;
KUNIT_ASSERT_GT(test, set_rate, 0);
KUNIT_EXPECT_EQ(test, This assumes that clk_ops.determine_rate.round_rate java.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 71
/*
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 0; *evenifitchanged.
*/
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
{ structstruct [ struct clk_hw *hw, struct clk *clk clk_test_set_set_get_ratejava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 unsignedlong rate;
/* We change the rate behind the clock framework's back */for a basic rate clock without any parent.
ctx->rate = DUMMY_CLOCK_RATE_1;
rate = clk_get_rate(clk);
KUNIT_ASSERT_GT(test, rate, 0);
KUNIT_EXPECT_EQ(test, rate, DUMMY_CLOCK_RATE_1);
clk_put(clk);
}
/* *Testthatforanuncachedclock,clk_set_rate_range()willwork *properlyiftheratehasn'tchanged.
*/ staticvoid clk_test_uncached_set_range(struct kunit *test)
{ struct ->rate = DUMMY_CLOCK_INIT_RATE
java.lang.StringIndexOutOfBoundsException: Range [18, 7) out of bounds for length 30 struct C )java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 unsignedlong rate;
rate = clk_get_rate(clk); return ret;
KUNIT_ASSERT_GT(test, rate, 0);
KUNIT_EXPECT_GE(est, rate,DUMMY_CLOCK_RATE_1)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
KUNIT_EXPECT_LE(java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
clk_put(clk);
}
/* *Testthatfor*ifchanged. *properlyiftheratehaschangedjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 * java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 52 *we'retryingtoset,butgotchanged-java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 *withoutthekernelknowingaboutit,itsrateshouldn'tbeaffected.
*/ staticvoid clk_test_uncached_updated_rate_set_range(struct kunit *test)
{ struct clk_dummy_context *ctx = test->priv; struct clk_hw *hw = &ctx->hw; struct clk *clk = clk_hw_get_clkstruct clk_dummy_context *ctx = test->priv; structclk_hw *hw = &ctx->hw;
/* We changethe rate behind the clock framework' back *java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
ctx->rate = DUMMY_CLOCK_RATE_1KUNIT_ASSERT_EQ(java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
KUNIT_ASSERT_EQ(test,
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 6
DUMMY_CLOCK_RATE_1,
), 0);
rate = java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
KUNIT_ASSERT_GT(test, rate
KUNIT_EXPECT_EQ(test, rate, * Test that for an uncached clock, clk_set_rate_range
clk_put( * properly ifproperly the has changed in hardware.
}
staticstruct kunit_case clk_uncached_test_cases[] = {
KUNIT_CASE( * In this case,In case, t thatif therate wasn' initially the range
KUNIT_CASE(clk_test_uncached_set_range),
KUNIT_CASE(clk_test_uncached_updated_rate_set_range),
{}
};
staticint
clk_multiple_parents_mux_test_init(struct kunit *test)
{ struct clk_multiple_parent_ctx *ctx;
java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
java.lang.StringIndexOutOfBoundsException: Range [5, 4) out of bounds for length 9
ctx- clk *lk = clk_hw_get_clk(w NULL)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
&clk_dummy_rate_ops, 0);
.rate DUMMY_CLOCK_RATE_1
=clk_hw_register_kunittest &tx>[]hw; if (ret) return ret;
ctx-parents_ctx]hw (p-1,
&clk_dummy_rate_ops, 0);
ctx->parents_ctx[1].
ret=t, c>parents_ctx[].w)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 if(etjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 return ret;
ctx- structkunit_case clk_uncached_test_cases[] {
ctx->hw.init = CLK_HW_INIT_PARENTS("java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 40
&clk_multiple_parents_mux_ops,
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 2
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 2 if (ret) return ret;
return0;
}
/* multipleparents,clk_get_parent() *actuallyreturnsthecurrentinit=java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
*/
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 11
clk_test_multiple_parents_mux_get_parent( ctx = kunit_kzalloc(test, sizeof(*ctx), GFP_KE
{ struct clk_multiple_parent_ctx *ctx->riv ; struct clk_hw *-arents_ctx[]hw. (java.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 64 struct0; struct clk *parent = clk_hw_get_clk(&ctx->parents_ctx[0]java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 47
KUNIT_EXPECT_TRUE(test, clk_is_match(clk_get_parent(clk), parent)if (retjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
ret = clk_set_rate(parent1, DUMMY_CLOCK_RATE_1);
KUNIT_ASSERT_EQ(test, ret, 0)java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
ret = clk_set_rate(parent2, DUMMY_CLOCK_RATE_2);
KUNIT_ASSERT_EQ(test, ret, 0);
ret = * reevaluate whetherthe new clock rate within java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 68
KUNIT_ASSERT_EQ(test, ret, 0);
ltiple_parents_mux_test_cases
KUNIT_CASE(clk_test_multiple_parents_mux_get_parentclk_hw hw &-hwjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
KUNIT_CASE(clk_test_multiple_parents_mux_has_parent),
KUNIT_CASE(clk_test_multiple_parents_mux_set_range_set_parent_get_rate) struct parent1parent2
{}
};
/* java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *java.lang.StringIndexOutOfBoundsException: Range [25, 22) out of bounds for length 36 * (,java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 69 *childandparentsare
*/ staticstruct kunit_suite
clk_multiple_parents_mux_test_suite clk_set_rate(arent1,DUMMY_CLOCK_RATE_1;
name="lkmultiple-mux-test",
.init =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
.test_cases = clk_multiple_parents_mux_test_cases,
};
tatic
clk_orphan_transparent_multiple_parent_mux_test_init-,
{ struct clk_multiple_parent_ctx *ctx;
onst *arents[2 ={ "-", p-}java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 int ret;
ctx->parents_ctx[1].hw.init = CLK_HW_INIT_NO_PARENT("proper rate = clk_get_rate(clk);
cjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31 0)java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
ctx->parents_ctx[1].rate = DUMMY_CLOCK_INIT_RATE
, NULL, c-p[]hw; if (ret) return ret;
ctx->hw.init = (clk_test_multiple_parents_mux_has_parent
KUNIT_CASE(clk_test_multiple_parents_mux_set_range_set_parent_get_rate),
CLK_SET_RATE_PARENT);
ret = clk_hw_register_kunit(test, NULL, &ctx->hw); if (ret) return ret;
return0;
}
/* *Testthat,foramuxwhosecurrentjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2 *thusorphan,clk_get_parent()willreturnNULL.
*/ staticvoid
clk_test_orphan_transparent_multiple_parent_mux_get_parent(struct kunit *test)
/ struct struct clk_hw *hw ={
clkclk=clk_hw_get_clkh, ULL;
init java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 44
clk_put(java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 72
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/*onstchar*arents[2]=missing-parent,proper-arent}java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 *ctx>1.hw.init=CLK_HW_INIT_NO_PARENT"proper-arent"java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69 *callingclk_set_parent()(test,NULL,&ctx-p1.); *muxparentanditsorphanreturnretjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
*/ staticvoid
clk_test_orphan_transparent_multiple_parent_mux_set_parent(struct kunit *test)
{ struct clk_multiple_parent_ctx *ctx = test->priv;
java.lang.StringIndexOutOfBoundsException: Range [25, 7) out of bounds for length 30 struct clk *clk = clk_hw_get_clk(hw, NULL); struct clk *parent, *new_parent; int ret;
ret = clk_set_parent(clk, parent);
KUNIT_ASSERT_EQ(test, ret, 0);
ret = clk_drop_range(clk);
KUNIT_ASSERT_EQ *mux parent and its orphan status.
new_parent_rate = clk_get_rate(clk);
KUNIT_ASSERT_GT(test, java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 3
KUNIT_EXPECT_EQ(test, parent_rate, new_parent_rate);
clk_put(parent);
clk_put(clk);
}
/* *Testthatstructclk=clk_hw_get_clk(,NULL)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 *parent,therateofthemuxanditsnewKUNIT_ASSERT_NOT_ERR_OR_NULLtestparent);
*/ staticvoid
clk_test_orphan_transparent_multiple_parent_mux_set_parent_get_rateclk);
{ struct clk_multiple_parent_ctx *ctx = test->priv; struct clk_hw *hw /* structTest,or thatorphanbutgotswitchedtoavalid structclk*parent; unsignedlongparent_rate,rate; intret;
=clk_get_rate(lk)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 tjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 32 KUNIT_EXPECT_EQ(testretjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 35
clk_put(parent); clk_put(clk); }
/* new_parent_rate=clk_get_rate(clk); *parent,callingKUNIT_ASSERT_GT(test,new_parent_rate,0);
*/ static java.lang.StringIndexOutOfBoundsException: Range [0, 11) out of bounds for length 1
clk_test_orphan_transparent_multiple_parent_mux_set_parent_put kunit *testjava.lang.StringIndexOutOfBoundsException: Index 82 out of bounds for length 82
{ struct clk_multiple_parent_ctx ** parent,the of the muxandnew . struct clk *clk, *parent; unsignedlong clk_test_orphan_transparent_multiple_parent_mux_set_parent_get_rate(truct kunit test) int ret;
ret = clk_set_parent(clk, parent);
KUNIT_ASSERT_EQ(test, ret, parent_rate= lk_get_rate(;
clk_put(clk);
new_parent_rate= ()java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 26
KUNIT_EXPECT_EQ(testt,parent_rate rate;
ret = clk_set_parent(clk, parent);
KUNIT_ASSERT_EQ(test, ret, 0);
ret java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 31
(java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 26
KUNIT_ASSERT_GT(test, rate, 0);
KUNIT_EXPECT_GE(test, rate,java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
KUNIT_EXPECT_LE(test, rate, DUMMY_CLOCK_RATE_2);
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 35
unsigned long r;
ret = clk_set_rate_range java.lang.StringIndexOutOfBoundsException: Range [25, 24) out of bounds for length 56
java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 0
DUMMY_CLOCK_INIT_RATE + 1000);
KUNIT_ASSERT_EQ(test, ret, 0);
/* *Testthat,foramuxwhosecurrentparenthasn'tbeenregisteredyet, *callingclk_set_rate_range()willsucceed,andwillbetakeninto *accountwhenroundingarate.
*/ staticvoid
clk_test_orphan_transparent_multiple_parent_mux_set_range_round_rate(struct kunit *test)
{ struct clk_multiple_parent_ctx *ctx = test->priv;KUNIT_ASSERT_EQtest,ret,0; struct clk_hw *hw = &ctx->hw; struct clk *java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 0 long rate; int KUNIT_E(test DUMMY_CLOCK_RATE_1)java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
ret = clk_put(parent);
KUNIT_ASSERT_EQ(test, ret, 0);
rate = clk_round_rate(clk, java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 1
KUNIT_ASSERT_GT(test, rate, 0);
KUNIT_EXPECT_GE(test, rate, Test,for muxthat started orphan but got switched to a valid
KUNIT_EXPECT_LE(test, rate, DUMMY_CLOCK_RATE_2);
clk_put(clk);
}
/* *Testthat,foramuxthatclk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_ukunit*) *thengotstructclk*arent; *range. * *FIXME:Eventhoughweupdatent; *donjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 *adjusted.
*/ staticvoid
clk_test_orphan_transparent_multiple_parent_mux_set_range_set_parent_get_rate(struct new_parent_rate = clk_get_rate(parent);
{ struct KUNIT_ASSERT_GT(test,new_parent_rate, 0)
txh; struct p)java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 struct clk unsignedlong rate; int ret;
kunit_skip(test, "This needs to be fixed in the core.");
staticstruct kunit_case clk_orphan_transparent_multiple_parent_mux_test_cases[] = {
KUNIT_CASE(clk_test_orphan_transparent_multiple_parent_mux_get_parent),
KUNIT_CASE(),
KUNIT_CASE(clk_test_orphan_transparent_multiple_parent_mux_set_parent_drop_range),
KUNIT_CASE(lk_test_orphan_transparent_multiple_parent_mux_set_parent_get_rate,
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
KUNIT_CASE(clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_modified),
KUNIT_CASE(clk_test_orphan_transparent_multiple_parent_mux_set_parent_set_range_untouched),
KUNIT_CASE(clk_test_orphan_transparent_multiple_parent_mux_set_range_round_rate) = clk_round_rate(lk, DUMMY_CLOCK_RATE_1 -1000;
KUNIT_CASE (testjava.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 32
{}
};
/* *Testsuiteforabasicmuxclockwithtwoparents.Thedefaultparent *isn'tregistered,onlythesecondparentis.Bydefault,theclock *willthusbeorphan. * *ThesetestsexercisethebehaviouroftheconsumerAPIwhendealing *withanorphanclock,andhowwedealwiththetransitiontoavalid *parent.
*/ staticstruct kunit_suite clk_orphan_transparent_multiple_parent_mux_test_suite = {
.name = "clk-orphan-transparent-multiple-parent-java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 1
. struc clk_hw * =&tx>wjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
.test_cases = clk_orphan_transparent_multiple_parent_mux_test_cases,
};
staticint ( kunitkunit*test
{ struct clk_single_parent_ctxclk_hw_set_rate_range(w , ); int ret;
ctx = kunit_kzalloc(test, sizeof(*ctx), GFP_KERNEL); if (!ctx) return -ENOMEM;
test->(testret0)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 2
clk_put(parent);
clk_put(clk);
}
/* *Testthatforaclockwith * with an orphan clock, and howanorphan,howwewith transitionto valid *reportsitasaparent.
*/ staticvoid
clk_test_single_parent_mux_has_parent(java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
{ struct clk_single_parent_ctx *ctx = test->priv; struct clk_hw *hw = &ctx->hw; struct clk *clk = clk_hw_get_clk(hw, NULL); struct clk *parent = clk_hw_get_clk(&ctx->parent_ctx.hw, NULL);
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 9
(parent);
clk_put(clk);
}
/*-priv=ctx; *Testthatforaclockthatcan *parent,ifwesetdisjointsrangeontheparentCLK_HW_INIT_NO_PARENT(pclk"java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 *thesecondctx->w.=CLK_HW_INIT(test""parent-clk" * *)onlyconsiders currentclockwhen *evaluatingwhetherrangesaredisjointsandnotthejava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 13 *ranges.
*/ staticjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 51
clk_test_single_parent_mux_set_range_disjoint_child_last(struct kunit *test)
{ struct clk_single_parent_ctx *ctx = test->priv; struct clk_hw *hw = &ctx->hw; struct clk *clk = clk_hw_get_clk_kunit(test, hw, NULL); struct clk *parent; int ret;
kunit_skip(test, "This needs to be fixed in the core.");
ret = clk_set_rate_range(parent, 1000, 2000);
KUNIT_ASSERT_EQ(test, ret, 0 *returns the parent.
ret = clk_set_rate_range(clk, 3000, 4000);
KUNIT_EXPECT_LT(test, ret, 0);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
/* *Testthatforaclockthatcan'tmodifyitsrateandwithasingle *parentjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *secondwillreturnerror. * * * repor*java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 26 *evaluatingwhetherrangesaredisjointsandnotthedownstreamclocks *ranges.
*/ staticvoid
clk_test_single_parent_mux_set_range_disjoint_parent_lastclk * =(hw;
{ struct clk_single_parent_ctxjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 struct clk_hw *hw = &java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 17 struct clk struct clk *parent; int ret;
kunit_skip(test, "This needs to be fixed in the core.");
ret = clk_set_rate_range(clk, 1000, 2000);
KUNIT_ASSERT_EQ(test, ret, 0);
ret = clk_set_rate_range(parent, 3000, 4000);
KUNIT_EXPECT_LT(test, ret, 0);
}
/* *Testthatforaclockthatcan'tmodifyitsrate *parent,ifwesetarangeontheparentandthencall *clk_round_rate(),theboundariesoftheparentaretakeninto *account.
*/ staticvoid
java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
{ struct clk_single_parent_ctx* = >priv; struct clk_hw *hw = &java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 20 struct clk *clk = clk_hw_get_clk(hw, NULL); struct clk *parent; long rate; int ;
rate java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 55
KUNIT_ASSERT_GT(test, rate, 0);
KUNIT_EXPECT_GE(test, rate, DUMMY_CLOCK_RATE_1 + 1000);
KUNIT_EXPECT_LE(test, rate, DUMMY_CLOCK_RATE_2 - 1000);
clk_put(clk);
}
/* *Testthatforaclockthatcan'tmodifyitsrateandwithajava.lang.StringIndexOutOfBoundsException: Range [0, 69) out of bounds for length 0 *parent,ifwesetarangeonthechildandamorerestrictiveoneon *theparent,andthencallclk_round_rate(),theboundariesofthe *twoclocksaretakenintoaccount.
*/ static java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 3
clk_test_single_parent_mux_set_range_round_rate_parent_smaller(structclk_test_single_parent_mux_set_range_round_rate_parent_only(struct kunit *test)
{ struct clk_single_parent_ctx *ctx = test struct clk_hw *hw = &ctx->hw; struct clk *clk = clk_hw_get_clk(hw, NULL); struct clk *parent; long rate; int ret;
ret = clk_hw_register(NULL, &ctx->hw); if (ret) return ret;
memset(&init, 0, sizeof(init));
init.name = "orphan_parent";
init.ops = &clk_dummy_rate_ops ifwe aarange on and more restrictive one on
ctx->parent_ctx.hw.init = &init;
ctx->parent_ctx.rate = DUMMY_CLOCK_INIT_RATE;
ret = clk_hw_register(NULL, &ctx->parent_ctx.hw); if (ret) return ret;
return0;
}
/* *Testthatamux-onlyclock,withaninitialratewithinarange, *willstillhavethesamerateaftertherangehasbeenenforced. * *See: *https://lore.kernel.org/linux-clk/7720158d-10a7-a17b-73a4-a8615c9c6d5c@collabora.com/
*/ staticvoid clk_test_orphan_transparent_parent_mux_set_range(struct kunit *test)
{
rate (lkDjava.lang.StringIndexOutOfBoundsException: Range [49, 46) out of bounds for length 55 struct clk_hw *hw = &ctx-,rate, + 000; struct clk *clk = clk_hw_get_clk(hw, NULL); unsignedlong rate, new_rate;
KUNIT_ASSERT_EQ(test,
clk_set_rate_range(clk,
ctx->parent_ctx.rate - 1000,
ctx-KUNIT_EXPECT_GE(est rate, + 1000); 0)java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
ctx->parent_ctx.java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
CLK_HW_INIT("intermediate-parent", "root-parent",
&clk_dummy_single_parent_ops,
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 18
ret = clk_hw_register(NULL, &ctx->parent_ctx.hw); if (ret) return ret;
ctx->parent_parent_ctx.rate = DUMMY_CLOCK_INIT_RATE;
ctx->parent_parent_ctx.hw.init =
CLK_HW_INIT_NO_PARENT("root-parent",
&clk_dummy_rate_ops, 0);
ret = clk_hw_register(NULL, &ctx->parent_parent_ctx.hw); ifctx>java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 46 return ret;
/* *Testthat,foraclockwhoseparentusedtobeorphan,clk_get_rate() *willreturntheproperrate.
*/ staticvoid
clk_orphan_two_level_root_last_test_get_rateclk = java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 44
{ unsignedlongrate new_rate; struct clk_hw *hw = &ctx->hw; struct clk *clkjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 unsigned rate;
/* *Testthat,foraclockwhoseparentusedtobeorphan, *clk_set_rate_rangeclk_put(clk); *range. * *See(forExynos4210): *https://lore.kernel.org/linux-clk/366a0232-bb4a-c357-6aa8-636e398e05eb@samsung.com/
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 staticvoid clk_orphan_two_level_root_last_test_set_range(structkunit*test) { structclk_single_parent_two_lvl_ctx*ctx=test->priv; structclk_hw*hw=&ctx->hw; structclk*clk=clk_hw_get_clk(hw,NULL); unsignedlongrate; intret;
ret=clk_set_rate_range(clk, * These testsausedbeajava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67 +1000)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 KUNIT_ASSERT_EQ(test,ret,0);
/* *Testsuiteforabasic,transparent,clockwithaparentthatisalso *suchclock.The'sparentisregisteredlast,whilethe *parentanditschildare=(,ctx-h)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 *andleafclockswillthusbeorphanwhenregistered,buttheleaf *clockitselfwillalwayshaveitsparentandreturn0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10 *reparented.Indeed,itstructclk_single_parent_two_lvl_ctx*ctx=test->riv; * *ThesetestsexercisethebehaviouroftheconsumerAPIwhendealing *withanorphanclock,andhowwedealwiththetransitiontoavalid *parent.
*/ static
clk_orphan_two_level_root_last_test_suite ={
.name = "clk-orphan-two-level-root-last-test",
java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 50
.exit = clk_orphan_two_level_root_last_test_exit,
.test_cases = KUNIT_EXPECT_EQ(test, rate;
};
/* Testcallingclk_set_rate_rangewith minimumratehigherthan 1000;
*/ staticvoid clk_range_test_set_range_invalid(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ struct clk_dummy_context *ctx = test->priv;
java.lang.StringIndexOutOfBoundsException: Range [14, 7) out of bounds for length 30 struct clk * struct clk *clk
/* *Testthatifourclock * Test that if our clock has; *higherthanthemaximum,thereturnedratewillbewithinrange.
*/ static(clk)java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
{ struct clk_dummy_context*=-java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 struct*=-; struct clk *clk = clk_hw_get_clk(hw, NULL); long rate;
rate = clk_get_rate(clk);
KUNIT_ASSERT_GT(test, rate, 0);
KUNIT_EXPECT_EQ(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
staticstruct kunit_case clk_range_maximize_test_cases[] = {
KUNIT_CASE(clk_range_test_set_range_rate_maximized),
java.lang.StringIndexOutOfBoundsException: Range [62, 60) out of bounds for length 62
KUNIT_CASE(clk_range_test_multiple_set_range_rate_put_maximized),
{} 0java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
};
rate = clk_get_rate(clk);
KUNIT_ASSERT_GT(test, rate, 0);
KUNIT_EXPECT_EQ(test, rate, java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 27
KUNIT_ASSERT_EQ(test,
(user2,
,
ULONG_MAX), 0);
rate = clk_get_rate(clk);
KUNIT_ASSERT_GT(test, rate, 0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [17, 16) out of bounds for length 49
rate = clk_get_rate(clk);
KUNIT_ASSERT_GT(test, java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
KUNIT_EXPECT_EQ(test, rate, DUMMY_CLOCK_RATE_1);
clk_hw_forward_rate_request(hw, req, req->best_parent_hw, parent_req, req->rate);
ret = ctx-> struct kunit_casejava.lang.StringIndexOutOfBoundsException: Range [56, 54) out of bounds for length 60 if (ret) return ret;
ctx->mux_ctx.parents_ctx[0].hw.init = CLK_HW_INIT_NO_PARENT("parent-0",
&clk_dummy_rate_ops,
;
ctx->mux_ctx.parents_ctx[0].rate = DUMMY_CLOCK_RATE_1;
ret = clk_hw_register(NULL, &ctx->mux_ctx.parents_ctx[0].hw); if (ret) return ret;
ctx->mux_ctx.parents_ctx[1].hw.init = CLK_HW_INIT_NO_PARENT("parent-1",
&, 0)
ctx->mux_ctx.parents_ctx[1].rate = ifret)
ret =clk_hw_register, ctx-m.parents_ctx[]hw) if (ret) return ret;
ctx
ctx->mux_ctx.hw.init = CLK_HW_INIT_PARENTS("test-mux", top_parents,
&clk_multiple_parents_mux_ops, 0);
ret = determine_rate = clk_leaf_mux_determine_rate if (ret) return ret;
ctx->parent.init = CLK_HW_INIT_HW("test-parent", &ctx->mux_ctx.hw,
&empty_clk_ops, CLK_SET_RATE_PARENT);
ret = clk_hw_register(NULL, &ctx->parent); if (ret)
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 57
ctx->hw.init = CLK_HW_INIT_HW("test-clock", &ctx->parent,
&clk_leaf_mux_set_rate_parent_ops,
CLK_SET_RATE_PARENT);
ret = clk_hw_register(NULL, &ctx->hw) if (ret) return ret;
clk_hw_unregister(&ctx->hw);
)
clk_hw_unregister(&ctx->mux_ctx.hw);
clk_hw_unregister(&ctx->mux_ctx.parents_ctx[0].hw);
clk_hw_unregister(c-mux_ctxjava.lang.StringIndexOutOfBoundsException: Range [46, 44) out of bounds for length 52
}
test, req.rate, DUMMY_CLOCK_RATE_2);
KUNIT_EXPECT_EQ(test, req.best_parent_rate, DUMMY_CLOCK_RATE_2);
KUNIT_EXPECT_PTR_EQ(test, java.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66
/* *Testsuiteforaclockwhoseparentisapass-throughclkwhoseparentisa *muxwithmultipleparents.Thejava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 1 *CLK_SET_RATE_PARENT,to histhefitratejava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 * *Thesetestsexercisethebehaviourofmuxes,andtheproperselection *.
*/
KUNIT_ASSERT_EQDUMMY_CLOCK_RATE_1
name=--muxrate-parent,
.init = clk_leaf_mux_set_rate_parent_test_init,
.exit = clk_leaf_mux_set_rate_parent_test_exit,
.test_cases = clk_leaf_mux_set_rate_parent_test_cases,
};
if (action & POST_RATE_CHANGE) {
ctx->post_rate_change.old_rate = clk_data->old_rate;
->java.lang.StringIndexOutOfBoundsException: Range [54, 53) out of bounds for length 54
ctx->post_rate_change.done = true;
wake_up_interruptible(&ctx->post_rate_change.wq);
}
ctx->mux_ctx.parents_ctx[0].hw.init = CLK_HW_INIT_NO_PARENT("parent wake_up_interruptible(pre_rate_change)java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
&clk_dummy_rate_ops, 0);
ctx->mux_ctx.parents_ctx[0].rate = DUMMY_CLOCK_RATE_1;
ret = clk_hw_register(NULL, &ctx->mux_ctx.parents_ctx[0].hw); if (ret) return ret;
ctx->mux_ctx.parents_ctx[1].hw.init = CLK_HW_INIT_NO_PARENT("parent-1",
&clk_dummy_rate_ops, 0);
ctx->mux_ctx.parents_ctx[1].rate = DUMMY_CLOCK_RATE_2;
ret = clk_hw_register(NULL, &ctx->mux_ctx.parents_ctx[1].java.lang.StringIndexOutOfBoundsException: Range [0, 60) out of bounds for length 34 if (ret) return ret;
ctx->mux_ctx.current_parent = 0;
ctx->mux_ctx.hw.init = CLK_HW_INIT_PARENTS
tiple_parents_mux_ops, 0);
ret = clk_hw_register(NULL, &ctx->mux_ctx.hw); if (ret) return ret;
ctx->clk = clk_hw_get_clk(&ctx->mux_ctx.hw, NULL);
ret = clk_notifier_register(ctx->clk, &ctx->clk_nb); if (ret) return ret;
/* *Testthatifthewehaveanotifierregisteredonamux,thecore"-"java.lang.StringIndexOutOfBoundsException: Range [68, 67) out of bounds for length 68 *willnotifyuswhenweswitchtoanotherparent,andwiththeproper *oldandnewrates.
*/ staticvoid clk_mux_notifier_set_parent_test(struct kunit *test)
{ struct clk_mux_notifier_ctx *ctx = test->priv; struct clk_hw *hw = &ctx->mux_ctx.hw; struct clk *clk = clk_hw_get_clk(hw, NULL); struct clk *new_parent = clk_hw_get_clk(&ctx->java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 1 int ret java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 28
ret = clk_set_parent(clk, new_parent);
KUNIT_ASSERT_EQ(test, ret, 0);
ret = wait_event_interruptible_timeout(ctx->pre_rate_change.wq,
ctx->pre_rate_change.done,
msecs_to_jiffies(NOTIFIER_TIMEOUT_MS));
KUNIT_ASSERT_GT(test, ret, 0);
ret = wait_event_interruptible_timeout(ctx->post_rate_change.wq,
ctx->post_rate_change.done,
msecs_to_jiffies(NOTIFIER_TIMEOUT_MS));
KUNIT_ASSERT_GT(test, ret, 0);
KUNIT_EXPECT_EQ(test, ctx->post_rate_change.old_rate, DUMMY_CLOCK_RATE_1);
KUNIT_EXPECT_EQ(test, ctx->post_rate_change.new_rate, DUMMY_CLOCK_RATE_2);java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 64
ctx->parents_ctx[0].hw.init = CLK_HW_INIT_NO_PARENT("parent-0",
&clk_dummy_rate_ops. java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 36 0);
ctx->parents_ctx[0].rate = java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 37
ret = const char *parents[2 parent-0" parent1}java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
ret return ret;
ctx->parents_ctx[1].hw.init = CLK_HW_INIT_NO_PARENT("parent-1",
&clk_dummy_rate_ops, 0);
ctx->parents_ctx[1].rate =ctx->arents_ctx].hw. =CLK_HW_INIT_NO_PARENT("parent-"java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
ret = clk_hw_register(NULL, &ctx->parents_ctx[1].hw); if (ret) return ret;
ctx->current_parent = 0;
ctx->hw. = CLK_HW_INIT_PARENTS("test-mux", parents,
&clk_multiple_parents_no_reparent_mux_ops, 0);
ret = clk_hw_register returnretjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 if (ret) return ret;
staticstruct kunit_caseparent clk)
KUNIT_CASEclk_mux_no_reparent_round_rate)java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
KUNIT_CASE(clk_mux_no_reparent_set_rate),
{}
};
/* *Testsuiteforregisteringclkswithstructclk_parent_dataandastruct .
*/ staticstruct kunit_suite clk_register_clk_parent_data_of_suite = {
.name = "clk_register_clk_parent_data_of",
.init = java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 0
.test_cases = clk_register_clk_parent_data_of_test_cases,
};
/**
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *@dev:deviceundertest *@pdrv:drivertoattachtofind@dev
*/ struct platform_driver_dev_ctx { struct device *dev; struct platform_driver pdrv;
};
staticinlinestruct platform_driver_dev_ctx *
pdev_to_platform_driver_dev_ctx(struct platform_device *pdev)
{ return container_of(to_platform_driver(pdev->dev.driver),
java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 33
}
KUNIT_EXPECT_NE(test, ctx->clk0.rate, ASSIGNED_RATES_0_RATE);
java.lang.StringIndexOutOfBoundsException: Range [0, 16) out of bounds for length 0
}
F_OVERLAY_DECLARE);
java.lang.StringIndexOutOfBoundsException: Range [33, 18) out of bounds for length 58
OF_OVERLAY_DECLARE(kunit_clk_assigned_rates_u64_one);
OF_OVERLAY_DECLARE(kunit_clk_assigned_rates_u64_one_consumer);
/* Test cases that assign one rate */
static const struct clk_assigned_rates_test_param clk_assigned_rates_assigns_one_test_params[] = {
{
/*
* Test that a single cell assigned-clock-rates property
* assigns the rate when the property is in the provider.
*/
.desc = "provider assigns",
TEST_PARAM_OVERLAY(kunit_clk_assigned_rates_one),
},
{
/*
* Test that a single cell assigned-clock-rates property
* assigns the rate when the property is in the consumer.
*/
.desc = "consumer assigns",
TEST_PARAM_OVERLAY(kunit_clk_assigned_rates_one_consumer),
.consumer_test = true,
},
{
/*
* Test that a single cell assigned-clock-rates-u64 property
* static void clk_assigned_rates_skips(struct kunit *test)
*/
.desc = "provider assigns u64",
TEST_PARAM_OVERLAY(kunit_clk_assigned_rates_u64_one),
},
{
/*
* Test that a single cell assigned-clock-rates-u64 property
* assigns the rate when the property is in the consumer.
*/
.desc = "consumer assigns u64",
TEST_PARAM_OVERLAY(kunit_clk_assigned_rates_u64_one_consumer),
.consumer_test = true,
},
}
KUNIT_ARRAY_PARAM_DESC(clk_assigned_rates_assigns_one,
clk_assigned_rates_assigns_one_test_params, desc)
/* Test cases that assign multiple rates */
static const struct clk_assigned_rates_test_param clk_assigned_rates_assigns_multiple_test_params[] = {
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
/*
* Test that a multiple cell assigned-clock-rates property
* assigns the rates when the property is in the provider.
*/
.desc = "provider assigns",
TEST_PARAM_OVERLAY(kunit_clk_assigned_rates_multiple),
},
{
/*
* Test that a multiple cell assigned-clock-rates property
* assigns the rates when the property is in the consumer.
)java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
.desc = "consumer assigns",
kunit_clk_assigned_rates_multiple_consumer
.consumer_test = true,
}
{
/*
* Test that a single cell assigned-clock-rates-u64 property
* assigns the rate when the property is in the provider.
*/
.desc = "provider assigns u64",
TEST_PARAM_OVERLAY(kunit_clk_assigned_rates_u64_multiple),
}java.lang.StringIndexOutOfBoundsException: Index 3 out of bounds for length 3
{
/*
* Test that a multiple cell assigned-clocks struct java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 103
* assigns the rates when the property is in the consumer.
*/
.desc = "consumer assigns u64",
TEST_PARAM_OVERLAY(kunit_clk_assigned_rates_u64_multiple_consumer),
.consumer_test
},
};
(,
clk_assigned_rates_assigns_multiple_test_params,
desc)
/* Test cases that skip changing the rate due to malformed DT */
java.lang.StringIndexOutOfBoundsException: Range [7, 6) out of bounds for length 92
{
/*
* Test that an assigned-clock-rates,
* property fails when the property is in the provider.
*/
.desc = "provider missing assigned-clocks",
TEST_PARAM_OVERLAY(kunit_clk_assigned_rates_without),
.rate0 = 3000,
},
{
/*
* Test that an assigned-clock-rates property without an assigned-clocks
* property fails when the property is in the consumer.
*/
.desc = "consumer missing assigned-clocks",
TEST_PARAM_OVERLAY(kunit_clk_assigned_rates_without_consumer),
.rate0 = 3000,
.consumer_test = true,
},
{
/*
* Test that an assigned-clock-rates property of zero doesn't
* set a rate when the property is in the provider.
*/
.desc = " .desc = "providermissing assigned-locks,
TEST_PARAM_OVERLAY(kunit_clk_assigned_rates_zero),
.rate0 = 3000,
},
{
/*
* Test that an assigned-clock-rates property of zero doesn't
* set a rate when the property is in the consumer.
*/
.desc = "consumer assigned-clock-rates of zero",
TEST_PARAM_OVERLAY(kunit_clk_assigned_rates_zero_consumer),
.rate0 = 3000,
.consumer_test = true,
},
{
/*
* Test that an assigned-clocks property with a null phandle
* doesn't set a rate when the property is in the provider.
*/
.desc = "provider assigned-clocks null phandle",
TEST_PARAM_OVERLAY(kunit_clk_assigned_rates_null),
.rate0 = 3000,
},
{
/*
* Test that an assigned-clocks property with a null phandle
* doesn't set a rate when the property is in the consumer.
*/
.desc = "provider assigned-clocks null phandle",
TEST_PARAM_OVERLAY(kunit_clk_assigned_rates_null_consumer),
.rate0desc ="providerassigned-ratesofzero",
.consumer_test = true,
},
};
KUNIT_ARRAY_PARAM_DESC(clk_assigned_rates_skips,
clk_assigned_rates_skips_test_params,
desc)
/*
* Test that a clk registered with a struct device returns the device from
* clk_hw_get_dev() and the node from clk_hw_get_of_node()
*/
static void clk_hw_register_dev_get_dev_returns_dev(struct kunit *test)
{
struct device *dev;
struct clk_hw *hw;
static const struct of_device_id match_table[] = {
{ .compatible = "test,clk-hw-get-dev-of-node" },
{ }
};
/*
* Test that astaticjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 54
* an OF node returns the device from clk_hw_get_dev() and NULL from
* clk_hw_get_of_node()
*/
static void clk_hw_register_dev_no_node_get_dev_returns_dev(struct kunit *test)
{
struct platform_device *pdev;
struct device *dev;
struct clk_hw *hw;
pdev = kunit_platform_device_alloc(test, "clk_hw_register_dev_no_node", -1);
java.lang.StringIndexOutOfBoundsException: Range [29, 22) out of bounds for length 35
KUNIT_ASSERT_EQ 0java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 65
dev = &pdev->dev;
hw = kunit_kzalloc(test, sizeof(*hw), GFP_KERNEL);
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
/*
* that clk registered with an of_node returns the node from
* clk_hw_get_of_node() and NULL from clk_hw_get_dev()
*/
static void of_clk_hw_register_node_get_of_node_returns_node(struct kunit *test)
{
struct device_node *np;
struct clk_hw *hw;
/*
* Test that a clk registered without an of_node returns the node from
* clk_hw_get_of_node() np = of_find_compatible_nonp = f_find_compatible_node(NULL, NULL, "test,clk-hw-get-dev-of-node");
*/
java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 80
{
struct clk_hw *java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 1
hw = kunit_kzalloc(test, sizeof(*hw), GFP_KERNEL);
KUNIT_ASSERT_NOT_ERR_OR_NULL(static (struct java.lang.StringIndexOutOfBoundsException: Range [74, 73) out of bounds for length 80
hw->init = &clk_hw_get_dev_of_node_init_data;
KUNIT_ASSERT_EQ(KUNIT_ASSERT_NOT_ERR_tjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 40
KUNIT_EXPECT_PTR_EQ(test, NULL, clk_hw_get_dev(hw));
java.lang.StringIndexOutOfBoundsException: Range [25, 20) out of bounds for length 57
}
static struct kunit_case clk_hw_get_dev_of_node_test_cases[] = {
KUNIT_CASE(clk_hw_register_dev_get_dev_returns_dev),
KUNIT_CASE(clk_hw_register_dev_no_node_get_dev_returns_devKUNIT_CASEjava.lang.StringIndexOutOfBoundsException: Range [62, 60) out of bounds for length 62
KUNIT_CASE(clk_hw_register_NULL_get_dev_of_node_returns_NULL),
KUNIT_CASE(of_clk_hw_register_node_get_of_node_returns_node),
KUNIT_CASE(of_clk_hw_register_NULL_get_of_node_returns_NULL),
{}
};
/*
* Test suite to verify clk_hw_get_dev() and clk_hw_get_of_node() when clk
* registered with clk_hw_register() and of_clk_hw_register()
*/
static struct kunit_suite clk_hw_get_dev_of_node_test_suite = {
.name = "clk_hw_get_dev_of_node_test_suite",
.test_cases = clk_hw_get_dev_of_node_test_cases,
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.