logo

system-testsuite

Unix system testsuite (highlights broken bits in GNU and BusyBox)
commit: dff0b436db92aee4a27343c018736b6bb0b326f7
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat,  4 Sep 2021 06:46:07 +0200

Initial Commit

Diffstat:

ABSD-3-Clause26++++++++++++++++++++++++++
AKyuafile9+++++++++
AREADME.md15+++++++++++++++
Afalse25+++++++++++++++++++++++++
Atrue25+++++++++++++++++++++++++
5 files changed, 100 insertions(+), 0 deletions(-)

diff --git a/BSD-3-Clause b/BSD-3-Clause @@ -0,0 +1,26 @@ +Copyright (c) <YEAR>, <OWNER> +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. +3. Neither the name of the <ORGANIZATION> nor the names of its + contributors may be used to endorse or promote products derived from + this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT OWNER 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. diff --git a/Kyuafile b/Kyuafile @@ -0,0 +1,9 @@ +syntax(2) +--Copyright © 2021 Haelwenn (lanodan) Monnier <contact+system-testsuite@hacktivis.me> +--SPDX-License-Identifier: BSD-3-Clause + +test_suite("system-testsuite") + +-- /BEGIN/,$ | LC_ALL=C.UTF-8 sort +atf_test_program{name="true"} +atf_test_program{name="false"} diff --git a/README.md b/README.md @@ -0,0 +1,15 @@ +# System Testsuite +``` +Copyright © 2021 Haelwenn (lanodan) Monnier <contact+system-testsuite@hacktivis.me> +SPDX-License-Identifier: BSD-3-Clause +``` + +This contains tests to highlight commonly broken pieces in Unix derived programs. + +Your GNU-based or BusyBox-based system will likely fail most of this. + +## Dependencies +- POSIX-compliant system +- [Kyua](https://github.com/jmmv/kyua) + [atf](https://github.com/jmmv/atf) + +Once this is done, you can run the tests via `kyua test` diff --git a/false b/false @@ -0,0 +1,25 @@ +#!/usr/bin/env atf-sh +# Copyright © 2021 Haelwenn (lanodan) Monnier <contact+system-testsuite@hacktivis.me> +# SPDX-License-Identifier: BSD-3-Clause + +atf_test_case basic +basic_body() { + atf_check -s exit:1 false +} + +atf_test_case nohelp +nohelp_body() { + atf_check -s exit:1 false --help +} + +atf_test_case devfull +devfull_body() { + atf_check -s exit:1 false --help >/dev/full +} + +atf_init_test_cases() { + cd "$(atf_get_srcdir)" + atf_add_test_case basic + atf_add_test_case nohelp + atf_add_test_case devfull +} diff --git a/true b/true @@ -0,0 +1,25 @@ +#!/usr/bin/env atf-sh +# Copyright © 2021 Haelwenn (lanodan) Monnier <contact+system-testsuite@hacktivis.me> +# SPDX-License-Identifier: BSD-3-Clause + +atf_test_case basic +basic_body() { + atf_check true +} + +atf_test_case nohelp +nohelp_body() { + atf_check true --help +} + +atf_test_case devfull +devfull_body() { + atf_check true --help >/dev/full +} + +atf_init_test_cases() { + cd "$(atf_get_srcdir)" + atf_add_test_case basic + atf_add_test_case nohelp + atf_add_test_case devfull +}