mirror of
https://github.com/roddhjav/apparmor.d.git
synced 2024-12-25 06:27:49 +01:00
test(integration): add sysctl.
This commit is contained in:
parent
8d4d17fa34
commit
5237ab3989
1 changed files with 27 additions and 0 deletions
27
tests/bats/sysctl.bats
Normal file
27
tests/bats/sysctl.bats
Normal file
|
@ -0,0 +1,27 @@
|
|||
#!/usr/bin/env bats
|
||||
# apparmor.d - Full set of apparmor profiles
|
||||
# Copyright (C) 2024 Alexandre Pujol <alexandre@pujol.io>
|
||||
# SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
load common
|
||||
|
||||
@test "sysctl: Show all available variables and their values" {
|
||||
sysctl -a
|
||||
}
|
||||
|
||||
@test "sysctl: Set a changeable kernel state variable" {
|
||||
sudo sysctl -w vm.panic_on_oom=0
|
||||
}
|
||||
|
||||
@test "sysctl: Get currently open file handlers" {
|
||||
sysctl fs.file-nr
|
||||
}
|
||||
|
||||
@test "sysctl: Get limit for simultaneous open files" {
|
||||
sysctl fs.file-max
|
||||
}
|
||||
|
||||
@test "sysctl: Apply changes from `/etc/sysctl.conf`" {
|
||||
sysctl -p
|
||||
}
|
||||
|
Loading…
Reference in a new issue