summaryrefslogtreecommitdiff
path: root/source3/script/tests/test_smbclient_tarmode.pl
AgeCommit message (Collapse)AuthorFilesLines
2019-09-01Spelling fixes s/hierachy/hierarchy/Mathieu Parent1-1/+1
Signed-off-by: Mathieu Parent <math.parent@gmail.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
2015-12-03selftest: fix tar test with Pax format archivesBjörn Jacke1-1/+5
we need to skip PaxHeader pseudo files Signed-off-by: Bjoern Jacke <bj@sernet.de>
2013-11-05test_smbclient_tarmode.pl: remove unneccesary arg defaultsDavid Disseldorp1-6/+9
The host, share and localpath arguments should not take default values. Check that these required arguments are specified. Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org> Autobuild-User(master): Jim McDonough <jmcd@samba.org> Autobuild-Date(master): Tue Nov 5 16:40:20 CET 2013 on sn-devel-104
2013-11-05test_smbclient_tarmode.pl: depend only on perl v5.10Aurélien Aptel1-10/+17
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: remove all ./ prefix when dealing with remote filesAurélien Aptel1-3/+11
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: sanitize $DIR + whitespaceAurélien Aptel1-1/+2
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: use -n flag for specifiying hostname (was ↵Aurélien Aptel1-3/+6
ambiguous with help) Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: enable create with exclude testsAurélien Aptel1-1/+1
[ddiss@samba.org: split from clitar implementation commit] Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add subunit output flagAurélien Aptel1-6/+51
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add test for interactive sessionAurélien Aptel1-20/+29
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add extraction regex tests, verbose flagAurélien Aptel1-15/+90
* reset_remote() now removes the whole share content * verbose flag to control stdout of each test * extraction with regex test Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: test regex flag behaviourAurélien Aptel1-67/+65
[ddiss@samba.org: split from clitar implementation commit] Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add large file and long path testsAurélien Aptel1-15/+50
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add simple wildcard testAurélien Aptel1-3/+46
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: test interactive commandAurélien Aptel1-1/+7
[ddiss@samba.org: split from clitar implementation commit] Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: whitespaceAurélien Aptel1-1/+0
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: let --test run multiple testsAurélien Aptel1-7/+45
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: sanitize input, use File::Temp instead of ↵Aurélien Aptel1-8/+19
hardcoding temp dir Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: cosmetic changesAurélien Aptel1-70/+68
- Add whitespace around paren in if/for/while/... blocks - Don't split if/elsif/else cascade Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add copyright headerAurélien Aptel1-0/+17
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: samba 3.6.9 can print a empty attribute stringAurélien Aptel1-1/+1
While changing my setup, I discovered that for some unknown reasons samba (serv/client) doesn't print any attributes for normal files. Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: disable failing tests for nowAurélien Aptel1-3/+3
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: make script work on older Perl (now only need 5.14)Aurélien Aptel1-2/+7
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: fix a few minor typosDavid Disseldorp1-7/+7
Signed-off-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: refactor, cleanup and document in PODAurélien Aptel1-178/+459
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add tests for wildcard pattern (cI, cX, cF, xF).Aurélien Aptel1-33/+161
* add some test for wildcard pattern and r switch, when possible (-r is very buggy) * change default DIR to "tar_test_dir" * add tests for attributes (nohidden, nosystem which are undocumented) Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add a first simple wildcard testAurélien Aptel1-40/+145
* File::list() now takes an absolute path * check_remote() now takes the dir to check * added an optional File destructor * added cleanpath() to remove unecessary slashes * File::new_remote() can take an absolute path * File->{dir} is now absolute from the localpath Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add a clean option to erase the local pathAurélien Aptel1-0/+7
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add test for xFAurélien Aptel1-2/+28
Add test for extracting from a file list. Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add test for creation w/ filelistAurélien Aptel1-2/+39
* add test_creation_list() * add parameter to File::new_local() to provide file content Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add extraction test for I and X.Aurélien Aptel1-7/+60
* add test for xI and xX * fix bug in check_remote(): print filename instead of ref * replace hash by list in test_extraction_normal() Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add tests for X and I.Aurélien Aptel1-2/+34
Found a bug while doing so. X doesn't exclude file path. Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add option to choose and run a single testAurélien Aptel1-1/+22
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add first extraction testAurélien Aptel1-8/+173
* add normal extraction test * add (or bring back) - File::list() -- return list of File in a path - File::tree() -- same but recursive - File::walk() -- high order function to iterate on a File hierarchy * compute md5 sum when not cached * add check_remote(), will be useful for all extraction tests * fix consecutive slashes bug in some File::xxxpath() At this point, the script can replace the old test_smbclient_tarmode.sh in terms of features. Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: remove unused functionsAurélien Aptel1-27/+0
Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add nested dirs testAurélien Aptel1-5/+8
add a test to check that the backup handles nested directories. Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: refactored file related function to a File packageAurélien Aptel1-155/+194
all the localpath(), remotepath() and all file related functions were getting out of hand. The tests are now simpler to write. Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add test for "newer than" (`N` flag)Aurélien Aptel1-1/+45
add test for the N FILE flag which makes smbclient only backup files newer or as new as FILE. Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add test for reset modeAurélien Aptel1-6/+52
add a new test for the reset mode which can be triggered via `-a` or `tarmode reset`. Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: improve incremental testAurélien Aptel1-2/+5
instead of using archived and non-archived files for the test, use archive and various flags (system, hidden, readonly). Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05test_smbclient_tarmode.pl: add proper argument parsing for configuration.Aurélien Aptel1-50/+94
documentation is included in the script in POD format. Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>
2013-11-05initial commit of the new tarmode test script.Aurélien Aptel1-0/+367
This script will hopefully replace and improve test_smbclient_tarmode.sh. Right now it only does normal and incremental tests. Signed-off-by: Aurélien Aptel <aurelien.aptel@gmail.com> Reviewed-by: David Disseldorp <ddiss@samba.org> Reviewed-by: Jim McDonough <jmcd@samba.org>