Bug 2344 - Attribute names can't have spaces
Attribute names can't have spaces
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: core
pre-release
All All
: P5 normal
Assigned To: Tom Henderson
https://www.nsnam.org/docs/doxygen/cl...
: bug
Depends on: 2149
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-22 05:55 UTC by 497003619
Modified: 2016-09-10 17:32 UTC (History)
6 users (show)

See Also:


Attachments
patch to remove spaces (2.34 KB, patch)
2016-03-22 20:13 UTC, Tom Henderson
Details | Diff
Remove spaces and adapt test (3.04 KB, patch)
2016-04-20 09:02 UTC, Matías Richart
Details | Diff
Patch to check for spaces in attribute names (713 bytes, patch)
2016-08-05 19:36 UTC, Peter Barnes
Details | Diff
Fix attribute names with spaces (6.24 KB, patch)
2016-08-09 15:39 UTC, Peter Barnes
Details | Diff
Fix attribute names with spaces (4.94 KB, patch)
2016-08-09 15:49 UTC, Peter Barnes
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description 497003619 2016-03-22 05:55:00 UTC
The Attributes of AparfWifiManager, "SuccessThreshold 1" & "SuccessThreshold 2", contains space in the attributes name. So when users use ConfigStore to input a configure file which includes these two attributes will encounter an error caused by that totally unnecessary space.

The error is introduced in RawTextConfigLoad::Strip() the statements "NS_ASSERT (start == 0);".

So it is hard to define whether the error is caused by AparfWifiManager or ConfigStore. But I suggest to correct the Attributes and also set a restriction when defining the Attributes as well.
Comment 1 497003619 2016-03-22 06:00:59 UTC
As further discovered, the attributes set for AparfWifiManager are not in a good manner. A lot of them contains space. Please help to correct these error
Comment 2 Tom Henderson 2016-03-22 20:13:28 UTC
Created attachment 2350 [details]
patch to remove spaces
Comment 3 Tom Henderson 2016-03-22 20:19:15 UTC
It could be perhaps fixed in two steps, as suggested above:

1) remove spaces (patch attached)
2) add some support in the core module to disallow spaces in attribute names
Comment 4 sebastien.deronne 2016-03-23 04:33:38 UTC
I suggest you push this patch, it should indeed be forbidden to used spaces in attributes name.
Comment 5 Tom Henderson 2016-03-24 01:18:01 UTC
(In reply to sebastien.deronne from comment #4)
> I suggest you push this patch, it should indeed be forbidden to used spaces
> in attributes name.

I decided to hold it until post-release so that bug 2149 (deprecation of renamed attributes) could be done.

I marked bug 2149 as a dependency.
Comment 6 Matías Richart 2016-04-20 09:02:12 UTC
Created attachment 2394 [details]
Remove spaces and adapt test

I also modify the test case which uses these attributes.
Comment 7 Peter Barnes 2016-08-05 19:36:19 UTC
Created attachment 2513 [details]
Patch to check for spaces in attribute names
Comment 8 Peter Barnes 2016-08-09 15:39:29 UTC
Created attachment 2535 [details]
Fix attribute names with spaces

This fixes attribute names with spaces:

src/internet/model/ipv6-extension.cc
src/traffic-control/model/fq-codel-queue-disc.cc
src/wifi/model/ampdu-tag.cc
src/wifi/model/aparf-wifi-manager.cc
src/wifi/test/power-rate-adaptation-test.cc

This includes everything from patch 2394, and new attributes introduced since then
Comment 9 Peter Barnes 2016-08-09 15:49:43 UTC
Created attachment 2536 [details]
Fix attribute names with spaces

(Whoops, previous patch included patch 2513 which is the actual checker.)

Fix attribute names with spaces

This fixes attribute names with spaces:

src/internet/model/ipv6-extension.cc
src/traffic-control/model/fq-codel-queue-disc.cc
src/wifi/model/ampdu-tag.cc
src/wifi/model/aparf-wifi-manager.cc
src/wifi/test/power-rate-adaptation-test.cc

This includes everything from patch 2394, and new attributes introduced since then
Comment 10 Tom Henderson 2016-09-10 17:32:24 UTC
pushed in 12315:8c4420df0d19 and 12316:9677c1b23cc9