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>
+# 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__
+// 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>
+// 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>
+// 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>
+// 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>
+// 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
+// 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
+// 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
%{
+// 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
+// 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
+// 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
%{
+// 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>
+// 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
+// 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
+// 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"
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;
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");
+// 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