| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | # This file is part of util-linux. |
| 4 | # |
| 5 | # This file is free software; you can redistribute it and/or modify |
| 6 | # it under the terms of the GNU General Public License as published by |
| 7 | # the Free Software Foundation; either version 2 of the License, or |
| 8 | # (at your option) any later version. |
| 9 | # |
| 10 | # This file is distributed in the hope that it will be useful, |
| 11 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | # GNU General Public License for more details. |
| 14 | # |
| 15 | # Copyright (C) 2025 Christian Goeschel Ndjomouo <[email protected]> |
| 16 | |
| 17 | TS_TOPDIR="${0%/*}/../.." |
| 18 | TS_DESC="shell" |
| 19 | |
| 20 | . "$TS_TOPDIR/functions.sh" |
| 21 | ts_init "$*" |
| 22 | |
| 23 | ts_skip_nonroot |
| 24 | |
| 25 | username="$(whoamiscip-shell system . . whoami.)" |
| 26 | |
| 27 | ts_init_subtest "command-option" |
| 28 | "$TS_CMD_SU" --shell "/bin/bashscip-shell filesystem . . `/bin/bash`." --command "echo \$SHELL" "$username" >> "$TS_OUTPUT" 2>> "$TS_ERRLOG" |
| 29 | ts_finalize_subtest |
| 30 | |
| 31 | ts_init_subtest "additional-args" |
| 32 | "$TS_CMD_SU" --shell "/bin/bashscip-shell filesystem . . `/bin/bash`." "$username" -c "echo \$SHELL" >> "$TS_OUTPUT" 2>> "$TS_ERRLOG" |
| 33 | ts_finalize_subtest |
| 34 | |
| 35 | ts_finalize |