After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 750700 - use ip neigh instead of arp command for getting IP
use ip neigh instead of arp command for getting IP
Status: RESOLVED FIXED
Product: gnome-boxes
Classification: Applications
Component: tests
3.16.x
Other Linux
: Normal normal
: --
Assigned To: GNOME Boxes maintainer(s)
Vladimir Benes
Depends on:
Blocks: 750701
 
 
Reported: 2015-06-10 12:15 UTC by vladimir benes
Modified: 2016-09-20 08:15 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
tests: Exchange arp command for ip neigh (2.06 KB, patch)
2015-06-10 12:16 UTC, vladimir benes
none Details | Review
tests: Exchange arp command for ip neigh (2.04 KB, patch)
2015-06-10 13:59 UTC, vladimir benes
none Details | Review
tests: Exchange arp command for ip neigh (2.03 KB, patch)
2015-06-10 14:03 UTC, vladimir benes
needs-work Details | Review
tests: Obtain IP from libvirt's log (1.68 KB, patch)
2015-06-18 13:56 UTC, vladimir benes
reviewed Details | Review
tests: Exchange arp command for ip neigh (1.28 KB, patch)
2015-07-28 14:45 UTC, vladimir benes
none Details | Review
tests: Exchange arp command for ip neigh (1.79 KB, patch)
2015-07-28 20:07 UTC, vladimir benes
needs-work Details | Review
tests: Replace "arp" cmd w/ "ip neigh" (1.65 KB, patch)
2015-07-29 14:33 UTC, vladimir benes
committed Details | Review

Description vladimir benes 2015-06-10 12:15:13 UTC
Arp command is obsolete in favour of ip neigh. 

Add logic to avoid multiple IP addressed for single mac reporting. If such situation occurs only the newer (higher) IP is reported. This happens during express installations.
Comment 1 vladimir benes 2015-06-10 12:16:14 UTC
Created attachment 304962 [details] [review]
tests: Exchange arp command for ip neigh

Arp command is obsolete in favour of ip neigh. Add a logic to avoid
multiple IP addressed for single mac reporting. If such situation
occurs only the newer (higher) IP is reported. This happens during
express installations.
Comment 2 vladimir benes 2015-06-10 13:59:09 UTC
Created attachment 304975 [details] [review]
tests: Exchange arp command for ip neigh

Arp command is obsolete in favour of ip neigh. Add a logic to avoid
multiple IP addressed for single mac reporting. If such situation
occurs only the newer (higher) IP is reported. This happens during
express installations.
Comment 3 vladimir benes 2015-06-10 14:03:41 UTC
Created attachment 304976 [details] [review]
tests: Exchange arp command for ip neigh

Arp command is obsolete in favour of ip neigh.

Add a logic to avoid multiple IP addresses for single mac reporting.
It may happen during express installation and in such case only the
newer (higher) IP is reported.
Comment 4 Zeeshan Ali 2015-06-10 15:15:45 UTC
Review of attachment 304976 [details] [review]:

* "Exchange arp command for ip neigh" -> "Replace `arp` cmd w/ `ip neigh`". Surrounding "ip neigh" by either `` or "" would improve readability slightly.

* "is obsolete in" -> "has been obsoleted in".

* Second para in description makes me thing these are two logical changes or is this change simply a side-affect? In case its a side-affect, please update description to reflect so.

::: tests/steps/general.py
@@ +187,3 @@
         ret = cmd.wait()
+
+        #this happens from time to time after express install

* What happens? This comment makes it sound like this "if" is looking for an erroneous condition while the block under it is the only code that actually returns an IP address.
* Space after # and capitalize first letter please.
Comment 5 vladimir benes 2015-06-18 13:56:55 UTC
Created attachment 305583 [details] [review]
tests: Obtain IP from libvirt's log

Exhange getting IP via arp command with reading libvirt's log.
Comment 6 Zeeshan Ali 2015-06-18 20:58:56 UTC
Review of attachment 305583 [details] [review]:

Interesting so the patch has completely changed now? I don't think I like this approach since log formats can easily change, while output format of unix system utilities rarely change.
Comment 7 vladimir benes 2015-07-28 10:53:47 UTC
as I've filed https://bugzilla.gnome.org/show_bug.cgi?id=752955

this is very likely not needed anymore.. I thought that this would fix the issue but it's very likely somewhere else.
Comment 8 vladimir benes 2015-07-28 14:45:07 UTC
Created attachment 308301 [details] [review]
tests: Exchange arp command for ip neigh

Arp command has been obsoleted in favour of ip neigh.
Comment 9 vladimir benes 2015-07-28 14:46:02 UTC
ok, I've changed arp command to ip neighbour which seems to be the best solution. Please review.
Comment 10 Zeeshan Ali 2015-07-28 15:56:42 UTC
(In reply to vladimir benes from comment #9)
> ok, I've changed arp command to ip neighbour which seems to be the best
> solution. Please review.

Judging solely from shortlog, I'm not sure you addressed my comments from previous review to this patch in comment#4.
Comment 11 vladimir benes 2015-07-28 20:07:54 UTC
Created attachment 308327 [details] [review]
tests: Exchange arp command for ip neigh

Arp command has been obsoleted in favour of ip neigh.
Comment 12 vladimir benes 2015-07-28 20:10:15 UTC
(In reply to Zeeshan Ali (Khattak) from comment #10)
> (In reply to vladimir benes from comment #9)
> > ok, I've changed arp command to ip neighbour which seems to be the best
> > solution. Please review.
> 
> Judging solely from shortlog, I'm not sure you addressed my comments from
> previous review to this patch in comment#4.

no, the second if is gone as I do use ip neigh nud reachable so there shouldn't be any duplicate ip to one mac. I've updated function names too. so now really ready for review. 

#comment is gone as well.
Comment 13 Zeeshan Ali 2015-07-29 13:29:33 UTC
Review of attachment 308327 [details] [review]:

Well this first comment from previous review was definitely missed:

* "Exchange arp command for ip neigh" -> "Replace `arp` cmd w/ `ip neigh`". Surrounding "ip neigh" by either `` or "" would improve readability slightly.

::: tests/steps/general.py
@@ -185,3 @@
     return mac
 
-def get_ip_from_libvirts_log(mac):

I think this patch is based on the previous (not merged) patch on this bug cause I never merged your "get ip from libvirt log" patch.
Comment 14 vladimir benes 2015-07-29 14:33:59 UTC
Created attachment 308403 [details] [review]
tests: Replace "arp" cmd w/ "ip neigh"

"Arp" command has been obsoleted in favour of "ip neigh".
Comment 15 vladimir benes 2015-07-29 14:34:40 UTC
Ah yes, now based on master. Sorry for confusion.
Comment 16 Zeeshan Ali 2015-07-29 18:06:13 UTC
Attachment 308403 [details] pushed as 22a6992 - tests: Replace "arp" cmd w/ "ip neigh"