Commit graph

213 commits

Author SHA1 Message Date
Yihan Dong
f0d3447af5 Add proposed trendy teams for CTS modules
Change-Id: I6f4dbaa75c219dd75fec84ab8c9590c4c81ec737
Test: build locally
Bug: 341598672
2024-06-05 01:09:09 +00:00
David Anderson
65f2a49632 vts_fs_test: Annotate fs type test for VSR.
Bug: 302209455
Test: N/A
Change-Id: I5be7472b9d68072bb1400479187e7aee10beb0c7
2024-03-29 11:49:36 -07:00
Yi-Yo Chiang
2f298bcb21 adb-remount-test: Adb shell command could return 0 or 255 if device is
disconnected

Background: aosp/I25f740bd222263fcb3c501def38977db6af1e0d9

Bug: 327552188
Test: abtd
Change-Id: Ida33bfa00887e8ac358e057fc37fd45095ccc26b
2024-02-29 19:45:14 +08:00
Yi-Yo Chiang
fe52f39461 adb-remount-test: Only test mounts that are remounted by us
Right now we assume all RW mounts (minus /data & special FS) are
remounted by us and we apply the remount/overlayfs related checks
on them unconditionally. This would generate false positives when
a partition was RW but not remounted by us.
The test should instead check mounts that were remounted by us
(transitioned from RO to RW after adb-remount), and ignore
partitions that were already RW before running adb-remount.

Bug: 313609600
Test: adb-remount-test
Change-Id: I94e8a35775271f557790a458781657eb3b24a6f5
2024-01-09 18:15:38 +08:00
David Anderson
442345b734 vts_fs_test: Only check /data and /metadata for rw partitions.
Some rw /proc/mounts entries are FUSE.

Also, add some diagnostics for failures.

Bug: 318962836
Test: vts_fs_test on Pixel
Change-Id: I85dec8b37f1a061b1eca597aba3887b598b699f5
2024-01-08 22:50:04 +00:00
David Anderson
4793330ad1 vts_fs_test: Drop restrictions on ext4 userdata.
Bug: 313335353
Test: vts_fs_test
Change-Id: I40be9589f18288ebe2a8569dfaceb9cd2150db85
2024-01-02 13:52:12 -08:00
Kiyoung Kim
260e48f07e Deprecate Vendor Overlay when VNDK is deprecated
Vendor overlay was introduced to enable system-only update with small
changes on the vendor, but this is no longer required with same reason
of VNDK deprecation - more frequent Vendor update than expected, and
makes system-vendor interface unstable. This change adds more comments
to explain that Vendor overlay will be deprecated along with VNDK, and
skip test if VNDK is deprecated.

Bug: 307925435
Bug: 307902290
Test: fs_mgr_vendor_overlay_test passed with CF trunk-staging device
Change-Id: I7b9359a5754e8740e749c48f6265a1b0f92f13af
2023-10-30 13:19:12 +09:00
Treehugger Robot
54f2e06cf5 Merge "vts_fs_test: Do not check /metadata for automotive" into android14-tests-dev am: 76a9eb4374
Original change: https://android-review.googlesource.com/c/platform/system/core/+/2800753

Change-Id: I403f0915937a0c8b24a54b5b265b70b1ce529ff2
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2023-10-26 21:26:48 +00:00
Philip Chen
35817eeb55 vts_fs_test: Do not check /metadata for automotive
This aligns with GAS req 4.0.

Bug: 307215040
Test: build
Change-Id: I2115e147d484d066f892ea50eeca626e64beebfc
2023-10-23 21:43:23 +00:00
Yi-Yo Chiang
da5323e2d6 init: Use libfs_mgr kernel cmdline parser
Bug: 293695109
Test: CtsFsMgrTestCases
Change-Id: Ie2567d84cb80c392ad68aef0c438d8acc03a311e
2023-08-02 17:59:05 +08:00
Yi-Yo Chiang
79ad1e2e9b init: Unify kernel bootconfig parser with libfs_mgr
Right now there are two bootconfig parsers that gets linked into `init`.
One is from libinit itself and the other is from libfs_mgr.

The one in libinit removes all space characters between list elements,
so `key = "val1", "val2"` gets unquoted and squeezed into:
  `key=val1,val2`
The one in libfs_mgr doesn't remove spaces, it only unquotes:
  `key=val1, val2`

The libinit behavior is due to existing systems (such as sysprop)
expect the config value to be in the same format as kernel cmdline.
(aosp/1757971)
THe libfs_mgr behavior is due to the `androidboot.boot_device[s]`
format explicitly allows quoted comma appear in its list value, thus
relies on space, not comma, as the list value delimeter.

This commit merges the two parsers into libfs_mgr. Since all usages in
libfs_mgr besides `boot_device[s]` do not care about how list value are
delimited, and most usages in init expects the bootconfig value format
to be the same format as cmdline. We just special case the
`boot_device` scenario.

Also harden the test cases to cover all the different config value
format and expected result.

Note:
The format of kernel bootconfig is described here
https://docs.kernel.org/admin-guide/bootconfig.html

Bug: 293695109
Test: CtsFsMgrTestCases
Change-Id: I42b9bf626e8de38a60e8e09fac0693126b7efd91
2023-08-02 09:57:37 +00:00
Yi-Yo Chiang
96126069c2 fs_mgr: Split libfs_mgr and libfstab
The goal is to make the header definitions of the two curiously
intertwined libraries less chaotic.

After this change, libfstab's header would be self contained. In the
sense that all symbols exported by its headers are defined in its
compilation units.
libfs_mgr would still embed libfstab like before, it can use internal
symbols (symbols not exported by public headers) of libfstab through
the libfstab/fstab_priv.h private header.

Keep include_fstab/ as a symbolic link pointing to its new location.
This is a temporary workaround as there are still some bad build rules
(incorrectly) depending on the old include path with Android.bp
`include_dirs` directive.

Bug: 293695109
Test: build
Change-Id: Ib70a84984ac2cbfca5f5b27fadebf6a16e58146a
2023-08-01 04:56:41 +00:00
David Anderson
e55e3dcd3f vts_fs_test: Relax filesystem constraints for fixed partitions.
Adjust this test to align with VSR. First, skip the test if kernel is
< 5.10 or < Android 13. Second, allow non-dynamic partitions to be vfat.

Bug: 286038059
Test: vts_fs_test on CF
(cherry picked from https://android-review.googlesource.com/q/commit:084c94e43eb2916c84c72de524c6e8c3d5ec2d4f)
Merged-In: I5bd874f68296f7155d8c4366ebc13fe3d59c3ee6
Change-Id: I5bd874f68296f7155d8c4366ebc13fe3d59c3ee6
2023-06-07 04:15:19 +00:00
David Anderson
084c94e43e vts_fs_test: Relax filesystem constraints for fixed partitions.
Adjust this test to align with VSR. First, skip the test if kernel is
< 5.10 or < Android 13. Second, allow non-dynamic partitions to be vfat.

Bug: 286038059
Test: vts_fs_test on CF
Change-Id: I5bd874f68296f7155d8c4366ebc13fe3d59c3ee6
2023-06-06 16:46:21 -07:00
Eric Biggers
cc4a15b97a fs_mgr_fstab: allow fileencryption without equals sign
A point of confusion that has been encountered recently is that the
fileencryption argument is optional (since Android 11), yet the fstab
parser requires the equals sign in "fileencryption=".  Thus, someone
wanting to use the default options must use "...,fileencryption=,...".

Make "fileencryption" by itself mean the same thing so that it works as
expected.

Test: atest CtsFsMgrTestCases
Change-Id: I65ce6b9513942bec2107838396835e7aafb3bf37
2023-06-05 14:35:11 +00:00
David Anderson
37b52b6576 Update vts_fs_test to reflect VSR.
Bug: 253052346
Test: vts_fs_test
Change-Id: I8dbdf731acea9ff5d5006ee3767eda5417d476fd
2022-12-14 22:08:40 -08:00
Yi-Yo Chiang
b4a86eeb2f remount: Treat disable verity error as fatal only if verity is enabled
If device doesn't enable AVB altogether, then it might not have a vbmeta
partition at all. In this case, we shall ignore disable-verity errors.
We still disable verity unconditionally to keep the logic simple, but we
ignore any disable-verity error if AVB is not enabled in the first
place.

Bug: 241688845
Test: adb-remount-test on emulator
Test: Test remount on yukawa
Change-Id: Ifc763b3f0ca6989550c139a8c3a2308c9c2a7c3e
2022-11-22 15:26:37 +08:00
Yi-yo Chiang
eb88e7b677 Use ro.product.vendor.device to determine if running on Cuttlefish
Similar reasoning as aosp/2255456. ro.product.device could be overridden
by GSI if system.img was replaced with GSI.
Use ro.product.vendor.device, which comes from the vendor.img, to
determine the "device" type.

Bug: 243116800
Test: adb-remount-test on cuttlefish
Change-Id: Ib4a956047ef46d8e4837b27334f8d58162d4fa2a
2022-10-18 07:34:45 +00:00
Yi-Yo Chiang
9032c00869 fs_mgr_overlayfs: Remove support for physical scratch
Deprecate physical scratch path, support only dynamic partition scratch
and scratch on /cache.

Bug: 243116800
Test: adb-remount-test
Change-Id: I8b5e08a38e323139b56b169865dcaf1a6620cf20
2022-10-05 01:13:32 +08:00
Cole Faust
7e279e97a3 Fix module-file name collisions
Bazel doesn't allow a module and file with the same name.

Bug: 198619163
Test: Presubmits
Change-Id: I345086764071ca649de1ac11804e21675cd5e59d
2022-09-20 12:33:47 -07:00
Yi-Yo Chiang
3ae19c3c01 adb-remount-test: Miscellaneous fixes - 2nd round
* Call adb_wait in adb_reboot, as virtually all adb_reboot callsites are
  immediately followed by adb_wait.
* Remove |data| option from skip_administrative_mounts. The |data|
  option doesn't really work anyway, because vold & init creates
  bewildering heirarchy of /data bind-mounts, so it's not feasible to
  filter /data by mountpoints. It's more sensible to filter by the /data
  device node name, which should be done by the caller.
* Untangle skip_administrative_mounts and skip_unrelated_mounts.
  I don't know why we need two separate functions that do similar
  things. Just merge them together.

Bug: 243116800
Test: adb-remount-test
Change-Id: I847f0b8cc2a952bb4c8656a43da783f312670061
2022-09-02 00:52:29 +08:00
Yi-Yo Chiang
310c4dbc62 adb-remount-test: Refactor test cleanup
* If adb remount calls for a reboot during cleanup, this means it's
  trying to recreate vendor overlay. Don't reboot in this case because
  it's pointless. Total test runtime reduced by one reboot.
* Since this entire script assumes /system & /vendor must exist and
  remountable, add them to the MOUNTS list unconditionally.
* Remove /system/hello & /vendor/hello test, as we can just loop over
  MOUNTS to check those.

Bug: 243116800
Test: adb-remount-test
Change-Id: I2360314c404ee247356146760314c91ba2795ff5
2022-09-01 16:23:05 +08:00
Yi-Yo Chiang
9c7cd64845 adb-remount-test: Replace libc.so test with build.prop test
Since /bionic mountpoint is deprecated, we don't _have_ to explicitly
check consistency of /system/lib/bootstrap/libc.so anymore.

Remove the test which adds junk to the end of libc.so.  Editing libc.so
looks dangerous (albeit not!) and has unclear expectations.
Add test which edits /system/build.prop. Editing build.prop file is more
"safe" as it's just text edit, and the expectations are clear (edited
system properties should be loaded after reboot.)

Bug: 243116800
Test: adb-remount-test
Change-Id: I51bd32c6ffcc57eb646eeec0537e996847e6c2a5
2022-08-31 17:13:20 +08:00
Yi-Yo Chiang
ef8bf18dad adb-remount-test: Check override_creds only if overlayfs is used
Instead of probing the kernel to see if overlayfs is supported, just
check `df` after disable-verity.
If after disable-verity and overlays were mounted, then check that
override_creds patches are applied.

Bug: 243116800
Test: adb-remount-test
Change-Id: Icb1363278536a8177836263882b1a8a0d9f246c9
2022-08-31 15:49:50 +08:00
Yi-Yo Chiang
6b06037650 adb-remount-test: Print log timestamp & auto-detect color
* Change --print-time to default true, and print timestamp of each log
  message.
* Auto-detect color support. If stdout if terminal, then color default
  to true, else default to false.

Bug: 243116800
Test: adb-remount-test
Change-Id: Id8425488c4b18fe0bc4dd7e50c3e2ae2e8c74cfe
2022-08-31 11:34:00 +08:00
Yi-Yo Chiang
2f0bcd93c2 adb-remount-test: Refactor raw remount & remount from scratch test
Move "raw remount test" right after "disable-verity -R test".
Device is expected to be in a clean state right after disable-verity, so
we can perform "raw remount test" immediately after. This saves us one
reboot.

Move "remount from scratch test" right before "remount -R test".
Since they both require overlay teardown state, group them together so
we only need to teardown (and reboot) once. This saves us one reboot.

Total test runtime reduced by two reboots.

Bug: 243116800
Test: adb-remount-test
Change-Id: Ifd95ba713f1819a7d31e88cd70077dc306c64c58
2022-08-31 11:33:57 +08:00
Yi-Yo Chiang
4cf5421edc adb-remount-test: Refactor fastboot flash vendor test
Instead of relying on a local dev tree (which CI machines never have),
just pull the vendor partition image from device.
This way we can have CI coverage on fastbootd as well.

Stop redefining cleanup() hook, just toss all temporary files to $TMPDIR
and always clean up $TMPDIR on exit.

Clarify logs and error messages.

Bug: 243116800
Test: adb-remount-test
Change-Id: I08fb8df58a61c03db3274b22b51e40a1a8f41095
2022-08-31 11:32:55 +08:00
Yi-Yo Chiang
7da7fa4d09 adb-remount-test: Refactor remount RW test
* Check mount flag changes (ro/rw) before and after "adb remount".
* Add comment explaining what's going on with the |uses_dynamic_scratch|
  and |scratch_partition| variables.
* Add rich logs reporting infomation about the scratch partition.
* Add rich error messages.
* Filter out /data devices and external volumes (vold managed device)
  when checking RW partitions. We are only interested in system
  partitions.
* Remove redundant "remount from setup" test from end-of-file, as they
  are testing the same thing as the refactored remount test. Total test
  runtime reduced by one reboot.

Bug: 243116800
Test: adb-remount-test
Change-Id: Icda5bff78372bebfe2e166d8537a06be66fff886
2022-08-31 11:32:55 +08:00
Yi-Yo Chiang
9a636d2a85 adb-remount-test: Discover fstab pathname more intelligently
Pick exactly one fstab file whose pathname suffix matches one of the
fstab suffix properties.
This helps on CF who ships redundant copies of fstab.

Bug: 243116800
Test: adb-remount-test
Change-Id: I4d38859014161e14dba1f7e19dbce44a2621d0f1
2022-08-31 11:32:55 +08:00
Yi-Yo Chiang
32277d0967 adb-remount-test: Reduce noise from initial overlayfs diagnostics
There's quite a lot of noise from running "Checking current overlayfs
status". Improve the test output by filtering uninteresting df lines.

* "/apex/..." mounts not interesting.
* "rw" mounts not interesting.
* "fuse" devices not interesting.

Bug: 243116800
Test: adb-remount-test
Change-Id: Id15844d853aaf3f7ed86f1a83544494b697b5b39
2022-08-31 11:32:54 +08:00
Yi-Yo Chiang
659c96b12e adb-remount-test: Miscellaneous fixes
* When guessing the ANDROID_SERIAL, use output of `adb devices` instead
  of ro.serialno, because ro.serialno won't work for network devices.
* Ensure ANDROID_SERIAL is exported so the test don't fail if a new
  device is plugged into the host machine mid test.
* Change --wait-screen warning to info. The "warning" isn't helpful as
  it's not showing any potential problems.
* Register cleanup hooks to EXIT trap. This ensures cleanup code are
  always executed, and failure to clean up counts as test failure.
* Rewrite some unnecessarily complex command chaining to plain exit
  status check.
* Use `test` command to test file existence. Don't use `ls` or `cat` to
  test file as this isn't their intended usage, and parsing their error
  output can be finicky.

Bug: 243116800
Fixes: 178256393
Test: adb-remount-test
Change-Id: Iec4224d8a236a9852ce417b1129c27205d435d5b
2022-08-31 11:32:54 +08:00
Yi-Yo Chiang
7b126377b2 adb-remount-test: Refactor remount -R & disable-verity test
Since remount -R and disable-verity -R have similar expectations, group
them together and reuse each other's test code.
Remove the redundant "remount -R" test at end of file.
Total test runtime reduced by one reboot.

Bug: 243116800
Test: adb-remount-test
Change-Id: I510a9de39f94b73450df9abf82a55496df96bea1
2022-08-31 11:32:54 +08:00
Yi-Yo Chiang
c6f434c587 adb-remount-test: Refactor prologue & /sys/module/overlay mining
While doing precondition check, verify that device is debuggable and
unlocked.

The /sys/module/overlay mining code had some remarkably written chained
... && ... || ... expressions. This is also remarkably unreadable for
those untrained of bash command chaining pitfalls.
Just rewrite these with plain old if-then-else expressions.

Bug: 243116800
Test: adb-remount-test
Change-Id: I56b1dea5b9147755a43462682a51bc5802ee64c1
2022-08-31 11:32:54 +08:00
Yi-Yo Chiang
8f8d920588 adb-remount-test: Refactor restore()
The redefining of cleanup hooks are making the script rather difficult
to read. Instead of redefining restore() just to skip some parts of it,
let restore() check flags and conditionally execute cleanup code.

Bug: 243116800
Test: adb-remount-test
Change-Id: If9d627618b54e215200455e8133492670737571d
2022-08-31 11:32:54 +08:00
Yi-Yo Chiang
1a0e4d0bf7 adb-remount-test: Refactor check_eq & check_ne
Just use bash [[ for regex compare, which result in shorter code and
more robust.
Simplify the messaging pipeline:
  If success, don't print anything and return 0. Let caller decide what
  to log.
  If failure and --warning, log error message and return 1.
  If failure and ! --warning, die with error message.

Bug: 243116800
Test: adb-remount-test
Change-Id: Ie5426ff3fa57395aa6b4fe71c9bf96bd8e9afc35
2022-08-31 11:32:54 +08:00
Yi-Yo Chiang
bd9335d43d adb-remount-test: Add LOG() function
Right now there are a lot of log commands in the form of
  "echo <color code><log type><color code> [msg]... >&2"
which is painful to read, and test writers often accidentally omit the
trailing ">&2".

Add a LOG() function which takes care of the log formatting and stderr
redirecting once and for all.
Also bulk edit existing log commands to use LOG() everywhere.

Bug: 243116800
Test: adb-remount-test --color
Change-Id: I04beb9e09b28c08a3a6f4309bf2d4b6de906df90
2022-08-31 11:32:54 +08:00
Yi-Yo Chiang
0331a322b0 adb-remount-test: Add surgically_wipe_overlayfs & is_overlayfs_mounted util
Factor out common code to helper function.

Bug: 243116800
Test: adb-remount-test
Change-Id: If90e8d1a787fee2507d2b729316a67bf113a9cd8
2022-08-31 11:32:03 +08:00
Yi-Yo Chiang
531229c18c adb-remount-test: Redirect all test output to stderr
Right now some test output are print to stdout and some to stderr.
Stdout mostly contain output of test commands.
Stderr mostly contain test result and device diagnostic status.

The logs in both streams also don't have timestamps, so separating the
two streams would be incredibly unuseful, because it would be very
difficult to deduce the causuality between the log lines.

In practice only the concatenated log stream is useful, so let's just
redirect all meaningful logs to stderr for good measure.
Why not stdout? Because stdout is often captured by command
substitution as command output.

  foo() {
    echo "Log nessage..." >&2
    echo "function output..."
  }
  A=$(foo)

"Log message..." would go to stderr, and "function output..." would be
captured into ${A}.

Bug: 243116800
Test: adb-remount-test
Change-Id: I692a1b6cf352681cca65354688908e4becf9d31a
2022-08-27 14:07:00 +08:00
Yi-Yo Chiang
488dd4dbda adb-remount-test: Harden error handling and fix typo
Remove the ERR trap handler as it doesn't work as intended and is rather
finicky. (Read more: mywiki.wooledge.org/BashFAQ/105)

Trap ERR (and set -e) could be an useful tool if applied sparingly, like
in a subshell, but they seem almost useless, even harmful, if applied
globally due to the following reasons.

The problems it brings includes but not limited to:
* ERR trap handler doesn't propagate inside subshells and functions.
  This makes it rather useless for reporting unchecked errors.
* Set '-o errtrace' kind of fixes previous issue, but it would report
  superfluous errors, because as the non-zero error code propagates up
  the call stack, each subshell expression would evaluate to non-zero
  status, repeatedly triggering the trap handler.
* Breaks the rather common "execute comand and check ${?}" pattern in
  this script, for example:
    H=$(adb remount)
    [ "${?}" != 0 ] && echo warning....
  script would prematurely exit if $(adb remount) fails, not having a
  chance to recover from error.
--

`expr ...` is problematic because it exits with non-zero status if the
calculated result is zero. This makes ordinary harmless looking
expressions, which evaluates perfectly fine, to exit with error status
  A=$(expr 1 + 1)  # $? = 0
  A=$(expr 1 - 1)  # $? = 1
Just replace all `expr` with the more robust `$(( ... ))` construct.
--

Also fix typo scratch_paritition -> scratch_partition.

Bug: 243116800
Test: adb-remount-test.sh
Change-Id: I2a8941341a7a12359896f0e08ecd21766396eb45
2022-08-27 14:07:00 +08:00
Yi-Yo Chiang
075463764e adb-remount-test: Simplify disable-verity setup
Don't try to parse stdout of disable-verity, just pass -R to ask for
auto reboot.
This eliminates the complex logic of "disable-verity && check &&
reboot && disable-verity again ...", and increase robustness.

`${overlayfs_supported} && ${overlayfs_needed}` can be simplified to
just `${overlayfs_needed}` because `${overlayfs_needed}` implies
`${overlayfs_supported}`.

Move the curious recurring "overlay takeover unexpected" check to the
"Checking current overlayfs status" section so we don't need to repeat
it so many times.

Bug: 243116800
Bug: 241688845
Test: adb-remount-test
Change-Id: I96ec44e2b9d172c06c3b4850e061e7b6bb46833c
2022-08-22 02:46:28 +08:00
David Anderson
e4e51662d9 remount: Remove dev_t checks from tests.
These checks have historically been unreliable, and we make no
guarantees around dev_t with overlayfs.

Bug: 242240650
Test: adb-remount-test.sh
Change-Id: I19e7aabec424a22beb0b56d35b198906841178b0
2022-08-11 21:36:43 -07:00
Bowgo Tsai
80cb505f64 vts_fs_test: checks AVB 1.0 isn't used
AVB 1.0 support in fs_mgr has been removed in commit
Ibfb46aa6c2f761dbb3a9b5f0b16336e510417620.

Adding a VTS test case to ensure the legacy 'verify' fs_mgr
flag isn't used anymore.

Also converting GetFstabPath() to a public API in the fstab.h,
so the test case can read then parse the fstab file.

Bug: 204948957
Test: atest vts_fs_test
Change-Id: Ib6ed7cb8b6ad719b19cd876acf10f4312ecb51b6
2022-07-19 16:27:59 +08:00
David Anderson
c2f95c4b79 vts_fs_test: Only require EROFS in T+ kernels.
Bug: 237765186
Test: vts_fs_test
Change-Id: I294535953bfbe0f246347487b746d3adf2fca1aa
2022-07-13 16:45:11 -07:00
David Anderson
ffda48e959 Revert "Do not enforce EROFS for android-T and below."
This reverts commit a571d4a9bc.

Reason for revert: Incorrect fix

Change-Id: I6586c8e53cc89418d1802807a1a2e108f7e825d3
2022-07-13 16:36:43 -07:00
P.Adarsh Reddy
a571d4a9bc Do not enforce EROFS for android-T and below.
EROFS is not mandatory for android T and below,
so skip the test for those.

Bug: 237765186
Test: vts_fs_test fs#ErofsSupported
Change-Id: Iceea46f8f2d443636de504962b718a2461605591
2022-07-08 12:14:01 +00:00
Yi-Yo Chiang
f8671e0fc1 fs_mgr_fstab: Refactor & cleanup DSU mounting logic
* Instead of copy-and-modify `/data` mount entry, TransformFstabForDsu()
  can just modify all `/data` mount entries in-place.
* This also stops TransformFstabForDsu() from shuffling the mount entry
  of `/data` in fstab, simplifying the testcase.
* Implement GetEntriesForMountPoint() with GetEntriesByPred().
* Remove unused method BuildDsuUserdataFstabEntry() and
  EraseFstabEntry().

Bug: 235111004
Test: atest CtsFsMgrTestCases
Test: Presubmit GSI boot test
Change-Id: I4afb443b7e527038fb42424543bb1538b01d5ec9
2022-06-30 06:46:02 +00:00
Yi-Yo Chiang
c46c89228c TransformFstabForDsu: Support erofs GSI and refactor
Synthesis mount entry for erofs and ext4.
Fix the synthesis logic to always create a new entry from scratch. The
old logic of "copy an existing mount entry and edit its fs_type"
doesn't work because different fs_type would have incomptable
fs_options. For example, changing this:
  system  /system  ext4  ro,barrier=1  wait,logical,first_stage_mount
to this:
  system  /system  erofs  ro,barrier=1  wait,logical,first_stage_mount
doesn't work, because the erofs driver won't recognize the "barrier=1"
mount flag, since "barrier=1" is specific to ext4.

Bug: 235111004
Test: Boot erofs GSI.
Test: atest CtsFsMgrTestCases
Change-Id: I57132a55a089c7aae3e17c717ecd9dc1047fede8
2022-06-24 16:47:36 +08:00
jiajia tang
a1c8f00e70 sh_binary_host for 'adb-remount-test.sh'.
"adb-remount-test.sh" is sh_binary,
not cc_prebuilt_binary.

Test: m
Test: cd system/core/fs_mgr; mma

Change-Id: Ie5e2446f87d38905d728e2c5a76f6f02381d10ce
Signed-off-by: jiajia tang <tangjiajia@xiaomi.com>
2022-06-08 22:05:06 +00:00
David Anderson
1652f0f39a vts_fs_test: Require EROFS sysfs nodes.
These were backported to android13-5.10 and should be present in
T-launch kernels.

Bug: 233926292
Test: vts_fs_test
Change-Id: Ifb5ff6a200b081fe8696d5803d4a128740eb8e21
2022-05-26 21:48:59 -07:00
David Anderson
5bbdc23837 Relax filesystem requirements in vts_fs_test.
Bug: 233926292
Test: vts_fs_test
Change-Id: I9665acebd6ebfde14e0cd76e8044e7ced9ffbeb3
2022-05-25 13:44:33 -07:00