]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[#1077] comment SysrepoSetup::cleanSharedMemory
authorAndrei Pavel <andrei@isc.org>
Thu, 22 Jul 2021 17:35:21 +0000 (20:35 +0300)
committerTomek Mrugalski <tomek@isc.org>
Fri, 23 Jul 2021 10:45:36 +0000 (10:45 +0000)
src/bin/netconf/netconf_config.h
src/lib/yang/tests/sysrepo_setup.h

index d9b6eb24b69339e11db5933dd1c4988fedb744fb..bf71003379e53e53803f13c265bd1a6a0bbd586c 100644 (file)
@@ -207,9 +207,9 @@ public:
         subscribe_changes_ = subscribe_changes;
     }
 
-    /// @brief Set the subscribe-changes flag.
+    /// @brief Set the subscribe-notifications flag.
     ///
-    /// @param subscribe_changes The subscribe-changes flag.
+    /// @param subscribe_notifications the subscribe-notifications flag
     void setSubscribeNotifications(bool subscribe_notifications) {
         subscribe_notifications_ = subscribe_notifications;
     }
index 8b62084d015ba9c0641aaaf4a47ce6f1bbf81044..1d40a77db175aa8dcee701fbc78a587760ca8583 100644 (file)
@@ -19,7 +19,15 @@ namespace isc {
 namespace yang {
 namespace test {
 
+/// @brief Wrapper for sysrepo setup actions
 struct SysrepoSetup {
+    /// @brief Cleans shared memory.
+    ///
+    /// If a unit test crashes (mostly when migrating to a new version), it
+    /// leaves behind corrupted shared memory. Let's make sure we can run all
+    /// the following unit tests free of any side effect from said crash. This
+    /// is the equivalent of running "make shm_clean" in sysrepo:
+    /// https://github.com/sysrepo/sysrepo/blob/v1.4.140/CMakeLists.txt#L329-L334
     static void cleanSharedMemory() {
         system("rm -rf /dev/shm/sr_*");
         system("rm -rf /dev/shm/srsub_*");