Index: stable/11/cddl/usr.bin/ctfconvert/Makefile =================================================================== --- stable/11/cddl/usr.bin/ctfconvert/Makefile (revision 327185) +++ stable/11/cddl/usr.bin/ctfconvert/Makefile (revision 327186) @@ -1,39 +1,44 @@ # $FreeBSD$ +.include + .PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/common .PATH: ${SRCTOP}/cddl/contrib/opensolaris/tools/ctf/cvt PROG= ctfconvert SRCS= alist.c \ ctf.c \ ctfconvert.c \ dwarf.c \ fixup_tdescs.c \ hash.c \ iidesc.c \ input.c \ list.c \ memory.c \ merge.c \ output.c \ st_parse.c \ stabs.c \ stack.c \ strtab.c \ symbol.c \ tdata.c \ traverse.c \ util.c CFLAGS+= -I${SRCTOP}/sys/cddl/compat/opensolaris \ -I${SRCTOP}/cddl/compat/opensolaris/include \ -I${OPENSOLARIS_USR_DISTDIR} \ -I${OPENSOLARIS_SYS_DISTDIR} \ -I${OPENSOLARIS_USR_DISTDIR}/head \ -I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/common \ -I${OPENSOLARIS_USR_DISTDIR}/tools/ctf/cvt \ -I${OPENSOLARIS_SYS_DISTDIR}/uts/common LIBADD= dwarf elf z pthread + +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests .include Index: stable/11/cddl/usr.bin/ctfconvert/tests/Makefile =================================================================== --- stable/11/cddl/usr.bin/ctfconvert/tests/Makefile (nonexistent) +++ stable/11/cddl/usr.bin/ctfconvert/tests/Makefile (revision 327186) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +ATF_TESTS_SH+= ctfconvert_test + +.include Property changes on: stable/11/cddl/usr.bin/ctfconvert/tests/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/11/cddl/usr.bin/ctfconvert/tests/ctfconvert_test.sh =================================================================== --- stable/11/cddl/usr.bin/ctfconvert/tests/ctfconvert_test.sh (nonexistent) +++ stable/11/cddl/usr.bin/ctfconvert/tests/ctfconvert_test.sh (revision 327186) @@ -0,0 +1,62 @@ +# +# Copyright 2017 Shivansh +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +usage_output='Usage: ctfconvert' + +atf_test_case invalid_usage +invalid_usage_head() +{ + atf_set "descr" "Verify that an invalid usage with a supported option produces a valid error message" +} + +invalid_usage_body() +{ + atf_check -s not-exit:0 -e match:"$usage_output" ctfconvert -l + atf_check -s not-exit:0 -e match:"$usage_output" ctfconvert -L + atf_check -s not-exit:0 -e match:"$usage_output" ctfconvert -g + atf_check -s not-exit:0 -e match:"$usage_output" ctfconvert -i + atf_check -s not-exit:0 -e match:"$usage_output" ctfconvert -s + atf_check -s not-exit:0 -e match:"$usage_output" ctfconvert -o +} + +atf_test_case no_arguments +no_arguments_head() +{ + atf_set "descr" "Verify that ctfconvert(1) fails and generates a valid usage message when no arguments are supplied" +} + +no_arguments_body() +{ + atf_check -s not-exit:0 -e match:"$usage_output" ctfconvert +} + +atf_init_test_cases() +{ + atf_add_test_case invalid_usage + atf_add_test_case no_arguments +} Property changes on: stable/11/cddl/usr.bin/ctfconvert/tests/ctfconvert_test.sh ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/11/etc/mtree/BSD.tests.dist =================================================================== --- stable/11/etc/mtree/BSD.tests.dist (revision 327185) +++ stable/11/etc/mtree/BSD.tests.dist (revision 327186) @@ -1,738 +1,744 @@ # $FreeBSD$ # # Please see the file src/etc/mtree/README before making changes to this file. # /set type=dir uname=root gname=wheel mode=0755 . bin cat .. chflags .. chmod .. date .. dd .. echo .. expr .. ln .. ls .. mkdir .. mv .. pax .. pkill .. pwait .. rcp .. rmdir .. sh builtins .. errors .. execution .. expansion .. parameters .. parser .. set-e .. .. sleep .. test .. .. cddl lib .. sbin .. usr.bin + ctfconvert + .. .. usr.sbin dtrace common aggs .. arithmetic .. arrays .. assocs .. begin .. bitfields .. buffering .. builtinvar .. cg .. clauses .. cpc .. decls .. drops .. dtraceUtil .. end .. enum .. error .. exit .. fbtprovider .. funcs .. grammar .. include .. inline .. io .. ip .. java_api .. json .. lexer .. llquantize .. mdb .. mib .. misc .. multiaggs .. offsetof .. operators .. pid .. plockstat .. pointers .. pragma .. predicates .. preprocessor .. print .. printa .. printf .. privs .. probes .. proc .. profile-n .. providers .. raise .. rates .. safety .. scalars .. sched .. scripting .. sdt .. sizeof .. speculation .. stability .. stack .. stackdepth .. stop .. strlen .. strtoll .. struct .. syscall .. sysevent .. tick-n .. trace .. tracemem .. translators .. typedef .. types .. uctf .. union .. usdt .. ustack .. vars .. version .. .. .. zfsd .. .. .. etc rc.d .. .. games .. gnu lib .. usr.bin diff .. .. .. lib atf libatf-c detail .. .. libatf-c++ detail .. .. test-programs .. .. libarchive .. libc c063 .. db .. gen execve .. posix_spawn .. .. hash data .. .. iconv .. inet .. locale .. net getaddrinfo data .. .. .. nss .. regex data .. .. resolv .. rpc .. ssp .. setjmp .. stdio .. stdlib .. string .. sys .. time .. tls dso .. .. termios .. ttyio .. .. libcam .. libcasper services cap_dns .. cap_grp .. cap_pwd .. cap_sysctl .. .. .. libcrypt .. libdevdctl .. libkvm .. libmp .. libnv .. libpam .. libproc .. librt .. libsbuf .. libthr dlopen .. .. libutil .. libxo .. msun .. .. libexec atf atf-check .. atf-sh .. .. rtld-elf .. .. sbin dhclient .. devd .. growfs .. ifconfig .. mdconfig .. .. secure lib .. libexec .. usr.bin .. usr.sbin .. .. share examples tests atf .. plain .. tap .. .. .. zoneinfo .. .. sys acl .. aio .. fifo .. file .. fs tmpfs .. .. geom class concat .. eli .. gate .. gpt .. mirror .. nop .. raid3 .. shsec .. stripe .. uzip etalon .. .. .. .. kern acct .. execve .. pipe .. .. kqueue libkqueue .. .. mac bsdextended .. portacl .. .. mqueue .. netinet .. opencrypto .. pjdfstest chflags .. chmod .. chown .. ftruncate .. granular .. link .. mkdir .. mkfifo .. mknod .. open .. rename .. rmdir .. symlink .. truncate .. unlink .. .. posixshm .. sys .. vfs .. vm .. .. usr.bin apply .. basename .. bmake archives fmt_44bsd .. fmt_44bsd_mod .. fmt_oldbsd .. .. basic t0 .. t1 .. t2 .. t3 .. .. execution ellipsis .. empty .. joberr .. plus .. .. shell builtin .. meta .. path .. path_select .. replace .. select .. .. suffixes basic .. src_wild1 .. src_wild2 .. .. syntax directive-t0 .. enl .. funny-targets .. semi .. .. sysmk t0 2 1 .. .. mk .. .. t1 2 1 .. .. mk .. .. t2 2 1 .. .. mk .. .. .. variables modifier_M .. modifier_t .. opt_V .. t0 .. .. .. bsdcat .. calendar .. cmp .. compress .. cpio .. col .. comm .. cut .. dirname .. du .. file2c .. + fold + .. getconf .. grep .. gzip .. head .. ident .. join .. jot .. lastcomm .. limits .. m4 .. mkimg .. ncal .. opensm .. pr .. printf .. procstat + .. + rs .. sdiff .. sed regress.multitest.out .. .. soelim .. stat .. tail .. tar .. timeout .. tr .. truncate .. units .. uudecode .. uuencode .. uniq .. xargs .. xinstall .. xo .. yacc yacc .. .. .. usr.sbin chown .. etcupdate .. extattr .. fstyp .. makefs .. newsyslog .. nmtree .. pw .. rpcbind .. sa .. .. .. # vim: set expandtab ts=4 sw=4: Index: stable/11/usr.bin/fold/Makefile =================================================================== --- stable/11/usr.bin/fold/Makefile (revision 327185) +++ stable/11/usr.bin/fold/Makefile (revision 327186) @@ -1,6 +1,11 @@ # From: @(#)Makefile 8.1 (Berkeley) 6/6/93 # $FreeBSD$ +.include + PROG= fold + +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests .include Index: stable/11/usr.bin/fold/tests/Makefile =================================================================== --- stable/11/usr.bin/fold/tests/Makefile (nonexistent) +++ stable/11/usr.bin/fold/tests/Makefile (revision 327186) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +ATF_TESTS_SH+= fold_test + +.include Property changes on: stable/11/usr.bin/fold/tests/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/11/usr.bin/fold/tests/fold_test.sh =================================================================== --- stable/11/usr.bin/fold/tests/fold_test.sh (nonexistent) +++ stable/11/usr.bin/fold/tests/fold_test.sh (revision 327186) @@ -0,0 +1,81 @@ +# +# Copyright 2017 Shivansh +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +atf_test_case b_flag +b_flag_head() +{ + atf_set "descr" "Verify the usage of option 'b'" +} + +b_flag_body() +{ + atf_check -s exit:0 -o empty fold -b < /dev/null +} + +atf_test_case s_flag +s_flag_head() +{ + atf_set "descr" "Verify the usage of option 's'" +} + +s_flag_body() +{ + atf_check -s exit:0 -o empty fold -s < /dev/null +} + +atf_test_case invalid_usage +invalid_usage_head() +{ + atf_set "descr" "Verify that an invalid usage with a supported option produces a valid error message" +} + +invalid_usage_body() +{ + atf_check -s not-exit:0 -e inline:"fold: option requires an argument -- w +usage: fold [-bs] [-w width] [file ...] +" fold -w +} + +atf_test_case no_arguments +no_arguments_head() +{ + atf_set "descr" "Verify that fold(1) executes successfully and silently when invoked without any arguments" +} + +no_arguments_body() +{ + atf_check -s exit:0 -o empty fold < /dev/null +} + +atf_init_test_cases() +{ + atf_add_test_case b_flag + atf_add_test_case s_flag + atf_add_test_case invalid_usage + atf_add_test_case no_arguments +} Property changes on: stable/11/usr.bin/fold/tests/fold_test.sh ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/11/usr.bin/rs/Makefile =================================================================== --- stable/11/usr.bin/rs/Makefile (revision 327185) +++ stable/11/usr.bin/rs/Makefile (revision 327186) @@ -1,5 +1,11 @@ # @(#)Makefile 8.1 (Berkeley) 6/6/93 +# $FreeBSD$ +.include + PROG= rs + +HAS_TESTS= +SUBDIR.${MK_TESTS}+= tests .include Index: stable/11/usr.bin/rs/tests/Makefile =================================================================== --- stable/11/usr.bin/rs/tests/Makefile (nonexistent) +++ stable/11/usr.bin/rs/tests/Makefile (revision 327186) @@ -0,0 +1,5 @@ +# $FreeBSD$ + +ATF_TESTS_SH+= rs_test + +.include Property changes on: stable/11/usr.bin/rs/tests/Makefile ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/11/usr.bin/rs/tests/rs_test.sh =================================================================== --- stable/11/usr.bin/rs/tests/rs_test.sh (nonexistent) +++ stable/11/usr.bin/rs/tests/rs_test.sh (revision 327186) @@ -0,0 +1,278 @@ +# +# Copyright 2017 Shivansh +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. +# +# $FreeBSD$ +# + +atf_test_case c_flag +c_flag_head() +{ + atf_set "descr" "Verify the usage of option 'c'" +} + +c_flag_body() +{ + atf_check -s exit:0 -o empty rs -c < /dev/null +} + +atf_test_case s_flag +s_flag_head() +{ + atf_set "descr" "Verify the usage of option 's'" +} + +s_flag_body() +{ + atf_check -s exit:0 -o empty rs -s < /dev/null +} + +atf_test_case C_flag +C_flag_head() +{ + atf_set "descr" "Verify the usage of option 'C'" +} + +C_flag_body() +{ + atf_check -s exit:0 -o empty rs -C < /dev/null +} + +atf_test_case S_flag +S_flag_head() +{ + atf_set "descr" "Verify the usage of option 'S'" +} + +S_flag_body() +{ + atf_check -s exit:0 -o empty rs -S < /dev/null +} + +atf_test_case t_flag +t_flag_head() +{ + atf_set "descr" "Verify the usage of option 't'" +} + +t_flag_body() +{ + atf_check -s exit:0 -o empty rs -t < /dev/null +} + +atf_test_case T_flag +T_flag_head() +{ + atf_set "descr" "Verify the usage of option 'T'" +} + +T_flag_body() +{ + atf_check -s exit:0 -o empty rs -T < /dev/null +} + +atf_test_case k_flag +k_flag_head() +{ + atf_set "descr" "Verify the usage of option 'k'" +} + +k_flag_body() +{ + atf_check -s exit:0 -o empty rs -k < /dev/null +} + +atf_test_case K_flag +K_flag_head() +{ + atf_set "descr" "Verify the usage of option 'K'" +} + +K_flag_body() +{ + atf_check -s exit:0 -o inline:" +" rs -K < /dev/null +} + +atf_test_case g_flag +g_flag_head() +{ + atf_set "descr" "Verify the usage of option 'g'" +} + +g_flag_body() +{ + atf_check -s exit:0 -o empty rs -g < /dev/null +} + +atf_test_case G_flag +G_flag_head() +{ + atf_set "descr" "Verify the usage of option 'G'" +} + +G_flag_body() +{ + atf_check -s exit:0 -o empty rs -G < /dev/null +} + +atf_test_case e_flag +e_flag_head() +{ + atf_set "descr" "Verify the usage of option 'e'" +} + +e_flag_body() +{ + atf_check -s exit:0 -o inline:" +" rs -e < /dev/null +} + +atf_test_case n_flag +n_flag_head() +{ + atf_set "descr" "Verify the usage of option 'n'" +} + +n_flag_body() +{ + atf_check -s exit:0 -o empty rs -n < /dev/null +} + +atf_test_case y_flag +y_flag_head() +{ + atf_set "descr" "Verify the usage of option 'y'" +} + +y_flag_body() +{ + atf_check -s exit:0 -o empty rs -y < /dev/null +} + +atf_test_case h_flag +h_flag_head() +{ + atf_set "descr" "Verify the usage of option 'h'" +} + +h_flag_body() +{ + atf_check -s exit:0 -o inline:"1 0 +" rs -h < /dev/null +} + +atf_test_case H_flag +H_flag_head() +{ + atf_set "descr" "Verify the usage of option 'H'" +} + +H_flag_body() +{ + atf_check -s exit:0 -o inline:" 0 line 1 +1 0 +" rs -H < /dev/null +} + +atf_test_case j_flag +j_flag_head() +{ + atf_set "descr" "Verify the usage of option 'j'" +} + +j_flag_body() +{ + atf_check -s exit:0 -o empty rs -j < /dev/null +} + +atf_test_case m_flag +m_flag_head() +{ + atf_set "descr" "Verify the usage of option 'm'" +} + +m_flag_body() +{ + atf_check -s exit:0 -o empty rs -m < /dev/null +} + +atf_test_case z_flag +z_flag_head() +{ + atf_set "descr" "Verify the usage of option 'z'" +} + +z_flag_body() +{ + atf_check -s exit:0 -o empty rs -z < /dev/null +} + +atf_test_case invalid_usage +invalid_usage_head() +{ + atf_set "descr" "Verify that an invalid usage with a supported option produces a valid error message" +} + +invalid_usage_body() +{ + atf_check -s not-exit:0 -e inline:"rs: width must be a positive integer +" rs -w +} + +atf_test_case no_arguments +no_arguments_head() +{ + atf_set "descr" "Verify that rs(1) executes successfully and produces a valid output when invoked without any arguments" +} + +no_arguments_body() +{ + atf_check -s exit:0 -o inline:" +" rs < /dev/null +} + +atf_init_test_cases() +{ + atf_add_test_case c_flag + atf_add_test_case s_flag + atf_add_test_case C_flag + atf_add_test_case S_flag + atf_add_test_case t_flag + atf_add_test_case T_flag + atf_add_test_case k_flag + atf_add_test_case K_flag + atf_add_test_case g_flag + atf_add_test_case G_flag + atf_add_test_case e_flag + atf_add_test_case n_flag + atf_add_test_case y_flag + atf_add_test_case h_flag + atf_add_test_case H_flag + atf_add_test_case j_flag + atf_add_test_case m_flag + atf_add_test_case z_flag + atf_add_test_case invalid_usage + atf_add_test_case no_arguments +} Property changes on: stable/11/usr.bin/rs/tests/rs_test.sh ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: stable/11 =================================================================== --- stable/11 (revision 327185) +++ stable/11 (revision 327186) Property changes on: stable/11 ___________________________________________________________________ Modified: svn:mergeinfo ## -0,0 +0,1 ## Merged /head:r326289