[roll] Roll fuchsia [package-directory] Rework tests to use VFS connections

Ensure package directory tests serve a connection to the directories
being tested, and all child nodes are opened through fuchsia.io. This
ensures that the VFS connection logic (including hierarchal rights
enforcement and path handling) is also tested. This results in a
few test-only changes:

 * Hierarchal rights are now enforced, so in cases where NOT_SUPPORTED
   was being checked before, we now need ACCESS_DENIED.
 * The VFS handles checking certain flags already reducing the verbosity
   of these tests. This includes attempts to create new nodes, which
   requires the parent connection to be served as writable. This is not
   possible with how the nodes are implemented, so these tests have been
   removed in lieu of assertions that guarantee we cannot create
   new files, and tests that ensure we cannot create mutable connections
 * Callers of the fuchsia.io/Directory.DeprecatedOpen method now reject
   requests to open files where the path ends with a trailing slash,
   since the VFS adds OpenFlags.DIRECTORY in these cases. This is NOT
   done for the new fuchsia.io/Directory.Open method, so that is still
   allowed for those tests.

As we are now testing through a DirectoryProxy instead of calling the
VFS Node trait methods directly, we can simplify a lot of test code by
using the helpers in the fuchsia-fs crate. This improves test
readability significantly in some cases, and also ensures that we test
end-to-end behavior that clients will encounter.

There should be no change to code coverage with these tests, but there
is a small functional change: in certain cases when calling
fuchsia.io/Directory.DeprecatedOpen, the APPEND flag was erroneously
allowed. We cannot easily fix this without disabling the old CTF tests,
so for now we just update them going forwards and leave the old
behavior. We need to address this as part of the io2 migration soon.

Remove redundant test cases where the VFS already enforces certain
checks, and instead add assertions which ensure no regressions in
behavior can occur.

Original-Bug: 324111518
Test: fx test package-directory-tests
Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/1234244
Original-Revision: 04768696b0579249beddb7546ed23e03b4ceff69
GitOrigin-RevId: 2b64a68b95ee8843e8eb72d3a54ed75cc51fafe9
Change-Id: If488a31e111580fb2e470e8bf2d4abb2f6a02504
1 file changed
tree: a1d8dd77efcf11ad1721ea85fb513dc147f5fb6d
  1. ctf/
  2. git-hooks/
  3. infra/
  4. third_party/
  5. cts
  6. firmware
  7. flower
  8. jiri.lock
  9. MILESTONE
  10. minimal
  11. prebuilts
  12. README.md
  13. stem
  14. test_durations
  15. toolchain
README.md

Integration

This repository contains Fuchsia's Global Integration manifest files.

Making changes

All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.

Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance in one of the communication channels documented at get involved.

Obtaining the source

First install Jiri.

Next run:

$ jiri init
$ jiri import minimal https://fuchsia.googlesource.com/integration
$ jiri update

Third party

Third party projects should have their own subdirectory in ./third_party.