Skip to contentSkip to conversation

xl: correct test condition on libxl_domain_info

PATCH Applied Wei Liu 4 participants 7 messages Nov 12, 2014 – Nov 14, 2014

lore
Share & tools
lore

Wei Liu

author
#0 lore raw

PATCH 1/1 xl: correct test condition on libxl_domain_info

The `if' statement considered return value 0 from libxl_domain_info an error, while 0 actually means success.

Cc Ian Campbell <[email protected]>
Cc Ian Jackson <[email protected]>

---
This is a bug fix for PSR feature. This feature was added recently and it's not an regression. However, it would be good to have it working correctly since the beginning, and the fix is straightforward, which should be of very low risk.

---
 tools/libxl/xl_cmdimpl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxl/xl_cmdimpl.c +1 -1
index 3c9f146..9afef3f 100644
@@ -7908,7 +7908,7 @@ static int psr_cmt_show_cache_occupancy(uint32_t domid)
     /* Each domain */
     if (domid != INVALID_DOMID) {
         libxl_dominfo dominfo;
-        if (!libxl_domain_info(ctx, &dominfo, domid)) {
+        if (libxl_domain_info(ctx, &dominfo, domid)) {
             fprintf(stderr, "Failed to get domain info for %d\n", domid);
             return -1;
         }
Signature · 1 line
1.7.10.4
Acked-by on v1 1/1
#1 lore raw

CCing the folks who signed-of-by is on the original patch

Quoted 4 lines · Wei Liu

The `if' statement considered return value 0 from libxl_domain_info an error, while 0 actually means success.

Quoted 6 lines
Cc Ian Jackson <[email protected]>

---
This is a bug fix for PSR feature. This feature was added recently and it's not an regression. However, it would be good to have it working correctly since the beginning, and the fix is straightforward, which should be of very low risk.

Ack.

Quoted 17 lines
---
 tools/libxl/xl_cmdimpl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxl/xl_cmdimpl.c +1 -1
