Skip to content

Commit

Permalink
Decouple xino configuration from --verify
Browse files Browse the repository at this point in the history
To allow testing constant and valid st_dev;st_ino with xino=off,
do not enable xino automatically with --verify.

Instead, enable xino if either 'xino_auto' param is true or
if command line arg --xino is specified.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
  • Loading branch information
amir73il committed Nov 17, 2019
1 parent ca566c3 commit 1724ef2
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions run
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def show_format(why):
if why:
print(why)
print("Format:")
print("\t", sys.argv[0], "<--no|--ov[=<maxlayers>]> [--fuse=<subtype>] [--samefs|--maxfs=<maxfs>|--squashfs] [--xdev] [--meta] [--verify] [--ts=<0|1>] [-v] [<test-name>+]")
print("\t", sys.argv[0], "<--no|--ov[=<maxlayers>]> [--fuse=<subtype>] [--samefs|--maxfs=<maxfs>|--squashfs] [--xdev] [--xino] [--meta] [--verify] [--ts=<0|1>] [-v] [<test-name>+]")
print("\t", sys.argv[0], "<--no|--ov> [--fuse=<subtype>] [--samefs|--squashfs] [-s|--set-up]")
print("\t", sys.argv[0], "--open-file <file> [-acdertvw] [-W <data>] [-R <data>] [-B] [-E <err>]")
print("\t", sys.argv[0], "--<fsop> <file> [<args>*] [-aLlv] [-R <content>] [-B] [-E <err>]")
Expand Down Expand Up @@ -134,6 +134,10 @@ elif cfg.testing_overlayfs():
if redirect_dir is False:
cfg.add_mntopt("redirect_dir=on")
redirect_dir = True
# xino can be enabled with kernel version >= v4.17
if xino_auto is True:
cfg.add_mntopt("xino=on")
cfg.set_xino()
# metacopy can be enabled with kernel version >= v4.19
metacopy = check_bool_modparam("metacopy")
if metacopy is True:
Expand Down Expand Up @@ -179,6 +183,12 @@ while len(args) > 0 and args[0].startswith("-"):
if redirect_dir is True:
cfg.add_mntopt("redirect_dir=off")
redirect_dir = False
elif args[0] == "--xino":
if xino_auto is None:
print("xino not supported - ignoring --xino")
else:
cfg.add_mntopt("xino=on")
cfg.set_xino()
elif args[0] == "--meta":
if metacopy is None:
print("metacopy not supported - ignoring --meta")
Expand All @@ -187,9 +197,6 @@ while len(args) > 0 and args[0].startswith("-"):
cfg.set_metacopy()
elif args[0] == "--verify":
cfg.set_verify()
if not xino_auto is None and not cfg.is_samefs():
cfg.set_xino()
cfg.add_mntopt("xino=on")
if index is False:
cfg.add_mntopt("index=on")
else:
Expand Down

0 comments on commit 1724ef2

Please sign in to comment.