public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Edward Liaw via ltp <ltp@lists.linux.it>
To: ltp@lists.linux.it
Cc: kernel-team@android.com
Subject: [LTP] [PATCH] madvise11: Replace /etc/mtab with /proc/mounts
Date: Thu,  2 Nov 2023 23:00:54 +0000	[thread overview]
Message-ID: <20231102230054.3195864-2-edliaw@google.com> (raw)
In-Reply-To: <20231102230054.3195864-1-edliaw@google.com>

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(-)

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) {
-- 
2.42.0.869.gea05f2083d-goog


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2023-11-02 23:01 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-02 23:00 [LTP] [PATCH] madvise11: Allow test to skip if MADV_SOFT_OFFLINE is not supported Edward Liaw via ltp
2023-11-02 23:00 ` Edward Liaw via ltp [this message]
2023-11-03  8:29   ` [LTP] [PATCH] madvise11: Replace /etc/mtab with /proc/mounts Petr Vorel
2023-11-03  8:38     ` Petr Vorel
2023-11-03 10:47 ` [LTP] [PATCH] madvise11: Allow test to skip if MADV_SOFT_OFFLINE is not supported Cyril Hrubis
2023-11-03 15:54   ` Edward Liaw via ltp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231102230054.3195864-2-edliaw@google.com \
    --to=ltp@lists.linux.it \
    --cc=edliaw@google.com \
    --cc=kernel-team@android.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox