From: "Verma, Vishal L" <vishal.l.verma@intel.com>
To: "sbhat@linux.ibm.com" <sbhat@linux.ibm.com>,
"linux-nvdimm@lists.01.org" <linux-nvdimm@lists.01.org>,
"harish@linux.ibm.com" <harish@linux.ibm.com>,
"Williams, Dan J" <dan.j.williams@intel.com>,
"santosh@fossix.org" <santosh@fossix.org>,
"vaibhav@linux.ibm.com" <vaibhav@linux.ibm.com>
Subject: Re: [PATCH 2/4] test: Don't skip tests if nfit modules are missing
Date: Wed, 12 May 2021 21:06:06 +0000 [thread overview]
Message-ID: <b8492c711f6145afe1bbeab726d26a4987cd0557.camel@intel.com> (raw)
In-Reply-To: <b5b8d378a757640c9e6345a1239e5c611a08dde1.camel@intel.com>
On Wed, 2021-05-12 at 21:00 +0000, Verma, Vishal L wrote:
>
> Did you mean for the errno check to be if (errno != ENOENT) ?
> This is what was causing the unit test failure for me. This patch on
> top fixes it for me:
>
> diff --git a/test/core.c b/test/core.c
> index 44cb277..698bb66 100644
> --- a/test/core.c
> +++ b/test/core.c
> @@ -139,7 +139,7 @@ int ndctl_test_init(struct kmod_ctx **ctx, struct
> kmod_module **mod,
> * determine from the environment variable NVDIMM_TEST_FAMILY
> */
> if (access("/sys/bus/acpi", F_OK) == 0) {
> - if (errno == ENOENT)
> + if (errno != ENOENT)
> family = NVDIMM_FAMILY_INTEL;
> }
Also, looks like for access(<path>, F_OK), it should be sufficient to
just test for the return value instead of return value and errno.
_______________________________________________
Linux-nvdimm mailing list -- linux-nvdimm@lists.01.org
To unsubscribe send an email to linux-nvdimm-leave@lists.01.org
next prev parent reply other threads:[~2021-05-12 21:06 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-28 2:09 [PATCH 1/4] libndctl: Unify adding dimms for papr and nfit families Santosh Sivaraj
2021-03-28 2:09 ` [PATCH 2/4] test: Don't skip tests if nfit modules are missing Santosh Sivaraj
2021-04-05 12:25 ` Aneesh Kumar K.V
2021-04-07 5:09 ` Santosh Sivaraj
2021-04-30 16:35 ` Verma, Vishal L
2021-05-01 6:27 ` Santosh Sivaraj
2021-05-12 21:00 ` Verma, Vishal L
2021-05-12 21:06 ` Verma, Vishal L [this message]
2021-05-13 4:40 ` Santosh Sivaraj
2021-05-13 5:15 ` Santosh Sivaraj
2021-03-28 2:10 ` [PATCH 3/4] papr: Add support to parse save_fail flag for dimm Santosh Sivaraj
2021-03-28 2:10 ` [PATCH 4/4] Use page size as alignment value Santosh Sivaraj
2021-03-28 2:15 ` [PATCH 1/4] libndctl: Unify adding dimms for papr and nfit families Santosh Sivaraj
[not found] <draft-87h7jn2co4.fsf@fossix.org>
2021-05-01 10:51 ` [PATCH 2/4] test: Don't skip tests if nfit modules are missing Santosh Sivaraj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=b8492c711f6145afe1bbeab726d26a4987cd0557.camel@intel.com \
--to=vishal.l.verma@intel.com \
--cc=dan.j.williams@intel.com \
--cc=harish@linux.ibm.com \
--cc=linux-nvdimm@lists.01.org \
--cc=santosh@fossix.org \
--cc=sbhat@linux.ibm.com \
--cc=vaibhav@linux.ibm.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).