public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@ens-lyon.org>
To: libc-alpha@sourceware.org
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Subject: [hurd,commited] hurd: fix resolv/tst-resolv-res_init-skeleton.c build
Date: Sun, 03 Sep 2017 17:45:00 -0000	[thread overview]
Message-ID: <20170903174536.32417-1-samuel.thibault@ens-lyon.org> (raw)

	* resolv/tst-resolv-res_init-skeleton.c (run_res_init)
	[!CLONE_NEWUTS]: Fail as unsupported if hostname is not NULL.
---
 ChangeLog                             | 2 ++
 resolv/tst-resolv-res_init-skeleton.c | 4 ++++
 2 files changed, 6 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 824f19a272..f2e61b7ffd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -35,6 +35,8 @@
 	RWF_NOWAIT): Define to 0 if undefined already.
 	(do_test_with_invalid_flags): Set invalid_flag to 2 if RWF_SUPPORTED
 	boils down to 0.
+	* resolv/tst-resolv-res_init-skeleton.c (run_res_init)
+	[!CLONE_NEWUTS]: Fail as unsupported if hostname is not NULL.
 
 2017-09-01  Joseph Myers  <joseph@codesourcery.com>
 
diff --git a/resolv/tst-resolv-res_init-skeleton.c b/resolv/tst-resolv-res_init-skeleton.c
index 3b7b4129e3..a1bf110910 100644
--- a/resolv/tst-resolv-res_init-skeleton.c
+++ b/resolv/tst-resolv-res_init-skeleton.c
@@ -341,11 +341,15 @@ run_res_init (void *closure)
     setenv ("RES_OPTIONS", ctx->t->res_options, 1);
   if (ctx->t->hostname != NULL)
     {
+#ifdef CLONE_NEWUTS
       /* This test needs its own namespace, to avoid changing the host
          name for the parent, too.  */
       TEST_VERIFY_EXIT (unshare (CLONE_NEWUTS) == 0);
       if (sethostname (ctx->t->hostname, strlen (ctx->t->hostname)) != 0)
         FAIL_EXIT1 ("sethostname (\"%s\"): %m", ctx->t->hostname);
+#else
+      FAIL_UNSUPPORTED ("clone (CLONE_NEWUTS) not supported");
+#endif
     }
 
   switch (ctx->init)
-- 
2.14.1

                 reply	other threads:[~2017-09-03 17:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20170903174536.32417-1-samuel.thibault@ens-lyon.org \
    --to=samuel.thibault@ens-lyon.org \
    --cc=libc-alpha@sourceware.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).