• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/bin/sh
2# SPDX-License-Identifier: GPL-2.0-or-later
3# Copyright (c) 2024 SUSE LLC <mdoucha@suse.cz>
4
5TST_TESTFUNC="do_test"
6
7# PURPOSE:  Check that /proc/net/rpc/nfs exists in nested network namespaces
8# d47151b79e32 ("nfs: expose /proc/net/sunrpc/nfs in net namespaces")
9# part of patchset
10# https://lore.kernel.org/linux-nfs/cover.1708026931.git.josef@toxicpanda.com/
11do_test()
12{
13	local procfile="/proc/net/rpc/nfs"
14
15	if tst_rhost_run -c "test -e '$procfile'"; then
16		tst_res TPASS "$procfile exists in net namespaces"
17	else
18		tst_res TFAIL "$procfile missing in net namespaces"
19	fi
20}
21
22# Force use of nested net namespace
23unset RHOST
24
25. nfs_lib.sh
26tst_run
27