From ca35e8070ed27f54a17f7063675816d5bd328770 Mon Sep 17 00:00:00 2001 From: Korel Date: Sat, 14 Jun 2025 22:56:43 -0700 Subject: [PATCH 1/7] Update trusted_interfaces Naming Update the trusted interfaces naming to match c style convention Signed-off-by: Korel --- Makefile | 2 +- main.c | 2 +- trustedInterfaces.c => trusted_interfaces.c | 2 +- trustedInterfaces.h => trusted_interfaces.h | 0 4 files changed, 3 insertions(+), 3 deletions(-) rename trustedInterfaces.c => trusted_interfaces.c (99%) rename trustedInterfaces.h => trusted_interfaces.h (100%) diff --git a/Makefile b/Makefile index 5e27ea1..9990630 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,7 @@ KERNELRELEASE := $(shell uname -r) KDIR := /lib/modules/${KERNELRELEASE}/build MDIR := /lib/modules/${KERNELRELEASE} obj-m := ${MODULE}.o -${MODULE}-objs := main.o dhcp.o trustedInterfaces.o rate_limit.o vlan.o +${MODULE}-objs := main.o dhcp.o trusted_interfaces.o rate_limit.o vlan.o all: @echo "Building the module..." diff --git a/main.c b/main.c index ab9aa2e..ab0ff54 100644 --- a/main.c +++ b/main.c @@ -1,6 +1,6 @@ #include "dhcp.h" -#include "trustedInterfaces.h" +#include "trusted_interfaces.h" #include "rate_limit.h" #include "vlan.h" #include "errno.h" diff --git a/trustedInterfaces.c b/trusted_interfaces.c similarity index 99% rename from trustedInterfaces.c rename to trusted_interfaces.c index e3410c0..190e221 100644 --- a/trustedInterfaces.c +++ b/trusted_interfaces.c @@ -1,4 +1,4 @@ -#include "trustedInterfaces.h" +#include "trusted_interfaces.h" #include "errno.h" LIST_HEAD(trusted_interface_list); // Global list head for interfaces diff --git a/trustedInterfaces.h b/trusted_interfaces.h similarity index 100% rename from trustedInterfaces.h rename to trusted_interfaces.h From 4c504cb3d57e95cb6baa043deb0d13dfa800b520 Mon Sep 17 00:00:00 2001 From: Korel Date: Sat, 14 Jun 2025 23:12:26 -0700 Subject: [PATCH 2/7] Fix: Module Initialization Test Case Naming Module Initialization test case naming was changed to confirm to C standards Signed-off-by: Korel --- .github/workflows/dai-testing.yml | 16 ++++++++-------- .../test_build_kernel_module.sh} | 0 .../test_insert_kernel_module.sh} | 0 3 files changed, 8 insertions(+), 8 deletions(-) rename tests/{InitializationOfTheModule/Test_Build_Kernel_Module.sh => module_init/test_build_kernel_module.sh} (100%) rename tests/{InitializationOfTheModule/Test_Insert_Kernel_Module.sh => module_init/test_insert_kernel_module.sh} (100%) diff --git a/.github/workflows/dai-testing.yml b/.github/workflows/dai-testing.yml index f7c1467..aada6a4 100644 --- a/.github/workflows/dai-testing.yml +++ b/.github/workflows/dai-testing.yml @@ -19,20 +19,20 @@ jobs: - name: Make test script executable run: | chmod +x ./tests/testenv/*.sh - chmod +x ./tests/InitializationOfTheModule/*.sh + chmod +x ./tests/module_init/*.sh chmod +x ./tests/SettingDynamicParameters/*.sh chmod +x ./tests/UsingDynamicParameters/*.sh chmod +x ./tests/CoreDAIFeatures/*.sh chmod +x ./tests/EdgeCases/*.sh - # Run Initialization_Of_The_Module Tests - - name: Run Test_Build_Kernel_Module - working-directory: ./tests/InitializationOfTheModule/ - run: ./Test_Build_Kernel_Module.sh + # Run initialization_of_the_module Tests + - name: Run test_build_kernel_module + working-directory: ./tests/module_init/ + run: ./test_build_kernel_module.sh - - name: Run Test_Insert_Kernel_Module - working-directory: ./tests/InitializationOfTheModule/ - run: ./Test_Insert_Kernel_Module.sh + - name: Run test_insert_kernel_module + working-directory: ./tests/module_init/ + run: ./test_insert_kernel_module.sh # Run Setting_Dynamic_Parameters Tests - name: Run Test_add_Trusted_Interface diff --git a/tests/InitializationOfTheModule/Test_Build_Kernel_Module.sh b/tests/module_init/test_build_kernel_module.sh similarity index 100% rename from tests/InitializationOfTheModule/Test_Build_Kernel_Module.sh rename to tests/module_init/test_build_kernel_module.sh diff --git a/tests/InitializationOfTheModule/Test_Insert_Kernel_Module.sh b/tests/module_init/test_insert_kernel_module.sh similarity index 100% rename from tests/InitializationOfTheModule/Test_Insert_Kernel_Module.sh rename to tests/module_init/test_insert_kernel_module.sh From cd61ff0ed8736db2dad4a85f59934545cef1c92c Mon Sep 17 00:00:00 2001 From: Korel Date: Sat, 14 Jun 2025 23:43:50 -0700 Subject: [PATCH 3/7] Fix: Setting Dynamic Parameters Test Case Naming Setting Dynamic Parameters test case naming was changed to confirm to C standards Signed-off-by: Korel --- .github/workflows/dai-testing.yml | 68 +++++++++---------- .../test_add_trusted_interface.sh} | 0 .../test_add_trusted_interfaces.sh} | 2 +- .../test_add_trusted_interfaces_malformed.sh} | 2 +- .../test_add_vlan.sh} | 2 +- .../test_add_vlans.sh} | 2 +- .../test_add_vlans_malformed.sh} | 2 +- .../test_set_globally_enabled_dai.sh} | 4 +- ...est_set_globally_enabled_dai_malformed.sh} | 2 +- .../test_set_static_acl_enabled.sh} | 6 +- .../test_set_static_acl_enabled_malformed.sh} | 2 +- 11 files changed, 45 insertions(+), 47 deletions(-) rename tests/{SettingDynamicParameters/Test_add_Trusted_Interface.sh => set_params/test_add_trusted_interface.sh} (100%) rename tests/{SettingDynamicParameters/Test_add_Trusted_Interfaces.sh => set_params/test_add_trusted_interfaces.sh} (98%) rename tests/{SettingDynamicParameters/Test_add_Trusted_Interfaces_Malformed.sh => set_params/test_add_trusted_interfaces_malformed.sh} (99%) rename tests/{SettingDynamicParameters/Test_add_VLAN.sh => set_params/test_add_vlan.sh} (95%) rename tests/{SettingDynamicParameters/Test_add_VLANs.sh => set_params/test_add_vlans.sh} (95%) rename tests/{SettingDynamicParameters/Test_add_VLANs_Malformed.sh => set_params/test_add_vlans_malformed.sh} (96%) rename tests/{SettingDynamicParameters/Test_set_globally_enabled_DAI.sh => set_params/test_set_globally_enabled_dai.sh} (94%) rename tests/{SettingDynamicParameters/Test_set_static_ACL_Enabled_Malformed.sh => set_params/test_set_globally_enabled_dai_malformed.sh} (96%) rename tests/{SettingDynamicParameters/Test_set_static_ACL_Enabled.sh => set_params/test_set_static_acl_enabled.sh} (92%) rename tests/{SettingDynamicParameters/Test_set_globally_enabled_DAI_Malformed.sh => set_params/test_set_static_acl_enabled_malformed.sh} (96%) diff --git a/.github/workflows/dai-testing.yml b/.github/workflows/dai-testing.yml index aada6a4..f7f39c9 100644 --- a/.github/workflows/dai-testing.yml +++ b/.github/workflows/dai-testing.yml @@ -20,12 +20,12 @@ jobs: run: | chmod +x ./tests/testenv/*.sh chmod +x ./tests/module_init/*.sh - chmod +x ./tests/SettingDynamicParameters/*.sh + chmod +x ./tests/set_params/*.sh chmod +x ./tests/UsingDynamicParameters/*.sh chmod +x ./tests/CoreDAIFeatures/*.sh chmod +x ./tests/EdgeCases/*.sh - # Run initialization_of_the_module Tests + # Run module_init Tests - name: Run test_build_kernel_module working-directory: ./tests/module_init/ run: ./test_build_kernel_module.sh @@ -34,46 +34,46 @@ jobs: working-directory: ./tests/module_init/ run: ./test_insert_kernel_module.sh - # Run Setting_Dynamic_Parameters Tests - - name: Run Test_add_Trusted_Interface - working-directory: ./tests/SettingDynamicParameters/ - run: ./Test_add_Trusted_Interface.sh + # Run set_params Tests + - name: Run test_add_trusted_interface + working-directory: ./tests/set_params/ + run: ./test_add_trusted_interface.sh - - name: Run Test_add_Trusted_Interfaces_Malformed - working-directory: ./tests/SettingDynamicParameters/ - run: ./Test_add_Trusted_Interfaces_Malformed.sh + - name: Run test_add_trusted_interfaces_malformed + working-directory: ./tests/set_params/ + run: ./test_add_trusted_interfaces_malformed.sh - - name: Run Test_add_Trusted_Interfaces - working-directory: ./tests/SettingDynamicParameters/ - run: ./Test_add_Trusted_Interfaces.sh + - name: Run test_add_trusted_interfaces + working-directory: ./tests/set_params/ + run: ./test_add_trusted_interfaces.sh - - name: Run Test_add_VLAN - working-directory: ./tests/SettingDynamicParameters/ - run: ./Test_add_VLAN.sh + - name: Run test_add_vlan + working-directory: ./tests/set_params/ + run: ./test_add_vlan.sh - - name: Run Test_add_VLANs_Malformed - working-directory: ./tests/SettingDynamicParameters/ - run: ./Test_add_VLANs_Malformed.sh + - name: Run test_add_vlans_malformed + working-directory: ./tests/set_params/ + run: ./test_add_vlans_malformed.sh - - name: Run Test_add_VLANs - working-directory: ./tests/SettingDynamicParameters/ - run: ./Test_add_VLANs.sh + - name: Run test_add_vlans + working-directory: ./tests/set_params/ + run: ./test_add_vlans.sh - - name: Run Test_set_globally_enabled_DAI - working-directory: ./tests/SettingDynamicParameters/ - run: ./Test_set_globally_enabled_DAI.sh + - name: Run test_set_globally_enabled_dai_malformed + working-directory: ./tests/set_params/ + run: ./test_set_globally_enabled_dai_malformed.sh - - name: Run Test_set_globally_enabled_DAI_Malformed - working-directory: ./tests/SettingDynamicParameters/ - run: ./Test_set_globally_enabled_DAI_Malformed.sh + - name: Run test_set_globally_enabled_dai + working-directory: ./tests/set_params/ + run: ./test_set_globally_enabled_dai.sh - - name: Run Test_set_static_ACL_Enabled - working-directory: ./tests/SettingDynamicParameters/ - run: ./Test_set_static_ACL_Enabled.sh + - name: Run test_set_static_acl_enabled_malformed + working-directory: ./tests/set_params/ + run: ./test_set_static_acl_enabled_malformed.sh - - name: Run Test_set_static_ACL_Enabled_Malformed - working-directory: ./tests/SettingDynamicParameters/ - run: ./Test_set_static_ACL_Enabled_Malformed.sh + - name: Run test_set_static_acl_enabled + working-directory: ./tests/set_params/ + run: ./test_set_static_acl_enabled.sh # Run Using_Dynamic_Parameters Tests - name: Run Test_DAI_VLAN_Filtering @@ -89,7 +89,6 @@ jobs: run: ./Test_static_ACL_Enabled.sh # Run Core_DAI_Features Tests - - name: Run Test_ARP_Poisoning working-directory: ./tests/CoreDAIFeatures/ run: ./Test_ARP_Poisoning.sh @@ -123,7 +122,6 @@ jobs: run: ./Test_Below_Rate_Limit.sh # Run Edge_Cases Tests - - name: Run Test_Malformed_ARP_Request working-directory: ./tests/EdgeCases/ run: ./Test_Malformed_ARP_Request.sh \ No newline at end of file diff --git a/tests/SettingDynamicParameters/Test_add_Trusted_Interface.sh b/tests/set_params/test_add_trusted_interface.sh similarity index 100% rename from tests/SettingDynamicParameters/Test_add_Trusted_Interface.sh rename to tests/set_params/test_add_trusted_interface.sh diff --git a/tests/SettingDynamicParameters/Test_add_Trusted_Interfaces.sh b/tests/set_params/test_add_trusted_interfaces.sh similarity index 98% rename from tests/SettingDynamicParameters/Test_add_Trusted_Interfaces.sh rename to tests/set_params/test_add_trusted_interfaces.sh index 1226a5e..8e31297 100644 --- a/tests/SettingDynamicParameters/Test_add_Trusted_Interfaces.sh +++ b/tests/set_params/test_add_trusted_interfaces.sh @@ -1,6 +1,6 @@ #!/bin/bash -# This script checks if the kernel module can add more than one Interfaces to the Trusted List +# This script checks if the kernel module can add more than one Interface to the Trusted List set -euo pipefail #treat unset vars as errors diff --git a/tests/SettingDynamicParameters/Test_add_Trusted_Interfaces_Malformed.sh b/tests/set_params/test_add_trusted_interfaces_malformed.sh similarity index 99% rename from tests/SettingDynamicParameters/Test_add_Trusted_Interfaces_Malformed.sh rename to tests/set_params/test_add_trusted_interfaces_malformed.sh index 0412de5..9787a68 100644 --- a/tests/SettingDynamicParameters/Test_add_Trusted_Interfaces_Malformed.sh +++ b/tests/set_params/test_add_trusted_interfaces_malformed.sh @@ -1,6 +1,6 @@ #!/bin/bash -# This script checks if the kernel module can handle malformed Trusted Interface Input +# This script checks if the kernel module can handle malformed Trusted Interface Inputs set -euo pipefail #treat unset vars as errors diff --git a/tests/SettingDynamicParameters/Test_add_VLAN.sh b/tests/set_params/test_add_vlan.sh similarity index 95% rename from tests/SettingDynamicParameters/Test_add_VLAN.sh rename to tests/set_params/test_add_vlan.sh index 9014f08..f6697a3 100644 --- a/tests/SettingDynamicParameters/Test_add_VLAN.sh +++ b/tests/set_params/test_add_vlan.sh @@ -1,6 +1,6 @@ #!/bin/bash -# This script checks if DAI can add one VLAN to the inspection list +# This script checks if the module can add one VLAN to the inspection list set -euo pipefail #treat unset vars as errors diff --git a/tests/SettingDynamicParameters/Test_add_VLANs.sh b/tests/set_params/test_add_vlans.sh similarity index 95% rename from tests/SettingDynamicParameters/Test_add_VLANs.sh rename to tests/set_params/test_add_vlans.sh index b0d0f50..88423a4 100644 --- a/tests/SettingDynamicParameters/Test_add_VLANs.sh +++ b/tests/set_params/test_add_vlans.sh @@ -1,6 +1,6 @@ #!/bin/bash -# This script checks if DAI can add more than one VLANs to the inspection list +# This script checks if DAI can add more than one vlan to the inspection list set -euo pipefail #treat unset vars as errors diff --git a/tests/SettingDynamicParameters/Test_add_VLANs_Malformed.sh b/tests/set_params/test_add_vlans_malformed.sh similarity index 96% rename from tests/SettingDynamicParameters/Test_add_VLANs_Malformed.sh rename to tests/set_params/test_add_vlans_malformed.sh index 3d66522..4773f87 100644 --- a/tests/SettingDynamicParameters/Test_add_VLANs_Malformed.sh +++ b/tests/set_params/test_add_vlans_malformed.sh @@ -1,6 +1,6 @@ #!/bin/bash -# This script checks if the kernel module can handle malformed Trusted Interface Input +# This script checks if the kernel module can handle malformed vlan to the inspection list. set -euo pipefail #treat unset vars as errors diff --git a/tests/SettingDynamicParameters/Test_set_globally_enabled_DAI.sh b/tests/set_params/test_set_globally_enabled_dai.sh similarity index 94% rename from tests/SettingDynamicParameters/Test_set_globally_enabled_DAI.sh rename to tests/set_params/test_set_globally_enabled_dai.sh index 09ac6bd..24256b3 100644 --- a/tests/SettingDynamicParameters/Test_set_globally_enabled_DAI.sh +++ b/tests/set_params/test_set_globally_enabled_dai.sh @@ -1,7 +1,7 @@ #!/bin/bash -# This script checks if DAI can set the globally_enabled_DAI boolean. -# When enabled the kernel module inspects all packets as if they are part of the same VLAN +# This script checks if the module can set the globally_enabled_dai boolean. +# When enabled the kernel module inspects all packets as if they are part of the same vlan. set -euo pipefail #treat unset vars as errors diff --git a/tests/SettingDynamicParameters/Test_set_static_ACL_Enabled_Malformed.sh b/tests/set_params/test_set_globally_enabled_dai_malformed.sh similarity index 96% rename from tests/SettingDynamicParameters/Test_set_static_ACL_Enabled_Malformed.sh rename to tests/set_params/test_set_globally_enabled_dai_malformed.sh index 47026fb..f923e97 100644 --- a/tests/SettingDynamicParameters/Test_set_static_ACL_Enabled_Malformed.sh +++ b/tests/set_params/test_set_globally_enabled_dai_malformed.sh @@ -1,6 +1,6 @@ #!/bin/bash -# This script checks if the kernel module can handle malformed Trusted Interface Input +# This script checks if the kernel module can handle malformed globally_enabled_dai inputs set -euo pipefail #treat unset vars as errors diff --git a/tests/SettingDynamicParameters/Test_set_static_ACL_Enabled.sh b/tests/set_params/test_set_static_acl_enabled.sh similarity index 92% rename from tests/SettingDynamicParameters/Test_set_static_ACL_Enabled.sh rename to tests/set_params/test_set_static_acl_enabled.sh index 6327624..405896e 100644 --- a/tests/SettingDynamicParameters/Test_set_static_ACL_Enabled.sh +++ b/tests/set_params/test_set_static_acl_enabled.sh @@ -1,8 +1,8 @@ #!/bin/bash -# This script checks if DAI can set the static_ACL_Enabled boolean. -# When enabled the DHCP Snooping table is no longer considered and Packets are accepted or dropped based -# on the static arp table +# This script checks if the module can set the static_acl_enabled input parameter. +# When enabled the DHCP Snooping table is no longer considered and packets are accepted or dropped based +# on the static arp table. set -euo pipefail #treat unset vars as errors diff --git a/tests/SettingDynamicParameters/Test_set_globally_enabled_DAI_Malformed.sh b/tests/set_params/test_set_static_acl_enabled_malformed.sh similarity index 96% rename from tests/SettingDynamicParameters/Test_set_globally_enabled_DAI_Malformed.sh rename to tests/set_params/test_set_static_acl_enabled_malformed.sh index 47026fb..e6fc578 100644 --- a/tests/SettingDynamicParameters/Test_set_globally_enabled_DAI_Malformed.sh +++ b/tests/set_params/test_set_static_acl_enabled_malformed.sh @@ -1,6 +1,6 @@ #!/bin/bash -# This script checks if the kernel module can handle malformed Trusted Interface Input +# This script checks if the kernel module can handle malformed static_acl_enabled inputs. set -euo pipefail #treat unset vars as errors From e2f90625580b4dd6305ff4693757c18058dbdd8a Mon Sep 17 00:00:00 2001 From: Korel Date: Sat, 14 Jun 2025 23:45:50 -0700 Subject: [PATCH 4/7] Fix: Using Dynamic Parameters Test Case Naming Using Dynamic Parameters test case naming was changed to confirm to C standards Signed-off-by: Korel --- .github/workflows/dai-testing.yml | 22 +++++++++---------- .../test_dai_vlan_filtering.sh} | 0 .../test_globally_enabled_dai.sh} | 1 - .../test_static_acl_enabled.sh} | 4 ++-- 4 files changed, 13 insertions(+), 14 deletions(-) rename tests/{UsingDynamicParameters/Test_DAI_VLAN_Filtering.sh => param_behavior/test_dai_vlan_filtering.sh} (100%) rename tests/{UsingDynamicParameters/Test_globally_enabled_DAI.sh => param_behavior/test_globally_enabled_dai.sh} (98%) rename tests/{UsingDynamicParameters/Test_static_ACL_Enabled.sh => param_behavior/test_static_acl_enabled.sh} (94%) diff --git a/.github/workflows/dai-testing.yml b/.github/workflows/dai-testing.yml index f7f39c9..f8a9d1c 100644 --- a/.github/workflows/dai-testing.yml +++ b/.github/workflows/dai-testing.yml @@ -21,7 +21,7 @@ jobs: chmod +x ./tests/testenv/*.sh chmod +x ./tests/module_init/*.sh chmod +x ./tests/set_params/*.sh - chmod +x ./tests/UsingDynamicParameters/*.sh + chmod +x ./tests/param_behavior/*.sh chmod +x ./tests/CoreDAIFeatures/*.sh chmod +x ./tests/EdgeCases/*.sh @@ -75,18 +75,18 @@ jobs: working-directory: ./tests/set_params/ run: ./test_set_static_acl_enabled.sh - # Run Using_Dynamic_Parameters Tests - - name: Run Test_DAI_VLAN_Filtering - working-directory: ./tests/UsingDynamicParameters/ - run: ./Test_DAI_VLAN_Filtering.sh + # Run param_behavior Tests + - name: Run test_dai_vlan_filtering + working-directory: ./tests/param_behavior/ + run: ./test_dai_vlan_filtering.sh - - name: Run Test_globally_enabled_DAI - working-directory: ./tests/UsingDynamicParameters/ - run: ./Test_globally_enabled_DAI.sh + - name: Run test_globally_enabled_dai + working-directory: ./tests/param_behavior/ + run: ./test_globally_enabled_dai.sh - - name: Run Test_static_ACL_Enabled - working-directory: ./tests/UsingDynamicParameters/ - run: ./Test_static_ACL_Enabled.sh + - name: Run test_static_acl_enabled + working-directory: ./tests/param_behavior/ + run: ./test_static_acl_enabled.sh # Run Core_DAI_Features Tests - name: Run Test_ARP_Poisoning diff --git a/tests/UsingDynamicParameters/Test_DAI_VLAN_Filtering.sh b/tests/param_behavior/test_dai_vlan_filtering.sh similarity index 100% rename from tests/UsingDynamicParameters/Test_DAI_VLAN_Filtering.sh rename to tests/param_behavior/test_dai_vlan_filtering.sh diff --git a/tests/UsingDynamicParameters/Test_globally_enabled_DAI.sh b/tests/param_behavior/test_globally_enabled_dai.sh similarity index 98% rename from tests/UsingDynamicParameters/Test_globally_enabled_DAI.sh rename to tests/param_behavior/test_globally_enabled_dai.sh index df11d0d..62d188f 100644 --- a/tests/UsingDynamicParameters/Test_globally_enabled_DAI.sh +++ b/tests/param_behavior/test_globally_enabled_dai.sh @@ -1,6 +1,5 @@ #!/bin/bash -# Test_globally_enabled_DAI.sh # This script checks if the kernel module inspects all packets when globally_enabled_DAI is true set -euo pipefail #treat unset vars as errors diff --git a/tests/UsingDynamicParameters/Test_static_ACL_Enabled.sh b/tests/param_behavior/test_static_acl_enabled.sh similarity index 94% rename from tests/UsingDynamicParameters/Test_static_ACL_Enabled.sh rename to tests/param_behavior/test_static_acl_enabled.sh index 3f1a16c..1b51e91 100644 --- a/tests/UsingDynamicParameters/Test_static_ACL_Enabled.sh +++ b/tests/param_behavior/test_static_acl_enabled.sh @@ -1,7 +1,7 @@ #!/bin/bash -# Test_static_ACL_Enabled.sh -# This script checks if the kernel module Accepts packets that were added statically and rejects them if they were not. It does not check the DHCP snooping table +# This script checks if the kernel module Accepts packets that were added statically and rejects them if they were not. +# It does not check the DHCP snooping table set -euo pipefail #treat unset vars as errors From ac6dfcab389a797b0d70674d0a369df16aed4740 Mon Sep 17 00:00:00 2001 From: Korel Date: Sat, 14 Jun 2025 23:50:56 -0700 Subject: [PATCH 5/7] Fix: Core DAI Features Test Case Naming Core Dai Features test case naming was changed to confirm to C standards Signed-off-by: Korel --- .github/workflows/dai-testing.yml | 66 +++++++++---------- .../test_above_rate_limit.sh} | 0 .../test_arp_poisoning.sh} | 0 .../test_below_rate_limit.sh} | 0 ...test_communication_after_dhcp_snooping.sh} | 0 ...munication_from_unacknowledged_sources.sh} | 0 .../test_static_entry_in_the_arp_table.sh} | 0 .../test_trusted_interfaces.sh} | 0 .../test_untrusted_interfaces.sh} | 0 9 files changed, 33 insertions(+), 33 deletions(-) rename tests/{CoreDAIFeatures/Test_Above_Rate_Limit.sh => core_dai_features/test_above_rate_limit.sh} (100%) rename tests/{CoreDAIFeatures/Test_ARP_Poisoning.sh => core_dai_features/test_arp_poisoning.sh} (100%) rename tests/{CoreDAIFeatures/Test_Below_Rate_Limit.sh => core_dai_features/test_below_rate_limit.sh} (100%) rename tests/{CoreDAIFeatures/Test_Communication_after_DHCP_Snooping.sh => core_dai_features/test_communication_after_dhcp_snooping.sh} (100%) rename tests/{CoreDAIFeatures/Test_Communication_from_Unacknowledged_Sources.sh => core_dai_features/test_communication_from_unacknowledged_sources.sh} (100%) rename tests/{CoreDAIFeatures/Test_Static_Entry_In_The_ARP_Table.sh => core_dai_features/test_static_entry_in_the_arp_table.sh} (100%) rename tests/{CoreDAIFeatures/Test_Trusted_Interfaces.sh => core_dai_features/test_trusted_interfaces.sh} (100%) rename tests/{CoreDAIFeatures/Test_Untrusted_Interfaces.sh => core_dai_features/test_untrusted_interfaces.sh} (100%) diff --git a/.github/workflows/dai-testing.yml b/.github/workflows/dai-testing.yml index f8a9d1c..e14f6d1 100644 --- a/.github/workflows/dai-testing.yml +++ b/.github/workflows/dai-testing.yml @@ -22,7 +22,7 @@ jobs: chmod +x ./tests/module_init/*.sh chmod +x ./tests/set_params/*.sh chmod +x ./tests/param_behavior/*.sh - chmod +x ./tests/CoreDAIFeatures/*.sh + chmod +x ./tests/core_dai_features/*.sh chmod +x ./tests/EdgeCases/*.sh # Run module_init Tests @@ -88,38 +88,38 @@ jobs: working-directory: ./tests/param_behavior/ run: ./test_static_acl_enabled.sh - # Run Core_DAI_Features Tests - - name: Run Test_ARP_Poisoning - working-directory: ./tests/CoreDAIFeatures/ - run: ./Test_ARP_Poisoning.sh - - - name: Run Test_Communication_after_DHCP_Snooping - working-directory: ./tests/CoreDAIFeatures/ - run: ./Test_Communication_after_DHCP_Snooping.sh - - - name: Run Test_Communication_from_Unacknowledged_Sources - working-directory: ./tests/CoreDAIFeatures/ - run: ./Test_Communication_from_Unacknowledged_Sources.sh - - - name: Run Test_Static_Entry_In_The_ARP_Table - working-directory: ./tests/CoreDAIFeatures/ - run: ./Test_Static_Entry_In_The_ARP_Table.sh - - - name: Run Test_Trusted_Interfaces - working-directory: ./tests/CoreDAIFeatures/ - run: ./Test_Trusted_Interfaces.sh - - - name: Run Test_Untrusted_Interfaces - working-directory: ./tests/CoreDAIFeatures/ - run: ./Test_Untrusted_Interfaces.sh - - - name: Run Test_Above_Rate_Limit - working-directory: ./tests/CoreDAIFeatures/ - run: ./Test_Above_Rate_Limit.sh - - - name: Run Test_Below_Rate_Limit - working-directory: ./tests/CoreDAIFeatures/ - run: ./Test_Below_Rate_Limit.sh + # Run core_dai_features Tests + - name: Run test_above_rate_limit + working-directory: ./tests/core_dai_features/ + run: ./test_above_rate_limit.sh + + - name: Run test_arp_poisoning + working-directory: ./tests/core_dai_features/ + run: ./test_arp_poisoning.sh + + - name: Run test_below_rate_limit + working-directory: ./tests/core_dai_features/ + run: ./test_below_rate_limit.sh + + - name: Run test_communication_after_dhcp_snooping + working-directory: ./tests/core_dai_features/ + run: ./test_communication_after_dhcp_snooping.sh + + - name: Run test_communication_from_unacknowledged_sources + working-directory: ./tests/core_dai_features/ + run: ./test_communication_from_unacknowledged_sources.sh + + - name: Run test_static_entry_in_the_arp_table + working-directory: ./tests/core_dai_features/ + run: ./test_static_entry_in_the_arp_table.sh + + - name: Run test_trusted_interfaces + working-directory: ./tests/core_dai_features/ + run: ./test_trusted_interfaces.sh + + - name: Run test_untrusted_interfaces + working-directory: ./tests/core_dai_features/ + run: ./test_untrusted_interfaces.sh # Run Edge_Cases Tests - name: Run Test_Malformed_ARP_Request diff --git a/tests/CoreDAIFeatures/Test_Above_Rate_Limit.sh b/tests/core_dai_features/test_above_rate_limit.sh similarity index 100% rename from tests/CoreDAIFeatures/Test_Above_Rate_Limit.sh rename to tests/core_dai_features/test_above_rate_limit.sh diff --git a/tests/CoreDAIFeatures/Test_ARP_Poisoning.sh b/tests/core_dai_features/test_arp_poisoning.sh similarity index 100% rename from tests/CoreDAIFeatures/Test_ARP_Poisoning.sh rename to tests/core_dai_features/test_arp_poisoning.sh diff --git a/tests/CoreDAIFeatures/Test_Below_Rate_Limit.sh b/tests/core_dai_features/test_below_rate_limit.sh similarity index 100% rename from tests/CoreDAIFeatures/Test_Below_Rate_Limit.sh rename to tests/core_dai_features/test_below_rate_limit.sh diff --git a/tests/CoreDAIFeatures/Test_Communication_after_DHCP_Snooping.sh b/tests/core_dai_features/test_communication_after_dhcp_snooping.sh similarity index 100% rename from tests/CoreDAIFeatures/Test_Communication_after_DHCP_Snooping.sh rename to tests/core_dai_features/test_communication_after_dhcp_snooping.sh diff --git a/tests/CoreDAIFeatures/Test_Communication_from_Unacknowledged_Sources.sh b/tests/core_dai_features/test_communication_from_unacknowledged_sources.sh similarity index 100% rename from tests/CoreDAIFeatures/Test_Communication_from_Unacknowledged_Sources.sh rename to tests/core_dai_features/test_communication_from_unacknowledged_sources.sh diff --git a/tests/CoreDAIFeatures/Test_Static_Entry_In_The_ARP_Table.sh b/tests/core_dai_features/test_static_entry_in_the_arp_table.sh similarity index 100% rename from tests/CoreDAIFeatures/Test_Static_Entry_In_The_ARP_Table.sh rename to tests/core_dai_features/test_static_entry_in_the_arp_table.sh diff --git a/tests/CoreDAIFeatures/Test_Trusted_Interfaces.sh b/tests/core_dai_features/test_trusted_interfaces.sh similarity index 100% rename from tests/CoreDAIFeatures/Test_Trusted_Interfaces.sh rename to tests/core_dai_features/test_trusted_interfaces.sh diff --git a/tests/CoreDAIFeatures/Test_Untrusted_Interfaces.sh b/tests/core_dai_features/test_untrusted_interfaces.sh similarity index 100% rename from tests/CoreDAIFeatures/Test_Untrusted_Interfaces.sh rename to tests/core_dai_features/test_untrusted_interfaces.sh From c66bcaf0ecff563f1e1a476ac719ce558b6df8b6 Mon Sep 17 00:00:00 2001 From: Korel Date: Sat, 14 Jun 2025 23:52:10 -0700 Subject: [PATCH 6/7] Fix: Edge Case Test Case Naming Edge Case test case naming was changed to confirm to C standards Signed-off-by: Korel --- .github/workflows/dai-testing.yml | 12 ++++++------ .../test_malformed_arp_request.sh} | 0 2 files changed, 6 insertions(+), 6 deletions(-) rename tests/{EdgeCases/Test_Malformed_ARP_Request.sh => edge_cases/test_malformed_arp_request.sh} (100%) diff --git a/.github/workflows/dai-testing.yml b/.github/workflows/dai-testing.yml index e14f6d1..0c365f6 100644 --- a/.github/workflows/dai-testing.yml +++ b/.github/workflows/dai-testing.yml @@ -23,7 +23,7 @@ jobs: chmod +x ./tests/set_params/*.sh chmod +x ./tests/param_behavior/*.sh chmod +x ./tests/core_dai_features/*.sh - chmod +x ./tests/EdgeCases/*.sh + chmod +x ./tests/edge_cases/*.sh # Run module_init Tests - name: Run test_build_kernel_module @@ -100,7 +100,7 @@ jobs: - name: Run test_below_rate_limit working-directory: ./tests/core_dai_features/ run: ./test_below_rate_limit.sh - + - name: Run test_communication_after_dhcp_snooping working-directory: ./tests/core_dai_features/ run: ./test_communication_after_dhcp_snooping.sh @@ -121,7 +121,7 @@ jobs: working-directory: ./tests/core_dai_features/ run: ./test_untrusted_interfaces.sh - # Run Edge_Cases Tests - - name: Run Test_Malformed_ARP_Request - working-directory: ./tests/EdgeCases/ - run: ./Test_Malformed_ARP_Request.sh \ No newline at end of file + # Run edge_cases Tests + - name: Run test_malformed_arp_request + working-directory: ./tests/edge_cases/ + run: ./test_malformed_arp_request.sh \ No newline at end of file diff --git a/tests/EdgeCases/Test_Malformed_ARP_Request.sh b/tests/edge_cases/test_malformed_arp_request.sh similarity index 100% rename from tests/EdgeCases/Test_Malformed_ARP_Request.sh rename to tests/edge_cases/test_malformed_arp_request.sh From 44e7e95b0e653c0a41ee7231d74a99d30a25c063 Mon Sep 17 00:00:00 2001 From: Korel Date: Sat, 14 Jun 2025 23:58:31 -0700 Subject: [PATCH 7/7] Fix: Remove Name Repeated in File Remove the name of the file repeated at the top of the file in order to adhere to existing impementaiton of other test cases. Signed-off-by: Korel --- tests/edge_cases/test_malformed_arp_request.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/edge_cases/test_malformed_arp_request.sh b/tests/edge_cases/test_malformed_arp_request.sh index 37f06ee..e989358 100644 --- a/tests/edge_cases/test_malformed_arp_request.sh +++ b/tests/edge_cases/test_malformed_arp_request.sh @@ -1,6 +1,5 @@ #!/bin/bash -# Test_Malformed_ARP_Request_and_Response.sh # This script checks if the kernel module drops malformed arp requests set -euo pipefail #treat unset vars as errors