Patchwork wordexp: Split out command execution tests from posix/wordexp-test

login
register
mail settings
Submitter Florian Weimer
Date Oct. 8, 2019, 5 p.m.
Message ID <87k19f9np8.fsf@oldenburg2.str.redhat.com>
Download mbox | patch
Permalink /patch/34877/
State Committed
Headers show

Comments

Florian Weimer - Oct. 8, 2019, 5 p.m.
* Joseph Myers:

> On Tue, 8 Oct 2019, Florian Weimer wrote:
>
>> +#ifdef CLONE_NEWPID
>> +  if (unshare (CLONE_NEWPID) != 0)
>> +    printf ("warning: unshare (CLONE_NEW_PID) failed: %m\n"
>> +            "warning: This leads to reduced test coverage.\n");
>> +  else
>> +    pid_tests_supported = true;
>> +#else
>> +  printf ("warning: CLONE_NEW_PID not available.\n"
>
> The messages are saying CLONE_NEW_PID when the actual code is using 
> CLONE_NEWPID.

Sorry about that.  Fixed by the commit below.

Thanks,
Florian

8<------------------------------------------------------------------8<
Subject: posix/tst-wordexp-nocmd: Fix diagnostics output in test

2019-10-08  Florian Weimer  <fweimer@redhat.com>

	* posix/tst-wordexp-nocmd.c (do_test): Fix diagnostics output.

Patch

diff --git a/posix/tst-wordexp-nocmd.c b/posix/tst-wordexp-nocmd.c
index b2f64c819f..cb6033e15f 100644
--- a/posix/tst-wordexp-nocmd.c
+++ b/posix/tst-wordexp-nocmd.c
@@ -161,12 +161,12 @@  do_test (void)
 
 #ifdef CLONE_NEWPID
   if (unshare (CLONE_NEWPID) != 0)
-    printf ("warning: unshare (CLONE_NEW_PID) failed: %m\n"
+    printf ("warning: unshare (CLONE_NEWPID) failed: %m\n"
             "warning: This leads to reduced test coverage.\n");
   else
     pid_tests_supported = true;
 #else
-  printf ("warning: CLONE_NEW_PID not available.\n"
+  printf ("warning: CLONE_NEWPID not available.\n"
           "warning: This leads to reduced test coverage.\n");
 #endif