Skip to content

Commit

Permalink
selftest: add snapshot share configuration
Browse files Browse the repository at this point in the history
Define a share that uses both vfs_shell_snap and fake_snap.pl to create,
delete and expose fake snapshots in response to FSRVP requests.
Additionally test snapshot enumeration and access via the shadow_copy2
module.

Allow for simple testing of FSRVP message sequence timeouts, by
specifying an artificially small interval.

Signed-off-by: David Disseldorp <[email protected]>
Reviewed-by: Jeremy Allison <[email protected]>
  • Loading branch information
ddiss authored and jrasamba committed Mar 31, 2015
1 parent 7a96325 commit 2e9ea9f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 0 deletions.
1 change: 1 addition & 0 deletions selftest/selftesthelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ def get_env_torture_options():

smbtorture4_options = [
configuration,
"--option=\'fss:sequence timeout=1\'",
"--maximum-runtime=$SELFTEST_MAXTIME",
"--basedir=$SELFTEST_TMPDIR",
"--format=subunit"
Expand Down
18 changes: 18 additions & 0 deletions selftest/target/Samba3.pm
Original file line number Diff line number Diff line change
Expand Up @@ -212,10 +212,13 @@ sub setup_nt4_dc($$)
rpc_server:samr = external
rpc_server:netlogon = external
rpc_server:register_embedded_np = yes
rpc_server:FssagentRpc = external
rpc_daemon:epmd = fork
rpc_daemon:spoolssd = fork
rpc_daemon:lsasd = fork
rpc_daemon:fssd = fork
fss: sequence timeout = 1
";

my $vars = $self->provision($path,
Expand Down Expand Up @@ -1071,6 +1074,8 @@ sub provision($$$$$$$$)

my $mod_printer_pl = "$ENV{PERL} $self->{srcdir}/source3/script/tests/printing/modprinter.pl";

my $fake_snap_pl = "$ENV{PERL} $self->{srcdir}/source3/script/tests/fake_snap.pl";

my @eventlog_list = ("dns server", "application");

##
Expand Down Expand Up @@ -1198,6 +1203,9 @@ sub provision($$$$$$$$)
# sending messages works, and that the %m sub works.
message command = mv %s $shrdir/message.%m
# fsrvp server requires registry shares
registry shares = yes
# Begin extra options
$extra_options
# End extra options
Expand Down Expand Up @@ -1333,6 +1341,16 @@ sub provision($$$$$$$$)
[dynamic_share]
path = $shrdir/%R
guest ok = yes
[fsrvp_share]
path = $shrdir
comment = fake shapshots using rsync
vfs objects = shell_snap shadow_copy2
shell_snap:check path command = $fake_snap_pl --check
shell_snap:create command = $fake_snap_pl --create
shell_snap:delete command = $fake_snap_pl --delete
# a relative path here fails, the snapshot dir is no longer found
shadow:snapdir = $shrdir/.snapshots
";
close(CONF);

Expand Down

0 comments on commit 2e9ea9f

Please sign in to comment.