Author: ngie
Date: Tue Sep 20 16:37:02 2016
New Revision: 306036
URL: https://svnweb.freebsd.org/changeset/base/306036

Log:
  Port to mknod_test and readdir_test to FreeBSD
  
  The `mknod <file> p` command doesn't exist on FreeBSD, like on NetBSD. Use
  mkfifo instead to create named pipes (FIFOs).
  
  MFC after:    1 month
  Sponsored by: Dell EMC Isilon

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

Modified: head/contrib/netbsd-tests/fs/tmpfs/t_mknod.sh
==============================================================================
--- head/contrib/netbsd-tests/fs/tmpfs/t_mknod.sh       Tue Sep 20 16:36:55 
2016        (r306035)
+++ head/contrib/netbsd-tests/fs/tmpfs/t_mknod.sh       Tue Sep 20 16:37:02 
2016        (r306036)
@@ -106,7 +106,15 @@ pipe_body() {
        test_mount
        umask 022
 
+       # Begin FreeBSD
+       if true; then
+       atf_check -s eq:0 -o empty -e empty mkfifo pipe
+       else
+       # End FreeBSD
        atf_check -s eq:0 -o empty -e empty mknod pipe p
+       # Begin FreeBSD
+       fi
+       # End FreeBSD
        eval $(stat -s pipe)
        [ ${st_mode} = 010644 ] || atf_fail "Invalid mode"
 
@@ -124,7 +132,15 @@ pipe_kqueue_body() {
        umask 022
 
        atf_check -s eq:0 -o empty -e empty mkdir dir
+       # Begin FreeBSD
+       if true; then
+       echo 'mkfifo dir/pipe' | kqueue_monitor 1 dir
+       else
+       # End FreeBSD
        echo 'mknod dir/pipe p' | kqueue_monitor 1 dir
+       # Begin FreeBSD
+       fi
+       # End FreeBSD
        kqueue_check dir NOTE_WRITE
 
        test_unmount

Modified: head/contrib/netbsd-tests/fs/tmpfs/t_readdir.sh
==============================================================================
--- head/contrib/netbsd-tests/fs/tmpfs/t_readdir.sh     Tue Sep 20 16:36:55 
2016        (r306035)
+++ head/contrib/netbsd-tests/fs/tmpfs/t_readdir.sh     Tue Sep 20 16:37:02 
2016        (r306036)
@@ -59,7 +59,15 @@ types_body() {
        atf_check -s eq:0 -o empty -e empty ln -s reg lnk
        atf_check -s eq:0 -o empty -e empty mknod blk b 0 0
        atf_check -s eq:0 -o empty -e empty mknod chr c 0 0
+       # Begin FreeBSD
+       if true; then
+       atf_check -s eq:0 -o empty -e empty mkfifo fifo
+       else
+       # End FreeBSD
        atf_check -s eq:0 -o empty -e empty mknod fifo p
+       # Begin FreeBSD
+       fi
+       # End FreeBSD
        atf_check -s eq:0 -o empty -e empty \
            $(atf_get_srcdir)/h_tools sockets sock
 
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to