Re: svn commit: r307190 - head/contrib/netbsd-tests/fs/tmpfs

2016-10-13 Thread Julio Merino
On Thu, Oct 13, 2016 at 3:29 AM, Ngie Cooper (yaneurabeya) <
yaneurab...@gmail.com> wrote:

>
> > On Oct 13, 2016, at 00:20, Julio Merino  wrote:
> >
> > On Thu, Oct 13, 2016 at 3:02 AM, Ngie Cooper  wrote:
> > Author: ngie
> > Date: Thu Oct 13 07:02:54 2016
> > New Revision: 307190
> > URL: https://svnweb.freebsd.org/changeset/base/307190
> >
> > Log:
> >   Skip :uchg on FreeBSD
> >
> >   Unfortunately removing files with uchg set always succeeds with root on
> >   FreeBSD. Unfortunately running the test as an unprivileged user isn't
> doable
> >   because mounting tmpfs requires root
> >
> >   PR:   212861
> >   Sponsored by: Dell EMC Isilon
> >
> > Modified:
> >   head/contrib/netbsd-tests/fs/tmpfs/t_remove.sh
> >
> > Modified: head/contrib/netbsd-tests/fs/tmpfs/t_remove.sh
> > 
> ==
> > --- head/contrib/netbsd-tests/fs/tmpfs/t_remove.sh  Thu Oct 13
> 06:56:23 2016(r307189)
> > +++ head/contrib/netbsd-tests/fs/tmpfs/t_remove.sh  Thu Oct 13
> 07:02:54 2016(r307190)
> > @@ -53,6 +53,10 @@ uchg_head() {
> > atf_set "require.user" "root"
> >  }
> >  uchg_body() {
> > +   # Begin FreeBSD
> > +   atf_skip "this fails on FreeBSD with root - bug 212861"
> > +   # End FreeBSD
> >
> > This is a bad way of disabling a test due to a known bug because, when
> the bug is resolved, the test won't notice. You should be using the
> "expected failures" functionality if possible, and based on the change
> description, I think you can do this here easily. Try:
> >
> > atf_expect_fail "FreeBSD bug 213861 blah blah"
> >
> > right before the line that triggers the test failure.
>
> The problem is that this leaves tmpfs mounts lying around, which atf won’t
> cleanup. Otherwise, I would totally agree with you.
>

Replace:

atf_test_case uchg

with:

atf_test_case uchg cleanup

and then add:

uchg_cleanup() {
umount foo/bar 2>/dev/null || true
}

This is actually *necessary* regardless of how you skip the test to ensure
the mount point is cleaned up on any failure of the test. If the tests are
not doing that yet, they are bogus.

-- 
Julio Merino -- http://julio.meroh.net/
___
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: r307190 - head/contrib/netbsd-tests/fs/tmpfs

2016-10-13 Thread Ngie Cooper (yaneurabeya)

> On Oct 13, 2016, at 00:20, Julio Merino  wrote:
> 
> On Thu, Oct 13, 2016 at 3:02 AM, Ngie Cooper  wrote:
> Author: ngie
> Date: Thu Oct 13 07:02:54 2016
> New Revision: 307190
> URL: https://svnweb.freebsd.org/changeset/base/307190
> 
> Log:
>   Skip :uchg on FreeBSD
> 
>   Unfortunately removing files with uchg set always succeeds with root on
>   FreeBSD. Unfortunately running the test as an unprivileged user isn't doable
>   because mounting tmpfs requires root
> 
>   PR:   212861
>   Sponsored by: Dell EMC Isilon
> 
> Modified:
>   head/contrib/netbsd-tests/fs/tmpfs/t_remove.sh
> 
> Modified: head/contrib/netbsd-tests/fs/tmpfs/t_remove.sh
> ==
> --- head/contrib/netbsd-tests/fs/tmpfs/t_remove.sh  Thu Oct 13 06:56:23 
> 2016(r307189)
> +++ head/contrib/netbsd-tests/fs/tmpfs/t_remove.sh  Thu Oct 13 07:02:54 
> 2016(r307190)
> @@ -53,6 +53,10 @@ uchg_head() {
> atf_set "require.user" "root"
>  }
>  uchg_body() {
> +   # Begin FreeBSD
> +   atf_skip "this fails on FreeBSD with root - bug 212861"
> +   # End FreeBSD
> 
> This is a bad way of disabling a test due to a known bug because, when the 
> bug is resolved, the test won't notice. You should be using the "expected 
> failures" functionality if possible, and based on the change description, I 
> think you can do this here easily. Try:
> 
> atf_expect_fail "FreeBSD bug 213861 blah blah"
> 
> right before the line that triggers the test failure.

The problem is that this leaves tmpfs mounts lying around, which atf won’t 
cleanup. Otherwise, I would totally agree with you.
Thanks,
-Ngie


signature.asc
Description: Message signed with OpenPGP using GPGMail


Re: svn commit: r307190 - head/contrib/netbsd-tests/fs/tmpfs

2016-10-13 Thread Julio Merino
On Thu, Oct 13, 2016 at 3:02 AM, Ngie Cooper  wrote:

> Author: ngie
> Date: Thu Oct 13 07:02:54 2016
> New Revision: 307190
> URL: https://svnweb.freebsd.org/changeset/base/307190
>
> Log:
>   Skip :uchg on FreeBSD
>
>   Unfortunately removing files with uchg set always succeeds with root on
>   FreeBSD. Unfortunately running the test as an unprivileged user isn't
> doable
>   because mounting tmpfs requires root
>
>   PR:   212861
>   Sponsored by: Dell EMC Isilon
>
> Modified:
>   head/contrib/netbsd-tests/fs/tmpfs/t_remove.sh
>
> Modified: head/contrib/netbsd-tests/fs/tmpfs/t_remove.sh
> 
> ==
> --- head/contrib/netbsd-tests/fs/tmpfs/t_remove.sh  Thu Oct 13
> 06:56:23 2016(r307189)
> +++ head/contrib/netbsd-tests/fs/tmpfs/t_remove.sh  Thu Oct 13
> 07:02:54 2016(r307190)
> @@ -53,6 +53,10 @@ uchg_head() {
> atf_set "require.user" "root"
>  }
>  uchg_body() {
> +   # Begin FreeBSD
> +   atf_skip "this fails on FreeBSD with root - bug 212861"
> +   # End FreeBSD
>

This is a bad way of disabling a test due to a known bug because, when the
bug is resolved, the test won't notice. You should be using the "expected
failures" functionality if possible, and based on the change description, I
think you can do this here easily. Try:

atf_expect_fail "FreeBSD bug 213861 blah blah"

right before the line that triggers the test failure.

-- 
Julio Merino -- http://julio.meroh.net/
___
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"


svn commit: r307190 - head/contrib/netbsd-tests/fs/tmpfs

2016-10-13 Thread Ngie Cooper
Author: ngie
Date: Thu Oct 13 07:02:54 2016
New Revision: 307190
URL: https://svnweb.freebsd.org/changeset/base/307190

Log:
  Skip :uchg on FreeBSD
  
  Unfortunately removing files with uchg set always succeeds with root on
  FreeBSD. Unfortunately running the test as an unprivileged user isn't doable
  because mounting tmpfs requires root
  
  PR:   212861
  Sponsored by: Dell EMC Isilon

Modified:
  head/contrib/netbsd-tests/fs/tmpfs/t_remove.sh

Modified: head/contrib/netbsd-tests/fs/tmpfs/t_remove.sh
==
--- head/contrib/netbsd-tests/fs/tmpfs/t_remove.sh  Thu Oct 13 06:56:23 
2016(r307189)
+++ head/contrib/netbsd-tests/fs/tmpfs/t_remove.sh  Thu Oct 13 07:02:54 
2016(r307190)
@@ -53,6 +53,10 @@ uchg_head() {
atf_set "require.user" "root"
 }
 uchg_body() {
+   # Begin FreeBSD
+   atf_skip "this fails on FreeBSD with root - bug 212861"
+   # End FreeBSD
+
test_mount
 
atf_check -s eq:0 -o empty -e empty touch a
___
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"