1. 24 Sep, 2021 1 commit
  2. 01 Sep, 2020 1 commit
    • Jilles Tjoelker's avatar
      sh: Write absolute path in command -vV and type · ccd0a51f
      Jilles Tjoelker authored
      POSIX is pretty clear that command -v, command -V and type shall write
      absolute pathnames. Therefore, we need to prepend the current directory's
      name to relative pathnames.
      
      This can happen either when PATH contains a relative pathname or when the
      operand contains a slash but is not an absolute pathname.
      ccd0a51f
  3. 15 Jul, 2018 1 commit
  4. 29 Apr, 2018 1 commit
  5. 25 Jun, 2017 1 commit
    • Jilles Tjoelker's avatar
      sh: Ignore error when cd writes the directory actually switched to. · 6f49cd26
      Jilles Tjoelker authored
      If CDPATH is used non-trivially or the operand is "-", cd writes the
      directory actually switched to. (We currently do this only in interactive
      shells, but POSIX requires this in non-interactive shells as well.)
      
      As mentioned in Austin group bug #1045, cd shall not return an error while
      leaving the current directory changed. Therefore, ignore any write error.
      6f49cd26
  6. 14 May, 2017 1 commit
  7. 13 May, 2017 1 commit
  8. 07 May, 2017 1 commit
  9. 02 Sep, 2016 1 commit
  10. 04 May, 2016 1 commit
    • Enji Cooper's avatar
      Merge ^/user/ngie/release-pkg-fix-tests to unbreak how test files are installed · 430f7286
      Enji Cooper authored
      after r298107
      
      Summary of changes:
      
      - Replace all instances of FILES/TESTS with ${PACKAGE}FILES. This ensures that
        namespacing is kept with FILES appropriately, and that this shouldn't need
        to be repeated if the namespace changes -- only the definition of PACKAGE
        needs to be changed
      - Allow PACKAGE to be overridden by callers instead of forcing it to always be
        `tests`. In the event we get to the point where things can be split up
        enough in the base system, it would make more sense to group the tests
        with the blocks they're a part of, e.g. byacc with byacc-tests, etc
      - Remove PACKAGE definitions where possible, i.e. where FILES wasn't used
        previously.
      - Remove unnecessary TESTSPACKAGE definitions; this has been elided into
        bsd.tests.mk
      - Remove unnecessary BINDIRs used previously with ${PACKAGE}FILES;
        ${PACKAGE}FILESDIR is now automatically defined in bsd.test.mk.
      - Fix installation of files under data/ subdirectories in lib/libc/tests/hash
        and lib/libc/tests/net/getaddrinfo
      - Remove unnecessary .include <bsd.own.mk>s (some opportunistic cleanup)
      
      Document the proposed changes in share/examples/tests/tests/... via examples
      so it's clear that ${PACKAGES}FILES is the suggested way forward in terms of
      replacing FILES. share/mk/bsd.README didn't seem like the appropriate method
      of communicating that info.
      
      MFC after: never probably
      X-MFC with: r298107
      PR: 209114
      Relnotes: yes
      Tested with: buildworld, installworld, checkworld; buildworld, packageworld
      Sponsored by: EMC / Isilon Storage Division
      430f7286
  11. 28 Mar, 2016 1 commit
  12. 09 Mar, 2016 1 commit
  13. 03 Feb, 2016 1 commit
  14. 02 Feb, 2016 1 commit
  15. 22 Jan, 2016 2 commits
  16. 10 Jan, 2016 1 commit
  17. 07 Jan, 2016 2 commits
    • Jilles Tjoelker's avatar
      sh: Add a test for 'cd -'. · 0e50eefb
      Jilles Tjoelker authored
      Redirect 'cd -' output to /dev/null since POSIX requires it to write the new
      directory name even if not interactive, but we currently only write it if
      interactive.
      0e50eefb
    • Jilles Tjoelker's avatar
      sh: Ensure OPTIND=1 in subshell without forking does not affect outer env. · adba77a6
      Jilles Tjoelker authored
      Command substitutions containing a single simple command and here-document
      expansion are performed in a subshell environment, but may not fork. Any
      modified state of the shell environment should be restored afterward.
      
      The state that OPTIND=1 had been done was not saved and restored here.
      
      Note that the other parts of shellparam need not be saved and restored,
      since they are not modified in these situations (a fork is done before such
      modifications).
      adba77a6
  18. 03 Jan, 2016 1 commit
  19. 30 Aug, 2015 1 commit
  20. 25 Aug, 2015 1 commit
  21. 16 Aug, 2015 1 commit
  22. 18 Apr, 2015 1 commit
    • Bryan Drewery's avatar
      sh: Fix the trap builtin to be POSIX-compliant for 'trap exit SIG' and 'trap n n...'. · a59f8174
      Bryan Drewery authored
      The parser considered 'trap exit INT' to reset the default for both EXIT and
      INT. This beahvior is not POSIX compliant. This was avoided if a value was
      specified for 'exit', but then disallows exiting with the signal received. A
      possible workaround is using ' exit'.
      
      However POSIX does allow this type of behavior if the parameters are all
      integers. Fix the handling for this and clarify its support in the manpage
      since it is specifically allowed by POSIX.
      
      Differential Revision:	https://reviews.freebsd.org/D2325
      Reviewed by:	jilles
      MFC after:	2 weeks
      a59f8174
  23. 12 Oct, 2014 1 commit
  24. 03 Oct, 2014 1 commit
  25. 13 Aug, 2014 1 commit
    • Enji Cooper's avatar
      Convert bin/sh/tests to ATF · 12e2df3c
      Enji Cooper authored
      The new code uses a "test discovery mechanism" to determine
      what tests are available for execution
      
      The test shell can be specified via:
      
        kyua test -v test_suites.FreeBSD.bin.sh.test_shell=/path/to/test/sh
      
      Sponsored by: EMC / Isilon Storage Division
      Approved by: jmmv (mentor)
      Reviewed by: jilles (maintainer)
      12e2df3c
  26. 20 Jul, 2014 1 commit
  27. 08 Jul, 2014 1 commit
    • Jilles Tjoelker's avatar
      Don't install locale1.0 if MK_NLS == no. · 725d0727
      Jilles Tjoelker authored
      The test locale1.0 depends on locale support; it is meaningless without a
      working LC_MESSAGES.
      
      I added an OptionalObsoleteFiles.inc entry.
      
      PR:		181151
      Submitted by:	Garrett Cooper (original version)
      MFC after:	1 week
      Sponsored by:	EMC / Isilon Storage Division
      725d0727
  28. 10 May, 2014 2 commits
  29. 07 May, 2014 1 commit
  30. 15 Mar, 2014 1 commit
    • Jilles Tjoelker's avatar
      sh: Allow kill %job on jobs started without job control. · 76961687
      Jilles Tjoelker authored
      When killing a %job started without job control, kill all processes in it.
      As with process groups and zombies, if any process in the job can be killed
      or has already terminated, the command is successful.
      
      This also fixes occasional failures of the builtins/kill1.0 test.
      76961687
  31. 08 Mar, 2014 1 commit
  32. 27 Feb, 2014 1 commit
  33. 11 Dec, 2013 1 commit
    • Julio Merino's avatar
      Migrate tools/regression/bin/ tests to the new layout. · 13de33a5
      Julio Merino authored
      This change is a proof of concept on how to easily integrate existing
      tests from the tools/regression/ hierarchy into the /usr/tests/ test
      suite and on how to adapt them to the new layout for src.
      
      To achieve these goals, this change:
      
      - Moves tests from tools/regression/bin/<tool>/ to bin/<tool>/tests/.
      - Renames the previous regress.sh files to legacy_test.sh.
      - Adds Makefiles to build and install the tests and all their supporting
        data files into /usr/tests/bin/.
      - Plugs the legacy_test test programs into the test suite using the new
        TAP backend for Kyua (appearing in 0.8) so that the code of the test
        programs does not have to change.
      - Registers the new directories in the BSD.test.dist mtree file.
      
      Reviewed by:	freebsd-testing
      Approved by:	rpaulo (mentor)
      13de33a5