index 3c9f146..9afef3f 100644
@@ -7908,7 +7908,7 @@ static int psr_cmt_show_cache_occupancy(uint32_t domid)
     /* Each domain */
     if (domid != INVALID_DOMID) {
         libxl_dominfo dominfo;
-        if (!libxl_domain_info(ctx, &dominfo, domid)) {
+        if (libxl_domain_info(ctx, &dominfo, domid)) {
             fprintf(stderr, "Failed to get domain info for %d\n", domid);
             return -1;
         }
#2 lore raw
Quoted 10 lines · Ian Campbell

CCing the folks who signed-of-by is on the original patch

Quoted 4 lines · Wei Liu

The `if' statement considered return value 0 from libxl_domain_info an error, while 0 actually means success.

Quoted 8 lines
Quoted 6 lines
Cc Ian Jackson <[email protected]>

---
This is a bug fix for PSR feature. This feature was added recently and it's not an regression. However, it would be good to have it working correctly since the beginning, and the fix is straightforward, which should be of very low risk.

Ack.

I concur and I think it should go in Xen 4.5, but I would like their input first.

Quoted 25 lines
Quoted 10 lines
---
 tools/libxl/xl_cmdimpl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxl/xl_cmdimpl.c +0 -0
index 3c9f146..9afef3f 100644

tools/libxl/xl_cmdimpl.c static int psr_cmt_show_cache_occupancy(uint32_t domid) · line 7914

Quoted 8 lines
tools/libxl/xl_cmdimpl.c +1 -1
@@ -7908,7 +7908,7 @@ static int psr_cmt_show_cache_occupancy(uint32_t domid)
     /* Each domain */
     if (domid != INVALID_DOMID) {
         libxl_dominfo dominfo;
-        if (!libxl_domain_info(ctx, &dominfo, domid)) {
+        if (libxl_domain_info(ctx, &dominfo, domid)) {
             fprintf(stderr, "Failed to get domain info for %d\n", domid);
             return -1;
         }

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

author
#3 lore raw
Quoted 18 lines · Konrad Rzeszutek Wilk
Quoted 17 lines · Ian Campbell

CCing the folks who signed-of-by is on the original patch

Quoted 4 lines · Wei Liu

The `if' statement considered return value 0 from libxl_domain_info an error, while 0 actually means success.

Quoted 6 lines
Cc Ian Jackson <[email protected]>

---
This is a bug fix for PSR feature. This feature was added recently and it's not an regression. However, it would be good to have it working correctly since the beginning, and the fix is straightforward, which should be of very low risk.

Quoted 5 lines
Quoted 1 line

Ack.

I concur and I think it should go in Xen 4.5, but I would like their input first.

Dude, you're so cautious! ;-)

Quoted 25 lines
Quoted 25 lines
Quoted 10 lines
---
 tools/libxl/xl_cmdimpl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxl/xl_cmdimpl.c +0 -0
index 3c9f146..9afef3f 100644

tools/libxl/xl_cmdimpl.c static int psr_cmt_show_cache_occupancy(uint32_t domid) · line 7914

Quoted 8 lines
tools/libxl/xl_cmdimpl.c +1 -1
@@ -7908,7 +7908,7 @@ static int psr_cmt_show_cache_occupancy(uint32_t domid)
     /* Each domain */
     if (domid != INVALID_DOMID) {
         libxl_dominfo dominfo;
-        if (!libxl_domain_info(ctx, &dominfo, domid)) {
+        if (libxl_domain_info(ctx, &dominfo, domid)) {
             fprintf(stderr, "Failed to get domain info for %d\n", domid);
             return -1;
         }

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#4 lore raw
In reply to Konrad Rzeszutek Wilk
Quoted 18 lines · Konrad Rzeszutek Wilk
Quoted 17 lines · Ian Campbell

CCing the folks who signed-of-by is on the original patch

Quoted 4 lines · Wei Liu

The `if' statement considered return value 0 from libxl_domain_info an error, while 0 actually means success.

Quoted 6 lines
Cc Ian Jackson <[email protected]>

---
This is a bug fix for PSR feature. This feature was added recently and it's not an regression. However, it would be good to have it working correctly since the beginning, and the fix is straightforward, which should be of very low risk.

Quoted 4 lines
Quoted 1 line

Ack.

I concur and I think it should go in Xen 4.5, but I would like their input first.

Yeah, I'd like it to go in.
Thanks Wei for your quick fix.

Chao

Quoted 26 lines
Quoted 26 lines
Quoted 11 lines

---
 tools/libxl/xl_cmdimpl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxl/xl_cmdimpl.c +0 -0
index 3c9f146..9afef3f 100644

tools/libxl/xl_cmdimpl.c static int psr_cmt_show_cache_occupancy(uint32_t domid) · line 7914

Quoted 8 lines
tools/libxl/xl_cmdimpl.c +1 -1
@@ -7908,7 +7908,7 @@ static int psr_cmt_show_cache_occupancy(uint32_t domid)
     /* Each domain */
     if (domid != INVALID_DOMID) {
         libxl_dominfo dominfo;
-        if (!libxl_domain_info(ctx, &dominfo, domid)) {
+        if (libxl_domain_info(ctx, &dominfo, domid)) {
             fprintf(stderr, "Failed to get domain info for %d\n", domid);
             return -1;
         }

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#5 lore raw
Quoted 23 lines · Chao Peng
Quoted 5 lines · Konrad Rzeszutek Wilk
Quoted 4 lines · Ian Campbell

CCing the folks who signed-of-by is on the original patch

Quoted 1 line · Wei Liu

The `if' statement considered return value 0 from

libxl_domain_info an

Quoted 9 lines
Quoted 9 lines
Quoted 3 lines

error, while 0 actually means success.

Quoted 3 lines
Cc Ian Jackson <[email protected]>

---
This is a bug fix for PSR feature. This feature was added

recently and it's

Quoted 1 line
Quoted 1 line
Quoted 1 line

not an regression. However, it would be good to have it working

correctly

Quoted 1 line
Quoted 1 line
Quoted 1 line

since the beginning, and the fix is straightforward, which should

be of

Quoted 2 lines
Quoted 2 lines
Quoted 1 line

very low risk.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

Ack.

I concur and I think it should go in Xen 4.5, but I would like their input first.

Yeah, I'd like it to go in.
Thanks Wei for your quick fix.

Quoted 30 lines

Chao

Quoted 11 lines
Quoted 11 lines

tools/libxl/xl_cmdimpl.c static int

Quoted 11 lines

---
 tools/libxl/xl_cmdimpl.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/libxl/xl_cmdimpl.c +0 -0
index 3c9f146..9afef3f 100644
@@ -7908,7 +7908,7 @@ static int

psr_cmt_show_cache_occupancy(uint32_t domid)

Quoted 6 lines
Quoted 6 lines

tools/libxl/xl_cmdimpl.c static int psr_cmt_show_cache_occupancy(uint32_t domid)

Quoted 6 lines
tools/libxl/xl_cmdimpl.c +1 -1
     /* Each domain */
     if (domid != INVALID_DOMID) {
         libxl_dominfo dominfo;
-        if (!libxl_domain_info(ctx, &dominfo, domid)) {
+        if (libxl_domain_info(ctx, &dominfo, domid)) {
             fprintf(stderr, "Failed to get domain info for

%d\n", domid);

Quoted 9 lines
Quoted 9 lines

tools/libxl/xl_cmdimpl.c static int psr_cmt_show_cache_occupancy(uint32_t domid) · line 7914

Quoted 2 lines
tools/libxl/xl_cmdimpl.c +0 -0
             return -1;
         }

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel