We introduce a mechanism by which tests can easily access configure-time
parameters (like @PERL@, @AWK@, ...).
It works by "sourcing" a file named config.sh (residing in the build tree):
. "$MC_TEST_EXTFS_CONFIG_SH"
$PERL -e 'print "hello"'
(Although config.sh has a shell syntax, Perl and Python programs too can
benefit from it, because it can be sourced into an .env_vars file and the
values exported from there.)
Of course, one can also use the traditional method, of *.in files listed in
configure.ac, but the mechanism introduced here is a more comfortable approach.
Signed-off-by: Mooffie <mooffie@gmail.com>
* 3752_extfs_tester_export_more_variables:
extfs: tester: improve HTML documentation output.
extfs: tester: export some more useful variables.
Ticket #3752: extfs: tester: use lowercase for private variables.
- We now have 4'th level headers: adjust --doc-depth.
- We have many short sections: highlight the active section's header.
Signed-off-by: Mooffie <mooffie@gmail.com>
We switch to a modern practice of using lowercase for private variables ("shell
variables") and uppercase for the system's ("environment variables"). Constants
too are made lowercase, as it takes a philosopher to define "constant".
This gives us two advantages:
- If an .env_vars file accesses a private variable (e.g. $DATA_DIR or $INPUT),
something we want to discourage, we'll easily see this.
- Somewhat confusing code like "MC_TEST_DATA_DIR=$DATA_DIR" (which was to occur
in the following patch) becomes self-documenting after the change.
Signed-off-by: Mooffie <mooffie@gmail.com>
* 3749_vfs_blksize:
(vfs_adjust_stat): new VFS API, currently used to calculate st_blocks.
Clarify usage of st_rdev. Use it if HAVE_STRUCT_STAT_ST_RDEV is defined.
ftpfs: define st_blksize as equal to 64K.
fishfs: define st_blksize as equal to 64K.
Modify VFS APIs.
tarfs: define st_blksize as equal to 8K.
sftpfs: (sftpfs_fix_filename): refactoring: return length of result.
sftpfs: minor optimization.
sftpfs: define st_blksize and st_blocks.
(vfs_s_default_stat): define st_blksize and st_blocks explicitly.
Clarify usage of st_blocks. Use it if HAVE_STRUCT_STAT_ST_BLOCKS is defined.
Ticket #3749: fix segfault in VFS if block size is not set.
* (sftpfs_opendir): get rid of extra calculation of file name length.
* (sftpfs_open_file): likewise.
* (sftpfs_readlink): likewise.
* (sftpfs_symlink): likewise.
* (sftpfs_rename): likewise.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
Whitespace tweaking here. There's no change in the code itself except for
using '%c' in the first printf too, to make it like the second printf.
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Some printf implementations can't process with %d anything other than integers.
We solve this by re-using the awk snippet for this purpose. This makes
hp48_retsize() unecessary. And hp48_retdir() too.
(The "case" statement was left unindented to, hopefully, not affect diff's
output much. This aesthetic issue will be fixed in a following patch.)
Signed-off-by: Yury V. Zaytsev <yury@shurup.com>
Use "MM-DD-YYYY hh:mm" instead of "Mon DD YYYY hh:mm".
Note: we assign to $NOW at the top-level, not inside hp48_parser(), because the
communication is slow and we don't want each recursive call to hp48_parser() to
potentially print a different time.
Two bugs fixed:
* "printf -rw-r--r--" made printf complain about invalid option (although
changing it to "printf -- -rw-r--r-" is possible, we don't know how portble
this is).
* Quotes around $INPUT defeat the purpose of the function calls (botched in
commit 61b4642af4).
* 3575_nanoseconds:
FISH VFS: generate timestamps with nanosecond precision for touch.
(fish_utime): avoid buffer overflow: allocate buffer for command dynamically.
Ticket #3575: preserve timestamps with nanosecond precisions during file copy
MC truncates timestamps during file copy and drops sub-second precision.
Make use of utimensat(), introduced in Linux kernel 2.6.22 (and since
2.6.26 compatible with POSIX-1.2008).
Signed-off-by: Andrey Gursky <andrey.gursky@e-mail.ua>
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>