Re: [PATCH v12 10/18] kunit: test: add tests for kunit test abort
On Mon, Aug 12, 2019 at 10:57 PM Stephen Boyd wrote: > > Quoting Brendan Higgins (2019-08-12 22:06:04) > > On Mon, Aug 12, 2019 at 9:24 PM Stephen Boyd wrote: > > > > > > Quoting Brendan Higgins (2019-08-12 11:24:13) > > > > + > > > > +static int kunit_try_catch_test_init(struct kunit *test) > > > > +{ > > > > + struct kunit_try_catch_test_context *ctx; > > > > + > > > > + ctx = kunit_kzalloc(test, sizeof(*ctx), GFP_KERNEL); > > > > > > Can this fail? Should return -ENOMEM in that case? > > > > Yes, I should do that. > > Looks like it's asserted to not be an error. If it's pushed into the API > then there's nothing to do here, and you can have my reviewed-by on this > patch. > > Reviewed-by: Stephen Boyd Cool, thanks! ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
Re: [PATCH v12 10/18] kunit: test: add tests for kunit test abort
Quoting Brendan Higgins (2019-08-12 22:06:04) > On Mon, Aug 12, 2019 at 9:24 PM Stephen Boyd wrote: > > > > Quoting Brendan Higgins (2019-08-12 11:24:13) > > > + > > > +static int kunit_try_catch_test_init(struct kunit *test) > > > +{ > > > + struct kunit_try_catch_test_context *ctx; > > > + > > > + ctx = kunit_kzalloc(test, sizeof(*ctx), GFP_KERNEL); > > > > Can this fail? Should return -ENOMEM in that case? > > Yes, I should do that. Looks like it's asserted to not be an error. If it's pushed into the API then there's nothing to do here, and you can have my reviewed-by on this patch. Reviewed-by: Stephen Boyd ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
Re: [PATCH v12 10/18] kunit: test: add tests for kunit test abort
On Mon, Aug 12, 2019 at 9:24 PM Stephen Boyd wrote: > > Quoting Brendan Higgins (2019-08-12 11:24:13) > > + > > +static int kunit_try_catch_test_init(struct kunit *test) > > +{ > > + struct kunit_try_catch_test_context *ctx; > > + > > + ctx = kunit_kzalloc(test, sizeof(*ctx), GFP_KERNEL); > > Can this fail? Should return -ENOMEM in that case? Yes, I should do that. > > + test->priv = ctx; > > + > > + ctx->try_catch = kunit_kmalloc(test, > > + sizeof(*ctx->try_catch), > > + GFP_KERNEL); ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm
Re: [PATCH v12 10/18] kunit: test: add tests for kunit test abort
Quoting Brendan Higgins (2019-08-12 11:24:13) > + > +static int kunit_try_catch_test_init(struct kunit *test) > +{ > + struct kunit_try_catch_test_context *ctx; > + > + ctx = kunit_kzalloc(test, sizeof(*ctx), GFP_KERNEL); Can this fail? Should return -ENOMEM in that case? > + test->priv = ctx; > + > + ctx->try_catch = kunit_kmalloc(test, > + sizeof(*ctx->try_catch), > + GFP_KERNEL); ___ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm