Whamcloud - gitweb
LU-16502 lutf: add headers to lutf C code 80/53480/3
authorTimothy Day <timday@amazon.com>
Fri, 15 Dec 2023 21:17:18 +0000 (21:17 +0000)
committerOleg Drokin <green@whamcloud.com>
Wed, 10 Jan 2024 07:29:14 +0000 (07:29 +0000)
Add SPDX text and documentation to lutf C code.
This will make it easier for developers to
find where different functionality lives.

Test-Parameters: @lnet
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: I67d8acc6b5968e76667130f38018ddcf0fcfd3b0
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/53480
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Frank Sehr <fsehr@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
16 files changed:
lustre/tests/lutf/src/Makefile.am
lustre/tests/lutf/src/liblutf_agent.c
lustre/tests/lutf/src/liblutf_connect.c
lustre/tests/lutf/src/liblutf_global.c
lustre/tests/lutf/src/lutf.c
lustre/tests/lutf/src/lutf.h
lustre/tests/lutf/src/lutf_agent.h
lustre/tests/lutf/src/lutf_agent.swg
lustre/tests/lutf/src/lutf_common.h
lustre/tests/lutf/src/lutf_global.h
lustre/tests/lutf/src/lutf_global.swg
lustre/tests/lutf/src/lutf_listener.c
lustre/tests/lutf/src/lutf_listener.h
lustre/tests/lutf/src/lutf_message.h
lustre/tests/lutf/src/lutf_python.c
lustre/tests/lutf/src/lutf_python.h

index 85273a2..d05e31c 100644 (file)
@@ -1,4 +1,12 @@
+# SPDX-License-Identifier: GPL-2.0
+
+#
+# This file is part of Lustre, http://www.lustre.org/
+#
+# lustre/tests/lutf/src/Makefile.am
+#
 # Administration utilities Makefile
+#
 
 SWIG_COMPFLAGS=-g -Wall -fPIC -c
 SWIG_FLAGS=-D__x86_64__
index 4f024ed..ed08680 100644 (file)
@@ -1,3 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ *
+ * lustre/tests/lutf/liblutf_agent.c
+ *
+ * LUTF agent setup (and some RPC code)
+ *
+ * Author: Amir Shehata <ashehata@whamcloud.com>
+ *
+ */
+
 #include <sys/socket.h>
 #include <sys/time.h>
 #include <netinet/in.h>
index a14cbbd..a992635 100644 (file)
@@ -1,3 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ *
+ * lustre/tests/lutf/liblutf_connect.c
+ *
+ * Routines for communicating with other LUTF nodes
+ * over TCP.
+ *
+ * Author: Amir Shehata <ashehata@whamcloud.com>
+ *
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/types.h>
index b099a6c..5bf3da0 100644 (file)
@@ -1,3 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ *
+ * lustre/tests/lutf/liblutf_global.c
+ *
+ * Friendly wrapper functions to get configuration
+ * values from LUTF configuration.
+ *
+ * Author: Amir Shehata <ashehata@whamcloud.com>
+ *
+ */
+
 #include <pthread.h>
 #include <time.h>
 #include <sys/socket.h>
index 4ed1bf0..bfe82e4 100644 (file)
@@ -1,3 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ *
+ * lustre/tests/lutf/lutf.c
+ *
+ * Main entry point for LUTF. Provide command line parsing
+ * and YAML configuration parsing.
+ *
+ * Author: Amir Shehata <ashehata@whamcloud.com>
+ *
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
index 00b887b..85d0163 100644 (file)
@@ -1,3 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ *
+ * lustre/tests/lutf/lutf.h
+ *
+ * Author: Amir Shehata <ashehata@whamcloud.com>
+ *
+ */
+
 #ifndef LUTF_H
 #define LUTF_H
 
index 7e769b9..dca5a07 100644 (file)
@@ -1,3 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ *
+ * lustre/tests/lutf/lutf_agent.h
+ *
+ * Author: Amir Shehata <ashehata@whamcloud.com>
+ *
+ */
+
 #ifndef LUTF_AGENTS_H
 #define LUTF_AGENTS_H
 
