Message ID | 20231102230054.3195864-2-edliaw@google.com |
---|---|
State | Accepted |
Headers | show |
Series | madvise11: Replace /etc/mtab with /proc/mounts | expand |
Hi Edward, > Android does not have the /etc/mtab symlink, so trying to open it fails > with TBROK. Replace it with /proc/mounts. Thanks! Reviewed-by: Petr Vorel <pvorel@suse.cz> BTW there are other tests which mention /etc/mtab, but only as tst_resm(TINFO, ) message. Kind regards, Petr
Hi Edward, merged, thanks! Kind regards, Petr
diff --git a/testcases/kernel/syscalls/madvise/madvise11.c b/testcases/kernel/syscalls/madvise/madvise11.c index 0793319d2..55556f530 100644 --- a/testcases/kernel/syscalls/madvise/madvise11.c +++ b/testcases/kernel/syscalls/madvise/madvise11.c @@ -308,9 +308,9 @@ static int open_unpoison_pfn(void) SAFE_CMD(cmd_modprobe, NULL, NULL); /* debugfs mount point */ - mntf = setmntent("/etc/mtab", "r"); + mntf = setmntent("/proc/mounts", "r"); if (!mntf) { - tst_brk(TBROK | TERRNO, "Can't open /etc/mtab"); + tst_brk(TBROK | TERRNO, "Can't open /proc/mounts"); return -1; } while ((mnt = getmntent(mntf)) != NULL) {
Android does not have the /etc/mtab symlink, so trying to open it fails with TBROK. Replace it with /proc/mounts. Signed-off-by: Edward Liaw <edliaw@google.com> --- testcases/kernel/syscalls/madvise/madvise11.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)