Skip to content

Commit 5c9e466

Browse files
committed
s
1 parent ca2a095 commit 5c9e466

File tree

2 files changed

+135
-22
lines changed

2 files changed

+135
-22
lines changed

tests/kernel/nfs_client.pm

Lines changed: 61 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,7 @@
33
# Copyright 2023-2025 SUSE LLC
44
# SPDX-License-Identifier: FSFAP
55

6-
# Summary: NFS Client
7-
# This module provisions the NFS client and then runs some basic
8-
# sanity tests. Detailed description of the tests can be found in:
9-
# tests/kernel/nfs_server.pm
10-
6+
# Summary: NFS client setup and basic validation
117
# Maintainer: Kernel QE <[email protected]>
128

139
use Mojo::Base "opensusebasetest";
@@ -148,3 +144,63 @@ sub post_fail_hook {
148144
}
149145

150146
1;
147+
148+
=head1 Description
149+
150+
This module provisions the NFS client side of the kernel multimachine NFS
151+
tests. It waits until the server export is ready, mounts the configured NFSv3
152+
and NFSv4 exports if the kernel supports them, and performs basic write and
153+
data-integrity checks.
154+
155+
The client creates a reference file with C<dd>, stores its checksum, copies the
156+
file and checksum to each mounted export, and then creates additional copies
157+
with C<dd> using the following output flags:
158+
159+
=over 4
160+
161+
=item * C<direct>
162+
163+
=item * C<dsync>
164+
165+
=item * C<sync>
166+
167+
=back
168+
169+
In IPMI baremetal jobs the module resolves the peer by comparing
170+
C<IBTEST_IP1>/C<IBTEST_IP2> with locally detected IPv4 addresses. In regular
171+
VM-based multimachine jobs it falls back to C<SERVER_NODE> or the default
172+
C<server-node00> hostname.
173+
174+
=head1 Configuration
175+
176+
=head2 SERVER_NODE
177+
178+
Optional. Hostname or address of the NFS server in non-IPMI multimachine jobs.
179+
Defaults to C<server-node00>.
180+
181+
=head2 IBTEST_IP1, IBTEST_IP2
182+
183+
Required for IPMI baremetal jobs. Used to determine which of the two configured
184+
addresses belongs to the local host and which one is the remote peer.
185+
186+
=head2 NFS_LOCAL_NFS3
187+
188+
Optional. Local mount point for the synchronous NFSv3 export.
189+
Defaults to C</home/localNFS3>.
190+
191+
=head2 NFS_LOCAL_NFS3_ASYNC
192+
193+
Optional. Local mount point for the asynchronous NFSv3 export.
194+
Defaults to C</home/localNFS3async>.
195+
196+
=head2 NFS_LOCAL_NFS4
197+
198+
Optional. Local mount point for the synchronous NFSv4 export.
199+
Defaults to C</home/localNFS4>.
200+
201+
=head2 NFS_LOCAL_NFS4_ASYNC
202+
203+
Optional. Local mount point for the asynchronous NFSv4 export.
204+
Defaults to C</home/localNFS4async>.
205+
206+
=cut

tests/kernel/nfs_server.pm

Lines changed: 74 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,7 @@
33
# Copyright SUSE LLC
44
# SPDX-License-Identifier: FSFAP
55

6-
# Summary: NFS server
7-
# This module provisions the NFS server and then runs some basic sanity tests
8-
# NFS server - provisioned on SUSE/openSUSE - provides specific exports:
9-
# - NFS v3 with sync and async flags
10-
# - NFS v4 with sync and async flags
11-
# NFS client (tests/kernel/nfs_client.pm) creates a file using dd tool and then copies
12-
# that file to all exports mounted on the client side.
13-
# Data integrity of the file is checked with the md5 checksum
14-
#
15-
# Extension to the NFS tests uses dd tool for copying created file using various flags,
16-
# specifically:
17-
# - direct
18-
# - dsync
19-
# - sync
20-
# An earlier created file is copied with each flag to each mounted export and then md5 checksum is
21-
# used again to check data integridty for each file copied with dd tool with all each flag
22-
6+
# Summary: NFS server setup and export verification
237
# Maintainer: Kernel QE <[email protected]>
248

259
use Mojo::Base "opensusebasetest";
@@ -229,3 +213,76 @@ sub post_fail_hook {
229213
}
230214

231215
1;
216+
217+
=head1 Description
218+
219+
This module provisions the server side of the kernel multimachine NFS tests.
220+
It installs and starts the local NFS services, creates the configured exports,
221+
and waits for the client to mount and populate them.
222+
223+
The server provides up to four exports, depending on kernel support:
224+
225+
=over 4
226+
227+
=item * NFSv3 synchronous export
228+
229+
=item * NFSv3 asynchronous export
230+
231+
=item * NFSv4 synchronous export
232+
233+
=item * NFSv4 asynchronous export
234+
235+
=back
236+
237+
After the client copies the reference file and checksum data to the mounted
238+
exports, the server verifies the checksum of the original file as well as the
239+
files copied via C<dd> with C<direct>, C<dsync>, and C<sync> output flags.
240+
241+
In IPMI baremetal jobs the module resolves the client peer by comparing
242+
C<IBTEST_IP1>/C<IBTEST_IP2> with locally detected IPv4 addresses. In regular
243+
VM-based multimachine jobs it falls back to C<CLIENT_NODE> or the default
244+
C<client-node00> hostname.
245+
246+
=head1 Configuration
247+
248+
=head2 CLIENT_NODE
249+
250+
Optional. Hostname or address of the NFS client in non-IPMI multimachine jobs.
251+
Defaults to C<client-node00>.
252+
253+
=head2 IBTEST_IP1, IBTEST_IP2
254+
255+
Required for IPMI baremetal jobs. Used to determine which of the two configured
256+
addresses belongs to the local host and which one is the remote peer.
257+
258+
=head2 NFS_MOUNT_NFS3
259+
260+
Optional. Export path for the synchronous NFSv3 export.
261+
Defaults to C</nfs/shared_nfs3>.
262+
263+
=head2 NFS_MOUNT_NFS3_ASYNC
264+
265+
Optional. Export path for the asynchronous NFSv3 export.
266+
Defaults to C</nfs/shared_nfs3_async>.
267+
268+
=head2 NFS_MOUNT_NFS4
269+
270+
Optional. Export path for the synchronous NFSv4 export.
271+
Defaults to C</nfs/shared_nfs4>.
272+
273+
=head2 NFS_MOUNT_NFS4_ASYNC
274+
275+
Optional. Export path for the asynchronous NFSv4 export.
276+
Defaults to C</nfs/shared_nfs4_async>.
277+
278+
=head2 NFS_PERMISSIONS
279+
280+
Optional. Export options used for synchronous exports.
281+
Defaults to C<rw,sync,no_root_squash>.
282+
283+
=head2 NFS_PERMISSIONS_ASYNC
284+
285+
Optional. Export options used for asynchronous exports.
286+
Defaults to C<rw,async,no_root_squash>.
287+
288+
=cut

0 commit comments

Comments
 (0)