From: frank zago <fzago-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
To: "linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
<linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>
Cc: Ido Shamai <idos-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org>
Subject: [PATCH] perftest fixes
Date: Wed, 02 Feb 2011 12:19:18 -0600 [thread overview]
Message-ID: <4D49A026.4070308@systemfabricworks.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 136 bytes --]
Hello,
This fixes a bug in 3 tests where the result of ibv_open_device is not checked. I added a couple missing endlines too.
Frank.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: perftest-fix.diff --]
[-- Type: text/x-diff; name="perftest-fix.diff", Size: 2492 bytes --]
diff --git a/COPYING b/COPYING
diff --git a/Makefile b/Makefile
diff --git a/README b/README
diff --git a/clock_test.c b/clock_test.c
diff --git a/get_clock.c b/get_clock.c
diff --git a/get_clock.h b/get_clock.h
diff --git a/multicast_resources.c b/multicast_resources.c
diff --git a/multicast_resources.h b/multicast_resources.h
diff --git a/perftest.spec b/perftest.spec
diff --git a/perftest_resources.c b/perftest_resources.c
diff --git a/perftest_resources.h b/perftest_resources.h
diff --git a/rdma_bw.c b/rdma_bw.c
diff --git a/rdma_lat.c b/rdma_lat.c
diff --git a/read_bw.c b/read_bw.c
diff --git a/read_lat.c b/read_lat.c
diff --git a/runme b/runme
diff --git a/send_bw.c b/send_bw.c
index 61ebb52..7d59d8a 100644
--- a/send_bw.c
+++ b/send_bw.c
@@ -1173,9 +1173,13 @@ int main(int argc, char *argv[])
// Should be a function over here that computes the inline.
context = ibv_open_device(ib_dev);
-
+ if (!context) {
+ fprintf(stderr, "Failed to open device %s\n",
+ ibv_get_device_name(ib_dev));
+ return 1;
+ }
if (ibv_query_device(context, &device_attribute)) {
- fprintf(stderr, "Failed to query device props");
+ fprintf(stderr, "Failed to query device props\n");
return 1;
}
if ((device_attribute.vendor_part_id == 25408 ||
diff --git a/send_lat.c b/send_lat.c
diff --git a/write_bw.c b/write_bw.c
index 5851835..0f6ca17 100644
--- a/write_bw.c
+++ b/write_bw.c
@@ -773,8 +773,13 @@ int main(int argc, char *argv[])
return 7;
context = ibv_open_device(ib_dev);
+ if (!context) {
+ fprintf(stderr, " Failed to open device %s\n",
+ ibv_get_device_name(ib_dev));
+ return 1;
+ }
if (ibv_query_device(context, &device_attribute)) {
- fprintf(stderr, " Failed to query device props");
+ fprintf(stderr, " Failed to query device props\n");
return 1;
}
if ((device_attribute.vendor_part_id == 25408 ||
diff --git a/write_bw_postlist.c b/write_bw_postlist.c
index 0349c40..0350082 100644
--- a/write_bw_postlist.c
+++ b/write_bw_postlist.c
@@ -721,8 +721,13 @@ int main(int argc, char *argv[])
}
context = ibv_open_device(ib_dev);
+ if (!context) {
+ fprintf(stderr, "Failed to open device %s\n",
+ ibv_get_device_name(ib_dev));
+ return 1;
+ }
if (ibv_query_device(context, &device_attribute)) {
- fprintf(stderr, "Failed to query device props");
+ fprintf(stderr, "Failed to query device props\n");
return 1;
}
if ((device_attribute.vendor_part_id == 25408 ||
diff --git a/write_lat.c b/write_lat.c
next reply other threads:[~2011-02-02 18:19 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-02 18:19 frank zago [this message]
[not found] ` <4D49A026.4070308-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
2011-02-02 18:37 ` [PATCH] perftest fixes frank zago
[not found] ` <4D49A475.4020102-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
2011-02-15 9:16 ` Ido Shamai
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=4D49A026.4070308@systemfabricworks.com \
--to=fzago-klaocwyjdxkshymvu7je4pqqe7ycjdx5@public.gmane.org \
--cc=idos-LDSdmyG8hGV8YrgS2mwiifqBs+8SCbDb@public.gmane.org \
--cc=linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.