mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 05:37:54 +00:00
test/libc_vfs: interpret EPERM to indicate missing symlink support
Ref #2462
This commit is contained in:
parent
cfa1bec00d
commit
6401d52e61
@ -238,11 +238,6 @@ class Plugin : public Libc::Plugin
|
||||
|
||||
bool supports_symlink(const char *, const char *) override
|
||||
{
|
||||
/*
|
||||
* Even though FATFS does not support symlinks, we still want
|
||||
* to capture calls of 'symlink' to return ENOSYS, which is
|
||||
* checked in the file-system test.
|
||||
*/
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -795,7 +790,7 @@ class Plugin : public Libc::Plugin
|
||||
|
||||
int symlink(const char *, const char *) override
|
||||
{
|
||||
errno = ENOSYS;
|
||||
errno = EPERM;
|
||||
return -1;
|
||||
}
|
||||
};
|
||||
|
@ -272,7 +272,7 @@ static void test(Genode::Xml_node node)
|
||||
CALL_AND_CHECK(ret, stat(dir_name2, &stat_buf), (ret == -1), "dir_name=%s", dir_name2);
|
||||
|
||||
/* test symbolic links */
|
||||
if ((symlink("/", "symlinks_supported") == 0) || (errno != ENOSYS)) {
|
||||
if ((symlink("/", "symlinks_supported") == 0) || (errno != EPERM)) {
|
||||
CALL_AND_CHECK(ret, mkdir("a", 0777), ((ret == 0) || (errno == EEXIST)), "dir_name=%s", "a");
|
||||
CALL_AND_CHECK(ret, mkdir("c", 0777), ((ret == 0) || (errno == EEXIST)), "dir_name=%s", "c");
|
||||
CALL_AND_CHECK(ret, symlink("../a", "c/d"),
|
||||
|
Loading…
Reference in New Issue
Block a user