Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  netns-sysctl.sh   Sprache: Shell

 
#!/bin/bash -e
# SPDX-License-Identifier: GPL-2.0
#
# This test checks that the network buffer sysctls are present
# in a network namespaces, and that they are readonly.

source lib.sh

cleanup() {
    cleanup_ns $test_ns
}

trap cleanup EXIT

fail() {
 echo "ERROR: $*" >&2
 exit 1
}

setup_ns test_ns

for sc in {r,w}mem_{default,max}; do
 # check that this is writable in a netns
 [ -w "/proc/sys/net/core/$sc" ] ||
  fail "$sc isn't writable in the init netns!"

 # change the value in the host netns
 sysctl -qw "net.core.$sc=300000" ||
  fail "Can't write $sc in init netns!"

 # check that the value is read from the init netns
 [ "$(ip netns exec $test_ns sysctl -n "net.core.$sc")" -eq 300000 ] ||
  fail "Value for $sc mismatch!"

 # check that this isn't writable in a netns
 ip netns exec $test_ns [ -w "/proc/sys/net/core/$sc" ] &&
  fail "$sc is writable in a netns!"
done

echo 'Test passed OK'

Messung V0.5
C=78 H=60 G=69

¤ Dauer der Verarbeitung: 0.16 Sekunden  (vorverarbeitet)  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge