Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve test_insufficient_memory_for_cas_module #1541

Open
Deixx opened this issue Sep 30, 2024 · 0 comments
Open

Improve test_insufficient_memory_for_cas_module #1541

Deixx opened this issue Sep 30, 2024 · 0 comments
Labels
enhancement New feature or request tests

Comments

@Deixx
Copy link
Contributor

Deixx commented Sep 30, 2024

Description

Test for insufficient memory could use ulimit as the tool for achieving low memory available when loading module.
Examples:

# modprobe -r cas_cache
# ulimit -v 20000 -m 20000
# modprobe cas_cache
modprobe: error while loading shared libraries: libdl.so.2: failed to map segment from shared object
# ulimit -v 30000 -m 30000
# modprobe cas_cache
modprobe: ERROR: could not insert 'cas_cache': Cannot allocate memory
# ulimit -v 60000 -m 60000
# modprobe cas_cache
modprobe: ERROR: could not insert 'cas_cache': Cannot allocate memory
# ulimit -v 70000 -m 70000
# modprobe cas_cache
# echo $?
0

TODO: figure out what values should be used. The values in the examples above don't match values calculated currently by the test.

Reason

Test for insufficient memory is currently unreliable. In the latest runs allocating memory couldn't bring system memory down to required level without crashing the system. System available_memory run out before required level of free_memory could be reached.

@Deixx Deixx added enhancement New feature or request tests labels Sep 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request tests
Projects
None yet
Development

No branches or pull requests

1 participant