Skip to content

Skip test for sdsRemoveFreeSpace when mem_allocator is not jemalloc#11878

Merged
oranagra merged 5 commits into
redis:unstablefrom
sundb:skip_trim_test
Mar 7, 2023
Merged

Skip test for sdsRemoveFreeSpace when mem_allocator is not jemalloc#11878
oranagra merged 5 commits into
redis:unstablefrom
sundb:skip_trim_test

Conversation

@sundb

@sundb sundb commented Mar 3, 2023

Copy link
Copy Markdown
Collaborator

Test trim on SET with big value (introduced from #11817) fails under mac m1 with libc mem_allocator.
The reason is that malloc(33000) will allocate 65536 bytes(>42000).
This test still passes under ubuntu with libc mem_allocator.

*** [err]: trim on SET with big value in tests/unit/type/string.tcl
Expected [r memory usage key] < 42000 (context: type source line 471 file /Users/iospack/data/redis_fork/tests/unit/type/string.tcl cmd {assert {[r memory usage key] < 42000}} proc ::test)

simple test under mac m1 with libc mem_allocator:

void *p = zmalloc(33000);
printf("malloc size: %zu\n", zmalloc_size(p));

# output
malloc size: 65536

@alanwilhelm

alanwilhelm commented Mar 3, 2023

Copy link
Copy Markdown

works on new m2 max 👍

@oranagra oranagra left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused.
This fix isn't for the same test that was mentioned to fail in #11817 (comment)

Comment thread tests/unit/type/string.tcl Outdated
Comment thread tests/unit/moduleapi/misc.tcl Outdated
Comment thread tests/unit/type/string.tcl Outdated
Comment thread tests/modules/basics.c Outdated
sundb and others added 3 commits March 6, 2023 20:40
Co-authored-by: Oran Agra <oran@redislabs.com>
Co-authored-by: Oran Agra <oran@redislabs.com>
@madolson

madolson commented Jul 22, 2023

Copy link
Copy Markdown
Contributor

When possible we should backport this to 7.0 and 6.2, since it looks like test fails in our release versions. Related, #12431.

enjoy-binbin pushed a commit to enjoy-binbin/redis that referenced this pull request Jul 31, 2023
…edis#11878)

Test `trim on SET with big value` (introduced from redis#11817) fails under mac m1 with libc mem_allocator.
The reason is that malloc(33000) will allocate 65536 bytes(>42000).
This test still passes under ubuntu with libc mem_allocator.

```
*** [err]: trim on SET with big value in tests/unit/type/string.tcl
Expected [r memory usage key] < 42000 (context: type source line 471 file /Users/iospack/data/redis_fork/tests/unit/type/string.tcl cmd {assert {[r memory usage key] < 42000}} proc ::test)
```

simple test under mac m1 with libc mem_allocator:
```c
void *p = zmalloc(33000);
printf("malloc size: %zu\n", zmalloc_size(p));

# output
malloc size: 65536
```
oranagra pushed a commit that referenced this pull request Sep 6, 2023
…11878)

Test `trim on SET with big value` (introduced from #11817) fails under mac m1 with libc mem_allocator.
The reason is that malloc(33000) will allocate 65536 bytes(>42000).
This test still passes under ubuntu with libc mem_allocator.

```
*** [err]: trim on SET with big value in tests/unit/type/string.tcl
Expected [r memory usage key] < 42000 (context: type source line 471 file /Users/iospack/data/redis_fork/tests/unit/type/string.tcl cmd {assert {[r memory usage key] < 42000}} proc ::test)
```

simple test under mac m1 with libc mem_allocator:
```c
void *p = zmalloc(33000);
printf("malloc size: %zu\n", zmalloc_size(p));

# output
malloc size: 65536
```

(cherry picked from commit 3fba3cc)
oranagra pushed a commit that referenced this pull request Oct 18, 2023
…11878)

Test `trim on SET with big value` (introduced from #11817) fails under mac m1 with libc mem_allocator.
The reason is that malloc(33000) will allocate 65536 bytes(>42000).
This test still passes under ubuntu with libc mem_allocator.

```
*** [err]: trim on SET with big value in tests/unit/type/string.tcl
Expected [r memory usage key] < 42000 (context: type source line 471 file /Users/iospack/data/redis_fork/tests/unit/type/string.tcl cmd {assert {[r memory usage key] < 42000}} proc ::test)
```

simple test under mac m1 with libc mem_allocator:
```c
void *p = zmalloc(33000);
printf("malloc size: %zu\n", zmalloc_size(p));

# output
malloc size: 65536
```

(cherry picked from commit 3fba3cc)
(cherry picked from commit 646069a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants