feat(profile): add lsns.

This commit is contained in:
Alexandre Pujol 2025-07-20 15:04:37 +02:00
parent e85f23fdaa
commit 6f90ac5070
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
2 changed files with 73 additions and 0 deletions

View file

@ -0,0 +1,31 @@
#!/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 "lsns: List all namespaces" {
lsns
sudo lsns
}
@test "lsns: List namespaces in JSON format" {
sudo lsns --json
}
@test "lsns: List namespaces associated with the specified process" {
sudo lsns --task 1
}
@test "lsns: List the specified type of namespaces only" {
sudo lsns --type mnt
sudo lsns --type net
sudo lsns --type ipc
sudo lsns --type user
sudo lsns --type pid
sudo lsns --type uts
sudo lsns --type cgroup
sudo lsns --type time
}