Currently, we are opening the cpuinfo file via fopen() which if fails
doesn't print any error message. We should do that instead.
Signed-off-by: Michal Privoznik <mprivozn(a)redhat.com>
---
tests/nodeinfotest.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/nodeinfotest.c b/tests/nodeinfotest.c
index f0b8196..650a674 100644
--- a/tests/nodeinfotest.c
+++ b/tests/nodeinfotest.c
@@ -39,8 +39,11 @@ linuxTestCompareFiles(const char *cpuinfofile,
goto fail;
cpuinfo = fopen(cpuinfofile, "r");
- if (!cpuinfo)
+ if (!cpuinfo) {
+ fprintf(stderr, "unable to open: %s : %s\n",
+ cpuinfofile, strerror(errno));
goto fail;
+ }
memset(&nodeinfo, 0, sizeof(nodeinfo));
if (linuxNodeInfoCPUPopulate(cpuinfo, sysfs_dir, arch, &nodeinfo) < 0) {
--
1.8.5.5