* [PATCH] perftest fixes
@ 2011-02-02 18:19 frank zago
[not found] ` <4D49A026.4070308-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: frank zago @ 2011-02-02 18:19 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; +Cc: Ido Shamai
[-- 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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] perftest fixes
[not found] ` <4D49A026.4070308-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
@ 2011-02-02 18:37 ` frank zago
[not found] ` <4D49A475.4020102-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: frank zago @ 2011-02-02 18:37 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org; +Cc: Ido Shamai
On 02/02/2011 12:19 PM, frank zago wrote:
> 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.
I forgot:
Signed-off-by: Frank Zago <fzago-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] perftest fixes
[not found] ` <4D49A475.4020102-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
@ 2011-02-15 9:16 ` Ido Shamai
0 siblings, 0 replies; 3+ messages in thread
From: Ido Shamai @ 2011-02-15 9:16 UTC (permalink / raw)
To: frank zago; +Cc: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Applied . Thanks Frank
On 2/2/2011 8:37 PM, frank zago wrote:
> Signed-off-by: Frank Zago <fzago-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-02-15 9:16 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-02 18:19 [PATCH] perftest fixes frank zago
[not found] ` <4D49A026.4070308-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
2011-02-02 18:37 ` frank zago
[not found] ` <4D49A475.4020102-klaOcWyJdxkshyMvu7JE4pqQE7yCjDx5@public.gmane.org>
2011-02-15 9:16 ` Ido Shamai
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox