Add read-only option to guestfs mount.
Without this, fails sporadically (consistently today) with:-
libguestfs: error: mount_options: /dev/sda on / (options: ''):
mount: /sysroot: wrong fs type, bad option, bad superblock
on /dev/sda, missing codepage or helper program, or other error.
guestmount: '/dev/sda' could not be mounted.
guestmount: Did you mean to mount one of these filesystems?
guestmount: /dev/sda (ext4)
Running the same guestmount command with --trace shows:-
libguestfs: trace: mount_options "" "/dev/sda" "/"
libguestfs: trace: mount_options = -1 (error)
Adding this makes it go away and seems otherwise harmless :)
Test: runtests.sh
Bug: 119090773
Bug: 113373927
Change-Id: Ic0107405d5c2766fb46de20bfbc523c14950e0b7
diff --git a/build/apex/runtests.sh b/build/apex/runtests.sh
index 4c0e772..58bbdae 100755
--- a/build/apex/runtests.sh
+++ b/build/apex/runtests.sh
@@ -259,7 +259,7 @@
echo "$partition" | cmp "$image_filesystems" -
# Mount the image from the Android Runtime APEX.
- guestmount -a "$image_file" -m "$partition" "$mount_point"
+ guestmount -a "$image_file" -m "$partition" --ro "$mount_point"
}
# Testing release APEX package (com.android.runtime.release).