Google
  Web www.spinics.net

Re: [PATCH] Remove translations in socket test case

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


On 11/03/2011 06:54 AM, Daniel P. Berrange wrote:
From: "Daniel P. Berrange"<berrange@xxxxxxxxxx>

The test case errors should not be translated since they're only
targetted at developers, not users.

* tests/virnetsockettest.c: Remove error reporting with translations
---
  tests/virnetsockettest.c |   14 ++++----------
  1 files changed, 4 insertions(+), 10 deletions(-)

Pushed as a build breaker fix (make syntax-check fails)

diff --git a/tests/virnetsockettest.c b/tests/virnetsockettest.c
index a76e5cc..16713e8 100644
--- a/tests/virnetsockettest.c
+++ b/tests/virnetsockettest.c
@@ -207,14 +207,11 @@ static int testSocketUNIXAccept(const void *data ATTRIBUTE_UNUSED)

      tmpdir = mkdtemp(template);
      if (tmpdir == NULL) {
-        virReportSystemError(errno, "%s",
-                             _("Failed to create temporary directory"));
+        VIR_WARN("Failed to create temporary directory");
          goto cleanup;
      }
-    if (virAsprintf(&path, "%s/test.sock", tmpdir)<  0) {
-        virReportOOMError();
+    if (virAsprintf(&path, "%s/test.sock", tmpdir)<  0)
          goto cleanup;
-    }

      if (virNetSocketNewListenUNIX(path, 0700, -1, getgid(),&lsock)<  0)
          goto cleanup;
@@ -260,14 +257,11 @@ static int testSocketUNIXAddrs(const void *data ATTRIBUTE_UNUSED)

      tmpdir = mkdtemp(template);
      if (tmpdir == NULL) {
-        virReportSystemError(errno, "%s",
-                             _("Failed to create temporary directory"));
+        VIR_WARN("Failed to create temporary directory");
          goto cleanup;
      }
-    if (virAsprintf(&path, "%s/test.sock", tmpdir)<  0) {
-        virReportOOMError();
+    if (virAsprintf(&path, "%s/test.sock", tmpdir)<  0)
          goto cleanup;
-    }

      if (virNetSocketNewListenUNIX(path, 0700, -1, getgid(),&lsock)<  0)
          goto cleanup;
ACK

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Virt Tools]     [Libvirt Users]     [Fedora Users]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]

Powered by Linux

Google
  Web www.spinics.net