netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 1/2] tools: ynl: Remove absolute paths to yaml files from ethtool testing tool
@ 2023-04-13  1:22 Rahul Rameshbabu
  2023-04-13  1:22 ` [PATCH net-next 2/2] tools: ynl: Rename ethtool to ethtool.py Rahul Rameshbabu
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Rahul Rameshbabu @ 2023-04-13  1:22 UTC (permalink / raw)
  To: netdev
  Cc: Saeed Mahameed, David S. Miller, Jakub Kicinski, Paolo Abeni,
	Stanislav Fomichev, Rahul Rameshbabu

Absolute paths for the spec and schema files make the ethtool testing tool
unusable with freshly checked-out source trees. Replace absolute paths with
relative paths for both files in the Documentation/ directory.

Issue seen before the change

  Traceback (most recent call last):
    File "/home/binary-eater/Documents/mlx/linux/tools/net/ynl/./ethtool", line 424, in <module>
      main()
    File "/home/binary-eater/Documents/mlx/linux/tools/net/ynl/./ethtool", line 158, in main
      ynl = YnlFamily(spec, schema)
    File "/home/binary-eater/Documents/mlx/linux/tools/net/ynl/lib/ynl.py", line 342, in __init__
      super().__init__(def_path, schema)
    File "/home/binary-eater/Documents/mlx/linux/tools/net/ynl/lib/nlspec.py", line 333, in __init__
      with open(spec_path, "r") as stream:
  FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/google/home/sdf/src/linux/Documentation/netlink/specs/ethtool.yaml'

Fixes: f3d07b02b2b8 ("tools: ynl: ethtool testing tool")
Signed-off-by: Rahul Rameshbabu <rrameshbabu@nvidia.com>
---
 tools/net/ynl/ethtool | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/net/ynl/ethtool b/tools/net/ynl/ethtool
index 5fb1d670693a..6c9f7e31250c 100755
--- a/tools/net/ynl/ethtool
+++ b/tools/net/ynl/ethtool
@@ -152,8 +152,8 @@ def main():
     global args
     args = parser.parse_args()
 
-    spec = '/usr/local/google/home/sdf/src/linux/Documentation/netlink/specs/ethtool.yaml'
-    schema = '/usr/local/google/home/sdf/src/linux/Documentation/netlink/genetlink-legacy.yaml'
+    spec = '../../../Documentation/netlink/specs/ethtool.yaml'
+    schema = '../../../Documentation/netlink/genetlink-legacy.yaml'
 
     ynl = YnlFamily(spec, schema)
 
-- 
2.38.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-04-14  5:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-13  1:22 [PATCH net-next 1/2] tools: ynl: Remove absolute paths to yaml files from ethtool testing tool Rahul Rameshbabu
2023-04-13  1:22 ` [PATCH net-next 2/2] tools: ynl: Rename ethtool to ethtool.py Rahul Rameshbabu
2023-04-13  4:20 ` [PATCH net-next 1/2] tools: ynl: Remove absolute paths to yaml files from ethtool testing tool patchwork-bot+netdevbpf
2023-04-13 15:00   ` pw bot mismatches on pure rename patches (was: Re: [PATCH net-next 1/2] tools: ynl: Remove absolute paths to yaml files from ethtool testing tool) Jakub Kicinski
2023-04-14  5:20 ` [PATCH net-next 1/2] tools: ynl: Remove absolute paths to yaml files from ethtool testing tool patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).