index 881c29a..5c0f881 100644 (file)
@@ -1,3 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ *
+ * lustre/tests/lutf/lutf_agent.swg
+ *
+ * Author: Amir Shehata <ashehata@whamcloud.com>
+ *
+ */
+
 %module clutf_agent
 
 %{
index 8db40cb..dde0dbc 100644 (file)
@@ -1,3 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ *
+ * lustre/tests/lutf/lutf_common.h
+ *
+ * Author: Amir Shehata <ashehata@whamcloud.com>
+ *
+ */
+
 #ifndef LUTF_COMMON_H
 #define LUTF_COMMON_H
 
index 29b808a..09ff6df 100644 (file)
@@ -1,3 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ *
+ * lustre/tests/lutf/lutf_global.h
+ *
+ * Author: Amir Shehata <ashehata@whamcloud.com>
+ *
+ */
+
 #ifndef LUTF_CONNECT_H
 #define LUTF_CONNECT_H
 
index 1cb2666..9ea54ed 100644 (file)
@@ -1,3 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ *
+ * lustre/tests/lutf/lutf_global.swg
+ *
+ * Author: Amir Shehata <ashehata@whamcloud.com>
+ *
+ */
+
 %module clutf_global
 
 %{
index 3d0939b..1dabe92 100644 (file)
@@ -1,3 +1,17 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ *
+ * lustre/tests/lutf/lutf_listener.c
+ *
+ * Routines for communicating with other LUTF nodes
+ * over TCP.
+ *
+ * Author: Amir Shehata <ashehata@whamcloud.com>
+ *
+ */
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <unistd.h>
index 8327c47..612ba6a 100644 (file)
@@ -1,3 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ *
+ * lustre/tests/lutf/lutf_listener.h
+ *
+ * Author: Amir Shehata <ashehata@whamcloud.com>
+ *
+ */
+
 #ifndef LUTF_LISTENER_H
 #define LUTF_LISTENER_H
 
index efbd918..0091041 100644 (file)
@@ -1,3 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ *
+ * lustre/tests/lutf/lutf_message.h
+ *
+ * Author: Amir Shehata <ashehata@whamcloud.com>
+ *
+ */
+
 #ifndef LUTF_MESSAGE_H
 #define LUTF_MESSAGE_H
 
index d1b6e97..7e73f76 100644 (file)
@@ -1,3 +1,18 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ *
+ * lustre/tests/lutf/lutf_python.c
+ *
+ * Functions used by LUTF to interact with cPython. LUTF
+ * test suites are run from python_run_interactive_shell()
+ * on the master LUTF node.
+ *
+ * Author: Amir Shehata <ashehata@whamcloud.com>
+ *
+ */
+
 #include <Python.h>
 #include <netinet/in.h>
 #include "lutf.h"
@@ -200,10 +215,6 @@ python_shutdown:
        return rc;
 }
 
-/*
- * gcc py.c -o py -I/usr/local/include/python2.7
- * -L/usr/local/lib/python2.7/config -lm -ldl -lpthread -lutil -lpython2.7
- */
 lutf_rc_t python_init(void)
 {
        lutf_rc_t rc = EN_LUTF_RC_FAIL;
@@ -226,19 +237,10 @@ lutf_rc_t python_init(void)
        if (PyStatus_Exception(status))
                Py_ExitStatusException(status);
 #else
-       //char *path;
-       //char new_path[MAX_STR_LEN];
        Py_SetProgramName(program);
-       //char *py_args[1];
-
-       //py_args[0] = argv[0];
 
        Py_Initialize();
 
-       //sprintf(new_path, "%s:%s", path, script_path);
-       //PySys_SetPath(new_path);
-       //path = Py_GetPath();
-
        rc = python_run_interactive_shell();
        PDEBUG("Python finalizing");
 
index 02298f5..a31eb93 100644 (file)
@@ -1,3 +1,14 @@
+// SPDX-License-Identifier: GPL-2.0
+
+/*
+ * This file is part of Lustre, http://www.lustre.org/
+ *
+ * lustre/tests/lutf/lutf_python.h
+ *
+ * Author: Amir Shehata <ashehata@whamcloud.com>
+ *
+ */
+
 #ifndef LUTF_PYTHON_H
 #define LUTF_PYTHON_H