Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 09 Nov 2017 13:53:58 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-testing@freebsd.org
Subject:   [Bug 223564] Using a test script with filename "null" prevent "make install"
Message-ID:  <bug-223564-32464@https.bugs.freebsd.org/bugzilla/>

next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D223564

            Bug ID: 223564
           Summary: Using a test script with filename "null" prevent "make
                    install"
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: tests
          Assignee: freebsd-testing@freebsd.org
          Reporter: olivier@freebsd.org

I'm writing tests and one file (script shell) has the name "null" and this
prevent makefile to run:

How to reproduce the bug:

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
1) First, create a dummy test service
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

mkdir -p /usr/src/tests/bug/testing
cat > /usr/src/tests/bug/Makefile <<EOF
TESTSDIR=3D\${TESTSBASE}/bug
TESTS_SUBDIRS+=3Dtesting
.include <bsd.test.mk>
EOF

cat > /usr/src/tests/bug/testing/Makefile <<EOF
PACKAGE=3Dtests
TESTSDIR=3D\${TESTSBASE}/bug/testing
ATF_TESTS_SH+=3D null
.include <bsd.test.mk>
EOF

cat > /usr/src/tests/bug/testing/null.sh <<EOF
# empty
atf_test_case "dummy" "cleanup"
dummy_head() {
atf_set descr 'dummy test'
}
dummy_body() {
atf_check -s exit:0 true=20
}
EOF

=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
2) build and (try) install it
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

mkdir -p /usr/tests/bug/testing
cd /usr/src/tests/bug
make & make install
root@lame4:/usr/src/tests/bug # make install
install  -o root  -g wheel -m 444  Kyuafile  /usr/tests/bug/Kyuafile
=3D=3D=3D> testing (install)
make[1]: "/usr/obj/usr/src/amd64.amd64/tests/bug/testing/null" line 3: Need=
 an
operator
make[1]: "/usr/obj/usr/src/amd64.amd64/tests/bug/testing/null" line 4: Need=
 an
operator
make[1]: "/usr/obj/usr/src/amd64.amd64/tests/bug/testing/null" line 5: Need=
 an
operator
make[1]: "/usr/obj/usr/src/amd64.amd64/tests/bug/testing/null" line 6: Need=
 an
operator
make[1]: "/usr/obj/usr/src/amd64.amd64/tests/bug/testing/null" line 7: Need=
 an
operator
make[1]: "/usr/obj/usr/src/amd64.amd64/tests/bug/testing/null" line 9: Need=
 an
operator
make[1]: Fatal errors encountered -- cannot continue
make[1]: stopped in /usr/src/tests/bug/testing
*** Error code 1

Stop.
make: stopped in /usr/src/tests/bug

=3D> The makefile try to interpret this file


=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
3) Fixing, by renaming filename "null" to "empty"
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D

rm -rf /usr/obj/usr/src/amd64.amd64/tests/bug/
mv /usr/src/tests/bug/testing/null.sh /usr/src/tests/bug/testing/empty.sh
sed -i "" -e "s/null/empty/" /usr/src/tests/bug/testing/Makefile

make & make install
install  -o root  -g wheel -m 444  Kyuafile  /usr/tests/bug/Kyuafile
=3D=3D=3D> testing (install)
install  -o root  -g wheel -m 555  empty  /usr/tests/bug/testing/empty
install  -o root  -g wheel -m 444  Kyuafile  /usr/tests/bug/testing/Kyuafile

=3D> No more bug

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-223564-32464>