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

Add new version sle15-sp6 to test #10

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
71 changes: 71 additions & 0 deletions tests/sles-15-SP6/limits.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Author: Richard Fan
##########################################
*** Settings ***
Library Process
Library OperatingSystem
Library ../../lib/LinuxLab_HRT_Lib.py

*** Test Cases ***
Limit_core_file_size
Bash Builtin ulimit -c unlimited

Limit_data_seg_size
Bash Builtin ulimit -d unlimited

Limit_scheduling_priority
Bash Builtin Int ulimit -e 0

Limit_file_size
Bash Builtin ulimit -f unlimited

Limit_pending_signals
[Documentation] Depends of the RAM resources
Bash Builtin Int ulimit -i 7000:8000

Limit_max_locked_memory
Bash Builtin Int ulimit -l 8192

Limit_max_memory_size
Bash Builtin ulimit -m unlimited

Limit_open_files
Bash Builtin Int ulimit -n 1024

Limit_pipe_size
Bash Builtin Int ulimit -p 8

Limit_POSIX_message_queues
Bash Builtin Int ulimit -q 819200

Limit_real-time_priority
Bash Builtin Int ulimit -r 0

Limit_stack_size
Bash Builtin Int ulimit -s 8192

Limit_cpu_time
Bash Builtin ulimit -t unlimited

Limit_max_user_processes
[Tags] FIXED
[Documentation] Depends of the RAM resources
Bash Builtin Int ulimit -u 7000:8000

Limit_virtual_memory
Bash Builtin ulimit -v unlimited

Limit_file_locks
Bash Builtin ulimit -x unlimited

75 changes: 75 additions & 0 deletions tests/sles-15-SP6/stduser_limits.robot
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# Author: Richard Fan
##########################################
*** Settings ***
Library Process
Library OperatingSystem
Library ../../lib/LinuxLab_HRT_Lib.py
Documentation Create a unprivileged standard user and check his limits

*** Test Cases ***
User_add_stduser
${result} = Run Process /usr/sbin/useradd stduser
Should Be Equal As Integers ${result.rc} 0

Limit_core_file_size
User Bash Builtin stduser ulimit -c unlimited

Limit_data_seg_size
User Bash Builtin stduser ulimit -d unlimited

Limit_scheduling_priority
User Bash Builtin Int stduser ulimit -e 0

Limit_file_size
User Bash Builtin stduser ulimit -f unlimited

Limit_pending_signals
[Documentation] Depends of the RAM resources
Bash Builtin Int ulimit -i 7000:8000

Limit_max_locked_memory
User Bash Builtin Int stduser ulimit -l 8192

Limit_max_memory_size
User Bash Builtin stduser ulimit -m unlimited

Limit_open_files
User Bash Builtin Int stduser ulimit -n 1024

Limit_pipe_size
User Bash Builtin Int stduser ulimit -p 8

Limit_POSIX_message_queues
User Bash Builtin Int stduser ulimit -q 819200

Limit_real-time_priority
User Bash Builtin Int stduser ulimit -r 0

Limit_stack_size
User Bash Builtin Int stduser ulimit -s 8192

Limit_cpu_time
User Bash Builtin stduser ulimit -t unlimited

Limit_max_user_processes
[Tags] FIXED
[Documentation] Depends of the RAM resources
Bash Builtin Int ulimit -u 7000:8000

Limit_virtual_memory
User Bash Builtin stduser ulimit -v unlimited

Limit_file_locks
User Bash Builtin stduser ulimit -x unlimited