<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jul 25, 2022 at 3:12 PM Rob Landley <<a href="mailto:rob@landley.net">rob@landley.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 7/25/22 11:48, enh wrote:<br>
> > Is there a portable way to determine filesystem type, though? df .<br>
> doesn't say,<br>
> > I have to look in /proc/mounts and I doubt mac has that?<br>
> ><br>
> > $ grep -w "^$(df . | tail -n 1 | toybox cut -DF 1)" /proc/mounts | toybox<br>
> > cut -DF 3<br>
> ><br>
> > (I THINK that if the device has a space in it df will output the escaped<br>
> > version, which should match for grep... But again: Linux.)<br>
> ><br>
> > on the mac it looks like mount is your best bet:<br>
> ><br>
> > ~$ mount<br>
> > /dev/disk3s1s1 on / (apfs, sealed, local, read-only, journaled)<br>
> > ...<br>
> ><br>
> > but maybe just "it's a mac, it's probably using apple's default fs" is<br>
> sufficient?<br>
> <br>
> Hmmm...<br>
> <br>
> sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)<br>
> <br>
> Word 4 vs word 5. I guess I could check for "type" and advance, else strip off<br>
> the starting "("... Of course now that I've sat down to implement an<br>
> is_filesystem shell function, I'm trying to figure out what the right question<br>
> to ask here, and checking for a single filesystem type is basically is_mkroot,<br>
> while a whitelist of known filesystem types is bound to accordion out<br>
> unpleasantly while STILL breaking for people...<br>
> <br>
> Blah. This is a design issue. What behavior do we WANT here?<br>
> <br>
> Query: what filesystem A) are you running this under on the android test system,<br>
> B) is available as "scratch space" to an application on an android phone?<br>
> <br>
> depends on the device. there are some restrictions (and actually the writeable<br>
> space might be (a) more restricted and (b) less likely something that the OEMs<br>
> change) but since the toybox tests aren't (yet) in CTS, "works on Google's CI"<br>
> is good enough for now. we can worry about "how do these tests work on every<br>
> device configuration that it's possible to ship?" if/when that's an actual problem.<br>
<br>
What are CTS and CI?<br></blockquote><div><br></div><div><a href="https://source.android.com/compatibility/cts">https://source.android.com/compatibility/cts</a><br></div><div><br></div><div><a href="https://en.wikipedia.org/wiki/Continuous_integration">https://en.wikipedia.org/wiki/Continuous_integration</a><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
I am actively working on making it an actual problem. (Yeah yeah, horrible goos<br>
causing problems on purpose.)<br></blockquote><div><br></div><div>_you_ can't add the toybox tests to CTS, and i'm not sure i'm foolhardy enough to do that myself :-)</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Rob<br>
</blockquote></div></div>