Skip to content

Commit

Permalink
Reword stuff to satisfy spell-checker
Browse files Browse the repository at this point in the history
Signed-off-by: Jim Klimov <jimklimov@gmail.com>
  • Loading branch information
jimklimov committed Jan 8, 2024
1 parent 62c2a4b commit 5a97af4
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ notest
NOTMAKE
nroff
NSTIPS
nsub
nvpool
nytprof
OBJC
Expand Down Expand Up @@ -419,6 +420,7 @@ plaintar
plist
plugin
png
poolrootfs
populat
posix
prebuilt
Expand Down Expand Up @@ -461,6 +463,7 @@ rmdir
rmprog
rmtmp
ron
rootds
rootfs
rootfs'es
rpool
Expand Down
10 changes: 8 additions & 2 deletions lib/ZnapZend/ZFS.pm
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ my $splitHostDataSet = sub {
# If there are further bugs in the regex, comment away the
# next implementation line and fall through to verbosely
# debugging code below to try and iterate a fix.
# In the "if" clause below we separate the regexes for the
# use-case where we have two "@" characters:
# In the "if" clause below we separate the regular expressions
# for the use-case where we have two "@" characters:
# user@host:dataset@snap
# from having zero or one "@" characters:
# host:dataset
Expand All @@ -57,6 +57,12 @@ my $splitHostDataSet = sub {
# may have ":" chars of their own, e.g.
# ...@znapzend-auto-2024-01-08T10:22:13Z
# pond/export/vm-1:2
# Also note that we can not discern "X@Y:Z" strings by pattern
# alone - are they a remote "user@host:rootds" or a local
# "rootds@funny:snapname"? For practical purposes, we proclaim
# preference for the former: we are more likely to look at funny
# local snapshot names, than to back up to (or otherwise care
# about) remote pools' ROOT datasets.
my $count = ($_[0] =~ tr/@//);
if ($count > 1) {
#return ($_[0] =~ /^(?:([^:\/]+):)?([^@\s]+|[^@\s]+\@[^@\s]+)$/);
Expand Down
6 changes: 3 additions & 3 deletions t/znapzend-lib-splitter.t
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@ for my $r (qw(undef hostname username@hostname)) {

# See big comment above:
if ($task eq 'username@hostname:poolrootfs') {
isnt (defined ($remote), 1, "remote should BOGUSLY be not defined after parsing for this exceptional test case");
is (($dataSet eq "username"), 1, "dataSet has expected BOGUS value after parsing for this exceptional test case");
is (($snapshot eq "hostname:poolrootfs"), 1, "snapshot has expected BOGUS value after parsing for this exceptional test case");
isnt (defined ($remote), 1, "BOGUS exceptional test case: remote should be not defined after parsing for this exceptional test case");
is (($dataSet eq "username"), 1, "BOGUS exceptional test case: dataSet has expected BOGUS value after parsing for this exceptional test case");
is (($snapshot eq "hostname:poolrootfs"), 1, "BOGUS exceptional test case: snapshot has expected BOGUS value after parsing for this exceptional test case");
} else {
is (($dataSet eq $d), 1, "dataSet has expected value after parsing");

Expand Down

0 comments on commit 5a97af4

Please sign in to comment.