Skip to content

Commit 4f8fcd1

Browse files
committed
Add more entries into fake mtab
1 parent 673f338 commit 4f8fcd1

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

tests/API/probes/fake_mtab

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
/dev/mapper/fedora-root / ext4 rw,seclabel,relatime 0 0
2+
tmpfs /tmp tmpfs rw,seclabel,nosuid,nodev 0 0
23
/etc/mount.map /nfs/test autofs rw,relatime,fd=17,pgrp=11111,timeout=5,minproto=5,maxproto=5,direct,pipe_ino=1246883 0 0
34
192.168.122.231:/test /nfs/test nfs4 rw,relatime,vers=4.2,rsize=262144,wsize=262144,namlen=255,hard,proto=tcp,timeo=600,retrans=2,sec=sys,clientaddr=192.168.122.1,local_lock=none,addr=192.168.122.231 0 0
5+
/dev/mapper/fedora-home /home ext4 rw,seclabel,relatime 0 0
6+
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
7+
//192.168.0.5/storage /media/movies cifs guest,uid=myuser,iocharset=utf8,file_mode=0777,dir_mode=0777,noperm 0 0

tests/API/probes/test_fsdev_is_local_fs.c

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,10 @@ static int test_single_call()
4040

4141
static int test_multiple_calls()
4242
{
43-
/* fake mtab contains only 1 local filesystem */
43+
/*
44+
* fake mtab contains only 4 local filesystems:
45+
* /, /tmp, /home and /proc
46+
*/
4447
FILE *f = setmntent(DATADIR "fake_mtab", "r");
4548
if (f == NULL) {
4649
fprintf(stderr, "fake_mtab could not be open\n");
@@ -54,7 +57,7 @@ static int test_multiple_calls()
5457
}
5558
}
5659
endmntent(f);
57-
return (locals == 1);
60+
return (locals == 4);
5861
}
5962

6063
int main(int argc, char *argv[])

0 commit comments

Comments
 (0)