danilogio / ostinato

Automatically exported from code.google.com/p/ostinato
GNU General Public License v3.0
0 stars 0 forks source link

Ethernet Type field view is not stable (Ethernet II) #131

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Problem description:
Time to time few issue scenarios are reproducible for Ethernet II tag.

Steps to reproduce:
1. Connect to Ostinato.
2. Select interface within 'Ports Group' tree.
3. Create new stream.
4. Go into the stream.

Scenario 1. Ethernet II contains content of Payload Data protocol.

5. Remove MAC and DATA from 'Selected Protocols' list.
6. Select MAC and Eth II protocols within 'Available Protocols' list.
7. Go to 'Protocol Data' tab.
8. Click on Ethernet II panel.

Expected result:
Ethernet II panel contains all required fields: 'Ethernet Type'

Actual result:
Ethernet II panel contains fields of Payload Data protocol: 'Type', 'Pattern'

Scenario 2. Time to time Ethernet Type field doesn't pull default Eth type 
value of Selected protocol.

5. Remove DATA from 'Selected Protocols' list.
6. Select Eth II and IPv4 protocols within 'Available Protocols' list (in 
correct sequence, MAC exists by default).
7. Go to 'Protocol Data' tab.
8. Verify that Ethernet Type is changed to default of IPv4 protocol: 0800

Expected result:
Ethernet Type is changed to default of selected protocol.

Actual results: 
Ethernet Type is not changed to default of selected protocol. (Reproducibility: 
50%)

Scenario 3. Ethernet Type field doesn't pull default Eth type value of Selected 
protocol after some manipulation (removing/adding).

5. Remove DATA from 'Selected Protocols' list.
6. Select Eth II and IPv4 protocols within 'Available Protocols' list (in 
correct sequence, MAC exists by default).
7. Verify that Eth II type is 0800.
8. Click Ok and Apply buttons.
9. Go to configured stream.
10. Remove IPv4 protocol.
11. Click Ok and Apply buttons.
12. Verify that Eth II type 0800 is removed.
13. Add IPv4 protocol. 
14. Verify that Eth II type is 0800.

Expected results:
Eth II type is changed according to manipulation with selected protocol in 
runtime.

Actual results:
Eth II type is not changed after manipulation with packet content in runtime. 
(Reproducibility: 80%)

Ostinato version: 0.6
OS: Linux 3.11.0-15-generic #25~precise1-Ubuntu 86_64 x86_64 x86_64 GNU/Linux

Type-Defect
Priority-Medium

Original issue reported on code.google.com by developers@plvision.eu on 22 Sep 2014 at 1:13

GoogleCodeExporter commented 9 years ago
I'm not able to reproduce Scenario 1 and 2 at all despite multiple retries.

Scenario 3 I'm able to reproduce - can you confirm that, clicking ok and 
editing the stream again displays the correct ethtype. (in other words, this is 
just a transient display issue)

Original comment by pstav...@gmail.com on 5 Oct 2014 at 8:03

GoogleCodeExporter commented 9 years ago
Scenario 1:
Issue has low reproducibility of 10%, but still exists, see attachment: 
issue_131.1  

Scenario 2 as Scenario 3 is transient display issue.

Scenario 2:
Issue is reproduced, when packet with not appropriate sequence of 
protocols(EthII, MAC, IPv4) is opened in 'Protocol Data' tab and then 
corrected, after this Ethertype value doesn't change to expected(0800), but 
Packet View displays correctly - 0800. see attachment: issue_131.2(1&2)

Original comment by developers@plvision.eu on 16 Oct 2014 at 11:45

Attachments:

GoogleCodeExporter commented 9 years ago
Since Scenario #2 and #3 are transient display only issues, I don't plan to fix 
them. 

Scenario #1 I was able to reproduce once after several tries and I think I know 
what the problem is. Since you are able to repro with much more probability, 
can you try the below patch and see if it fixes the problem -

diff --git a/client/streamconfigdialog.cpp b/client/streamconfigdialog.cpp
--- a/client/streamconfigdialog.cpp
+++ b/client/streamconfigdialog.cpp
@@ -516,6 +516,8 @@ void StreamConfigDialog::on_tbDelete_cli

     Q_CHECK_PTR(p);
     _iter->remove();
+    // Free both protocol and associated widget
+    delete _protocolWidgets.take(p);
     delete p;

     updateSelectProtocolsAdvancedWidget();
@@ -835,6 +837,8 @@ void StreamConfigDialog::__updateProtoco
                             newId, mpStream));
                 else
                     _iter->remove();
+                // Free both protocol and associated widget
+                delete _protocolWidgets.take(p);
                 delete p;
                 if (level == ProtoPayload)
                 {
@@ -842,6 +846,8 @@ void StreamConfigDialog::__updateProtoco
                     {
                         p = _iter->next();
                         _iter->remove();
+                        // Free both protocol and associated widget
+                        delete _protocolWidgets.take(p);
                         delete p;
                     }
                 }

Original comment by pstav...@gmail.com on 6 Nov 2014 at 4:51

GoogleCodeExporter commented 9 years ago
Issue (#1) is not reproducible with provided patch.

Original comment by developers@plvision.eu on 7 Nov 2014 at 1:06

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 66abe28575f0.

Original comment by pstav...@gmail.com on 7 Nov 2014 at 2:52

GoogleCodeExporter commented 9 years ago
Verified.

Original comment by developers@plvision.eu on 10 Nov 2014 at 1:54