mbox series

[0/3] Nested overlay exportfs tests

Message ID 20191221185149.17509-1-amir73il@gmail.com (mailing list archive)
Headers show
Series Nested overlay exportfs tests | expand

Message

Amir Goldstein Dec. 21, 2019, 6:51 p.m. UTC
Eryu,

There is a somewhat convoluted story behind those tests...

At the time when overlay NFS export support was merged (v4.16),
nested overlay NFS export was not supported, because of the requirement
that all layers must have non null s_uuid. I had private patches to add
support for nested overlay NFS export, which I tested with these tests.

In kernel v4.20, commit 9df085f3c9a2 ("ovl: relax requirement for non
null uuid ...") was merged to enable NFS export of overlayfs with lower
squashfs. As a by-product from this change, nested overlay NFS export
is since supported.

v5.5-rc2 includes a fix to the v4.20 commit above ("ovl: fix lookup
failure on multi lower squashfs"). I used these tests to verify that
the change did not break the single lower layer with no uuid case.

v5.5-rc2 also includes a fix to how overlayfs encodes file handles in
memory ("ovl: make sure that real fid is 32bit aligned in memory").
I also use those test to verify this change and they flushed out several
bugs in my initial implementation that the existing overlay/exportfs
test did not catch.

Since those test have proven to be useful in catching bugs not directly
related to the less interesting case of nested overlay NFS export, I
decided it is now prime time for me to post them.

Thanks,
Amir.

Amir Goldstein (3):
  overlay: create the overlay/nested test group
  overlay: test file handles with nested overlay on the same fs
  overlay: test file handles with nested overlay on another fs

 tests/overlay/068     | 304 +++++++++++++++++++++++++++++++++++++++++
 tests/overlay/068.out |  50 +++++++
 tests/overlay/069     | 306 ++++++++++++++++++++++++++++++++++++++++++
 tests/overlay/069.out |  50 +++++++
 tests/overlay/group   |   6 +-
 5 files changed, 714 insertions(+), 2 deletions(-)
 create mode 100755 tests/overlay/068
 create mode 100644 tests/overlay/068.out
 create mode 100755 tests/overlay/069
 create mode 100644 tests/overlay/069.out

Comments

Amir Goldstein Dec. 22, 2019, 9:19 p.m. UTC | #1
On Sat, Dec 21, 2019 at 8:51 PM Amir Goldstein <amir73il@gmail.com> wrote:
>
> Eryu,
>

Eryu,

Actually, I needed to make a change to overlay/069, so please hold on
with these.

For test coverage, the interesting cases for nested overlay are:
- lower overlay is samefs
- lower overlay is non-samefs

That last case is especially interesting to exercise xino bit overflow,
because lower overlay uses the high ino bits.

This is not how I implemented overlay/069, so I made this change and
it caught another bug in upstream.

I have more nested tests coming soon, so I will post those along
with v2 of these tests.

Thanks and sorry for the noise,
Amir.