Skip to content

Commit 9068d87

Browse files
committed
Some formatting fixes
1 parent ae7bb24 commit 9068d87

File tree

2 files changed

+30
-31
lines changed

2 files changed

+30
-31
lines changed

test/fs/test_fs_readdir_ino_matches_stat_ino.c

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -34,35 +34,35 @@ void setup() {
3434
}
3535

3636
int main() {
37-
setup();
38-
int res = open("b", O_CREAT, 0777);
39-
assert(res >= 0);
40-
assert(close(res) == 0);
41-
assert(symlink("b", "a") == 0);
42-
int dirfd = open(".", O_RDONLY);
43-
assert(dirfd > 0);
44-
DIR *dirp;
45-
dirp = fdopendir(dirfd);
46-
assert(dirp != NULL);
47-
struct dirent *ep;
48-
int a_ino = -1;
49-
int b_ino = -1;
50-
while ((ep = readdir(dirp))) {
51-
if (strcmp(ep->d_name, "a") == 0) {
52-
a_ino = ep->d_ino;
53-
}
54-
if (strcmp(ep->d_name, "b") == 0) {
55-
b_ino = ep->d_ino;
56-
}
37+
setup();
38+
int res = open("b", O_CREAT, 0777);
39+
assert(res >= 0);
40+
assert(close(res) == 0);
41+
assert(symlink("b", "a") == 0);
42+
int dirfd = open(".", O_RDONLY);
43+
assert(dirfd > 0);
44+
DIR *dirp;
45+
dirp = fdopendir(dirfd);
46+
assert(dirp != NULL);
47+
struct dirent *ep;
48+
int a_ino = -1;
49+
int b_ino = -1;
50+
while ((ep = readdir(dirp))) {
51+
if (strcmp(ep->d_name, "a") == 0) {
52+
a_ino = ep->d_ino;
5753
}
58-
assert(a_ino >= 0);
59-
assert(b_ino >= 0);
60-
struct stat sta, stb;
61-
assert(lstat("a", &sta) == 0);
62-
assert(lstat("b", &stb) == 0);
63-
printf("readdir a_ino: %d, b_ino: %d\n", a_ino, b_ino);
64-
printf("stat a_ino: %llu, b_ino: %llu\n", sta.st_ino, stb.st_ino);
65-
assert(a_ino == sta.st_ino);
66-
assert(b_ino == stb.st_ino);
67-
printf("success\n");
54+
if (strcmp(ep->d_name, "b") == 0) {
55+
b_ino = ep->d_ino;
56+
}
57+
}
58+
assert(a_ino >= 0);
59+
assert(b_ino >= 0);
60+
struct stat sta, stb;
61+
assert(lstat("a", &sta) == 0);
62+
assert(lstat("b", &stb) == 0);
63+
printf("readdir a_ino: %d, b_ino: %d\n", a_ino, b_ino);
64+
printf("stat a_ino: %llu, b_ino: %llu\n", sta.st_ino, stb.st_ino);
65+
assert(a_ino == sta.st_ino);
66+
assert(b_ino == stb.st_ino);
67+
printf("success\n");
6868
}

test/test_core.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5910,7 +5910,6 @@ def test_fs_readdir_ino_matches_stat_ino(self, args):
59105910
self.set_setting('FORCE_FILESYSTEM')
59115911
self.do_runf('fs/test_fs_readdir_ino_matches_stat_ino.c', 'success', emcc_args=args)
59125912

5913-
59145913
def test_sigalrm(self):
59155914
self.do_runf('test_sigalrm.c', 'Received alarm!')
59165915
self.set_setting('EXIT_RUNTIME')

0 commit comments

Comments
 (0)