• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0-or-later
3# Copyright (c) 2020 Petr Vorel <pvorel@suse.cz>
4
5TST_TESTFUNC=do_test
6PATH="$(dirname $0)/../../../../testcases/lib/:$PATH"
7. tst_net.sh
8
9export TST_NET_RHOST_RUN_DEBUG=1
10
11do_test()
12{
13	local file="/etc/fstab"
14
15	tst_rhost_run -c 'which grep' > /dev/null || \
16		tst_brk TCONF "grep not found on rhost"
17
18	tst_rhost_run -c "[ -f $file ]" || \
19		tst_brk TCONF "$file not found on rhost"
20
21	tst_rhost_run -s -c "grep -q \"[^ ]\" $file"
22	tst_rhost_run -s -c "grep -q '[^ ]' $file"
23
24	tst_res TPASS "tst_rhost_run is working"
25}
26
27tst_run
28