Re: svn commit: r312103 - head/tests/sys/vfs

2017-01-13 Thread Cy Schubert
No problem.

My make.conf doesn't adjust any warning levels, they're vanilla so, the 
build barfed at that line.


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


In message 
, Conrad Meyer writes:
> Hi Cy,
> 
> r312107 fixes it.  If the warning-cleanups and major changes were
> committed separately, the more major changes could then have been
> reverted independently.  Unfortunately, they were not.  The warnings
> are harmless, though, so just turning them down again is fine.
> 
> Best,
> Conrad
> 
> On Fri, Jan 13, 2017 at 6:39 PM, Cy Schubert  wrote
> :
> > In message <201701140103.v0e13k8b068...@repo.freebsd.org>, "Conrad E.
> > Meyer" wr
> > ites:
> >> Author: cem
> >> Date: Sat Jan 14 01:03:20 2017
> >> New Revision: 312103
> >> URL: https://svnweb.freebsd.org/changeset/base/312103
> >>
> >> Log:
> >>   Revert r310994
> >>
> >>   Don't implement some terrible hack on a test by test basis.  The
> >>   framework fix is straightforward and can be chased up in the original
> >>   bug.
> >>
> >>   Reviewed by:ngie ("be my guest")
> >>
> >> Modified:
> >>   head/tests/sys/vfs/lookup_cap_dotdot.c
> >>
> >> Modified: head/tests/sys/vfs/lookup_cap_dotdot.c
> >> ==
> ===
> >> =
> >> --- head/tests/sys/vfs/lookup_cap_dotdot.cSat Jan 14 01:01:02 2017
> >>   (r312102)
> >> +++ head/tests/sys/vfs/lookup_cap_dotdot.cSat Jan 14 01:03:20 2017
> >>   (r312103)
> >> @@ -31,27 +31,23 @@ __FBSDID("$FreeBSD$");
> >>  #include 
> >>  #include 
> >>  #include 
> >> -#include 
> >>
> >>  #include 
> >> -#include 
> >>  #include 
> >>  #include 
> >>  #include 
> >>
> >>  #include "freebsd_test_suite/macros.h"
> >>
> >> -static char  *abspath;
> >> -static int   dirfd = -1;
> >> -
> >> -typedef  void (*child_test_fn_t)(void);
> >> +static int dirfd = -1;
> >> +static char *abspath;
> >>
> >>  static void
> >> -touchat(int _dirfd, const char *name)
> >> +touchat(int dirfd, const char *name)
> >
> > Buildworld is busted right here. It's probably best to leave the underbar
> > here and in the ATF_REQIRE below.
> >
> >>  {
> >>   int fd;
> >>
> >> - ATF_REQUIRE((fd = openat(_dirfd, name, O_CREAT | O_TRUNC | O_WRONLY,
> >> + ATF_REQUIRE((fd = openat(dirfd, name, O_CREAT | O_TRUNC | O_WRONLY,
> >
> > Here too.
> >
> >>   0777)) >= 0);
> >>   ATF_REQUIRE(close(fd) == 0);
> >>  }
> >
> >
> > --
> > Cheers,
> > Cy Schubert 
> > FreeBSD UNIX:     Web:  http://www.FreeBSD.org
> >
> > The need of the many outweighs the greed of the few.
> >
> >
> 


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r312103 - head/tests/sys/vfs

2017-01-13 Thread Ngie Cooper (yaneurabeya)

> On Jan 13, 2017, at 7:50 PM, Conrad Meyer  wrote:
> 
> Hi Cy,
> 
> r312107 fixes it.  If the warning-cleanups and major changes were
> committed separately, the more major changes could then have been
> reverted independently.  Unfortunately, they were not.  The warnings
> are harmless, though, so just turning them down again is fine.

Trivial fixes reapplied in r312109.
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r312103 - head/tests/sys/vfs

2017-01-13 Thread Conrad Meyer
Hi Cy,

r312107 fixes it.  If the warning-cleanups and major changes were
committed separately, the more major changes could then have been
reverted independently.  Unfortunately, they were not.  The warnings
are harmless, though, so just turning them down again is fine.

Best,
Conrad

On Fri, Jan 13, 2017 at 6:39 PM, Cy Schubert  wrote:
> In message <201701140103.v0e13k8b068...@repo.freebsd.org>, "Conrad E.
> Meyer" wr
> ites:
>> Author: cem
>> Date: Sat Jan 14 01:03:20 2017
>> New Revision: 312103
>> URL: https://svnweb.freebsd.org/changeset/base/312103
>>
>> Log:
>>   Revert r310994
>>
>>   Don't implement some terrible hack on a test by test basis.  The
>>   framework fix is straightforward and can be chased up in the original
>>   bug.
>>
>>   Reviewed by:ngie ("be my guest")
>>
>> Modified:
>>   head/tests/sys/vfs/lookup_cap_dotdot.c
>>
>> Modified: head/tests/sys/vfs/lookup_cap_dotdot.c
>> =
>> =
>> --- head/tests/sys/vfs/lookup_cap_dotdot.cSat Jan 14 01:01:02 2017
>>   (r312102)
>> +++ head/tests/sys/vfs/lookup_cap_dotdot.cSat Jan 14 01:03:20 2017
>>   (r312103)
>> @@ -31,27 +31,23 @@ __FBSDID("$FreeBSD$");
>>  #include 
>>  #include 
>>  #include 
>> -#include 
>>
>>  #include 
>> -#include 
>>  #include 
>>  #include 
>>  #include 
>>
>>  #include "freebsd_test_suite/macros.h"
>>
>> -static char  *abspath;
>> -static int   dirfd = -1;
>> -
>> -typedef  void (*child_test_fn_t)(void);
>> +static int dirfd = -1;
>> +static char *abspath;
>>
>>  static void
>> -touchat(int _dirfd, const char *name)
>> +touchat(int dirfd, const char *name)
>
> Buildworld is busted right here. It's probably best to leave the underbar
> here and in the ATF_REQIRE below.
>
>>  {
>>   int fd;
>>
>> - ATF_REQUIRE((fd = openat(_dirfd, name, O_CREAT | O_TRUNC | O_WRONLY,
>> + ATF_REQUIRE((fd = openat(dirfd, name, O_CREAT | O_TRUNC | O_WRONLY,
>
> Here too.
>
>>   0777)) >= 0);
>>   ATF_REQUIRE(close(fd) == 0);
>>  }
>
>
> --
> Cheers,
> Cy Schubert 
> FreeBSD UNIX:     Web:  http://www.FreeBSD.org
>
> The need of the many outweighs the greed of the few.
>
>
___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r312103 - head/tests/sys/vfs

2017-01-13 Thread Cy Schubert
In message <201701140103.v0e13k8b068...@repo.freebsd.org>, "Conrad E. 
Meyer" wr
ites:
> Author: cem
> Date: Sat Jan 14 01:03:20 2017
> New Revision: 312103
> URL: https://svnweb.freebsd.org/changeset/base/312103
> 
> Log:
>   Revert r310994
>   
>   Don't implement some terrible hack on a test by test basis.  The
>   framework fix is straightforward and can be chased up in the original
>   bug.
>   
>   Reviewed by:ngie ("be my guest")
> 
> Modified:
>   head/tests/sys/vfs/lookup_cap_dotdot.c
> 
> Modified: head/tests/sys/vfs/lookup_cap_dotdot.c
> =
> =
> --- head/tests/sys/vfs/lookup_cap_dotdot.cSat Jan 14 01:01:02 2017
>   (r312102)
> +++ head/tests/sys/vfs/lookup_cap_dotdot.cSat Jan 14 01:03:20 2017
>   (r312103)
> @@ -31,27 +31,23 @@ __FBSDID("$FreeBSD$");
>  #include 
>  #include 
>  #include 
> -#include 
>  
>  #include 
> -#include 
>  #include 
>  #include 
>  #include 
>  
>  #include "freebsd_test_suite/macros.h"
>  
> -static char  *abspath;
> -static int   dirfd = -1;
> -
> -typedef  void (*child_test_fn_t)(void);
> +static int dirfd = -1;
> +static char *abspath;
>  
>  static void
> -touchat(int _dirfd, const char *name)
> +touchat(int dirfd, const char *name)

Buildworld is busted right here. It's probably best to leave the underbar 
here and in the ATF_REQIRE below.

>  {
>   int fd;
>  
> - ATF_REQUIRE((fd = openat(_dirfd, name, O_CREAT | O_TRUNC | O_WRONLY,
> + ATF_REQUIRE((fd = openat(dirfd, name, O_CREAT | O_TRUNC | O_WRONLY,

Here too.

>   0777)) >= 0);
>   ATF_REQUIRE(close(fd) == 0);
>  }


-- 
Cheers,
Cy Schubert 
FreeBSD UNIX:     Web:  http://www.FreeBSD.org

The need of the many outweighs the greed of the few.


___
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"


Re: svn commit: r312103 - head/tests/sys/vfs

2017-01-13 Thread Ngie Cooper (yaneurabeya)

> On Jan 13, 2017, at 17:07, Ngie Cooper (yaneurabeya)  
> wrote:
> 
> 
>> On Jan 13, 2017, at 17:06, Ngie Cooper (yaneurabeya)  
>> wrote:
>> 
>>> 
>>> On Jan 13, 2017, at 17:03, Conrad E. Meyer  wrote:
>>> 
>>> Author: cem
>>> Date: Sat Jan 14 01:03:20 2017
>>> New Revision: 312103
>>> URL: https://svnweb.freebsd.org/changeset/base/312103
>>> 
>>> Log:
>>> Revert r310994
>>> 
>>> Don't implement some terrible hack on a test by test basis.  The
>>> framework fix is straightforward and can be chased up in the original
>>> bug.
>>> 
>>> Reviewed by:ngie ("be my guest")
>> 
>> You should have filed an issue with atf/kyua, had the fix done, then done 
>> the necessary parts in releasing a new port/package. Please disable the test 
>> because it doesn’t work at all right now on CURRENT and it will ping the 
>> sh’t out of the jenkins email until fixed.
>> -Ngie
> 
> PS Saying “be my guest” isn’t review in any shape or form, nor is it my 
> consent towards your change being implemented now.

Oh yeah… this commit broke the build too because I turned on WARNS: 
https://jenkins.freebsd.org/job/FreeBSD_HEAD_i386/4653/
Cheers,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r312103 - head/tests/sys/vfs

2017-01-13 Thread Ngie Cooper (yaneurabeya)

> On Jan 13, 2017, at 17:06, Ngie Cooper (yaneurabeya)  
> wrote:
> 
>> 
>> On Jan 13, 2017, at 17:03, Conrad E. Meyer  wrote:
>> 
>> Author: cem
>> Date: Sat Jan 14 01:03:20 2017
>> New Revision: 312103
>> URL: https://svnweb.freebsd.org/changeset/base/312103
>> 
>> Log:
>> Revert r310994
>> 
>> Don't implement some terrible hack on a test by test basis.  The
>> framework fix is straightforward and can be chased up in the original
>> bug.
>> 
>> Reviewed by: ngie ("be my guest")
> 
> You should have filed an issue with atf/kyua, had the fix done, then done the 
> necessary parts in releasing a new port/package. Please disable the test 
> because it doesn’t work at all right now on CURRENT and it will ping the sh’t 
> out of the jenkins email until fixed.
> -Ngie

PS Saying “be my guest” isn’t review in any shape or form, nor is it my consent 
towards your change being implemented now.


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r312103 - head/tests/sys/vfs

2017-01-13 Thread Ngie Cooper (yaneurabeya)

> On Jan 13, 2017, at 17:03, Conrad E. Meyer  wrote:
> 
> Author: cem
> Date: Sat Jan 14 01:03:20 2017
> New Revision: 312103
> URL: https://svnweb.freebsd.org/changeset/base/312103
> 
> Log:
>  Revert r310994
> 
>  Don't implement some terrible hack on a test by test basis.  The
>  framework fix is straightforward and can be chased up in the original
>  bug.
> 
>  Reviewed by: ngie ("be my guest")

You should have filed an issue with atf/kyua, had the fix done, then done the 
necessary parts in releasing a new port/package. Please disable the test 
because it doesn’t work at all right now on CURRENT and it will ping the sh’t 
out of the jenkins email until fixed.
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


svn commit: r312103 - head/tests/sys/vfs

2017-01-13 Thread Conrad E. Meyer
Author: cem
Date: Sat Jan 14 01:03:20 2017
New Revision: 312103
URL: https://svnweb.freebsd.org/changeset/base/312103

Log:
  Revert r310994
  
  Don't implement some terrible hack on a test by test basis.  The
  framework fix is straightforward and can be chased up in the original
  bug.
  
  Reviewed by:  ngie ("be my guest")

Modified:
  head/tests/sys/vfs/lookup_cap_dotdot.c

Modified: head/tests/sys/vfs/lookup_cap_dotdot.c
==
--- head/tests/sys/vfs/lookup_cap_dotdot.c  Sat Jan 14 01:01:02 2017
(r312102)
+++ head/tests/sys/vfs/lookup_cap_dotdot.c  Sat Jan 14 01:03:20 2017
(r312103)
@@ -31,27 +31,23 @@ __FBSDID("$FreeBSD$");
 #include 
 #include 
 #include 
-#include 
 
 #include 
-#include 
 #include 
 #include 
 #include 
 
 #include "freebsd_test_suite/macros.h"
 
-static char*abspath;
-static int dirfd = -1;
-
-typedefvoid (*child_test_fn_t)(void);
+static int dirfd = -1;
+static char *abspath;
 
 static void
-touchat(int _dirfd, const char *name)
+touchat(int dirfd, const char *name)
 {
int fd;
 
-   ATF_REQUIRE((fd = openat(_dirfd, name, O_CREAT | O_TRUNC | O_WRONLY,
+   ATF_REQUIRE((fd = openat(dirfd, name, O_CREAT | O_TRUNC | O_WRONLY,
0777)) >= 0);
ATF_REQUIRE(close(fd) == 0);
 }
@@ -82,43 +78,10 @@ prepare_dotdot_tests(void)
 static void
 check_capsicum(void)
 {
-
ATF_REQUIRE_FEATURE("security_capabilities");
ATF_REQUIRE_FEATURE("security_capability_mode");
 }
 
-static void
-run_capsicum_test(child_test_fn_t test_func)
-{
-   int child_exit_code, child_status;
-   pid_t child_pid;
-
-   check_capsicum();
-   prepare_dotdot_tests();
-
-   ATF_REQUIRE_MSG((child_pid = fork()) != -1,
-   "fork failed: %s", strerror(errno));
-
-   if (child_pid == 0) {
-   test_func();
-   _exit(0);
-   }
-
-   ATF_REQUIRE_MSG(waitpid(child_pid, _status, 0) != -1,
-   "waitpid failed: %s", strerror(errno));
-   if (WIFEXITED(child_status)) {
-   child_exit_code = WEXITSTATUS(child_status);
-   ATF_REQUIRE_MSG(child_exit_code == 0,
-   "child exited with non-zero exit code: %d",
-   child_exit_code);
-   } else if (WIFSIGNALED(child_status))
-   atf_tc_fail("child exited with signal: %d",
-   WTERMSIG(child_status));
-   else
-   atf_tc_fail("child exited with unexpected status: %d",
-   child_status);
-}
-
 /*
  * Positive tests
  */
@@ -130,7 +93,6 @@ ATF_TC_HEAD(openat__basic_positive, tc)
 
 ATF_TC_BODY(openat__basic_positive, tc)
 {
-
prepare_dotdot_tests();
 
ATF_REQUIRE(openat(dirfd, "d1/d2/d3/f3", O_RDONLY) >= 0);
@@ -152,22 +114,21 @@ ATF_TC_HEAD(lookup_cap_dotdot__basic, tc
"Validate cap-mode (testdir)/d1/.. lookup");
 }
 
-static void
-lookup_cap_dotdot__basic_child(void)
+ATF_TC_BODY(lookup_cap_dotdot__basic, tc)
 {
cap_rights_t rights;
+   int fd;
 
-   cap_rights_init(, CAP_LOOKUP, CAP_READ);
+   check_capsicum();
+   prepare_dotdot_tests();
 
-   assert(cap_rights_limit(dirfd, ) >= 0);
-   assert(cap_enter() >= 0);
-   assert(openat(dirfd, "d1/..", O_RDONLY) >= 0);
-}
+   cap_rights_init(, CAP_LOOKUP, CAP_READ);
+   ATF_REQUIRE(cap_rights_limit(dirfd, ) >= 0);
 
-ATF_TC_BODY(lookup_cap_dotdot__basic, tc)
-{
+   ATF_REQUIRE(cap_enter() >= 0);
 
-   run_capsicum_test(lookup_cap_dotdot__basic_child);
+   ATF_REQUIRE_MSG(openat(dirfd, "d1/..", O_RDONLY) >= 0, "%s",
+   strerror(errno));
 }
 
 ATF_TC(lookup_cap_dotdot__advanced);
@@ -177,26 +138,23 @@ ATF_TC_HEAD(lookup_cap_dotdot__advanced,
"Validate cap-mode (testdir)/d1/.. lookup");
 }
 
-static void
-lookup_cap_dotdot__advanced_child(void)
+ATF_TC_BODY(lookup_cap_dotdot__advanced, tc)
 {
cap_rights_t rights;
+   int fd;
 
-   cap_rights_init(, CAP_LOOKUP, CAP_READ);
-   assert(cap_rights_limit(dirfd, ) >= 0);
-
-   assert(cap_enter() >= 0);
+   check_capsicum();
+   prepare_dotdot_tests();
 
-   assert(openat(dirfd, "d1/d2/d3/../../f1", O_RDONLY) >= 0);
-   assert(openat(dirfd, "l3/../../f1", O_RDONLY) >= 0);
-   assert(openat(dirfd, "l3/ld1", O_RDONLY) >= 0);
-   assert(openat(dirfd, "l3/lf1", O_RDONLY) >= 0);
-}
+   cap_rights_init(, CAP_LOOKUP, CAP_READ);
+   ATF_REQUIRE(cap_rights_limit(dirfd, ) >= 0);
 
-ATF_TC_BODY(lookup_cap_dotdot__advanced, tc)
-{
+   ATF_REQUIRE(cap_enter() >= 0);
 
-   run_capsicum_test(lookup_cap_dotdot__advanced_child);
+   ATF_REQUIRE(openat(dirfd, "d1/d2/d3/../../f1", O_RDONLY) >= 0);
+   ATF_REQUIRE(openat(dirfd, "l3/../../f1", O_RDONLY) >= 0);
+   ATF_REQUIRE(openat(dirfd, "l3/ld1", O_RDONLY) >= 0);
+   ATF_REQUIRE(openat(dirfd, "l3/lf1", O_RDONLY) >= 0);
 }
 
 /*
@@ -210,7