Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
8c8fd7f
Fixed a handful of coverity bugs.
braddaw Dec 7, 2012
3b941dd
Merge branch 'master' of https://github.com/actorquedeveloper/torque
braddaw Dec 7, 2012
1d2a593
Added changes which enable TORQUE to compile with c++. More changes t…
Dec 8, 2012
f369090
first attempt at unit test for job_route.c
Dec 10, 2012
5d3fa74
rpp was removed in the previous commit but includes for rpp.h were
Dec 10, 2012
0884cb5
Revert "first attempt at unit test for job_route.c"
Dec 10, 2012
36c17d8
Revert "Revert "first attempt at unit test for job_route.c""
Dec 10, 2012
ef125ec
Merge branch 'master' of https://github.com/actorquedeveloper/torque
Dec 10, 2012
4727d22
Added (char *) to macro definition for GET_NEXT and GET_PRIOR
Dec 10, 2012
43d2fcb
commiting changes for last type casting errors from src/lib for c++
Dec 10, 2012
889ba76
Fixed some c++ bugs.
braddaw Dec 10, 2012
89b500f
Merge branch 'master' of https://github.com/actorquedeveloper/torque
Dec 10, 2012
2482566
Refactor req_register() - the function - a bit so that it can be unit…
Dec 10, 2012
c689138
Merge https://github.com/actorquedeveloper/torque
Dec 10, 2012
d34f27f
Merge branch 'master' of https://github.com/actorquedeveloper/torque
Dec 10, 2012
e4b80ac
Add stub to svr_jobfunc's scaffolding.
Dec 10, 2012
1edeecd
start checking return value of getpeername more carefully
Dec 10, 2012
f18190f
Remove some files that shouldn't be part of the source tree.
Dec 10, 2012
ece0b23
Merge branch 'master' of https://github.com/actorquedeveloper/torque
Dec 10, 2012
ed065a8
fix unchecked return value from diswst
Dec 10, 2012
4dbb7a2
use return values from chmod and chown better
Dec 10, 2012
543dad3
use return value from getpeername better
Dec 10, 2012
97b85b7
use return value of getaddrinfo more intelligently
Dec 10, 2012
6d4adc8
Add the files generated by running the unit test framework to .gitign…
Dec 11, 2012
0e55dbc
modified function signatures to use const char * for
Dec 11, 2012
f4f1d6f
Merge branch 'master' of https://github.com/actorquedeveloper/torque
Dec 11, 2012
758c003
fixed type cast problem
Dec 11, 2012
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
431 changes: 430 additions & 1 deletion .gitignore

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,6 @@ m4_ifdef([AM_SILENT_RULES],[
src/lib/Libifl/test/pbsD_termin/Makefile
src/lib/Libifl/test/pbs_geterrmg/Makefile
src/lib/Libifl/test/pbs_statfree/Makefile
src/lib/Libifl/test/rpp/Makefile
src/lib/Libifl/test/tcp_dis/Makefile
src/lib/Libifl/test/tm/Makefile
src/lib/Libifl/test/torquecfg/Makefile
Expand Down
2 changes: 1 addition & 1 deletion doc/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ nodist_man3_MANS = man3/pbs_alterjob.3 \
man3/pbs_submit.3 \
man3/pbs_terminate.3

dist_man3_MANS = man3/rpp.3 man3/tm.3
dist_man3_MANS = man3/tm.3

nodist_man7_MANS = man7/pbs_job_attributes.7 \
man7/pbs_queue_attributes.7 \
Expand Down
6 changes: 5 additions & 1 deletion src/cmds/pbspoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -551,7 +551,7 @@ void run_command(
char *argv[])

{
int junk = 0;
int junk = 0;
int i;
char *psyscmd;
int syssz;
Expand Down Expand Up @@ -600,6 +600,10 @@ void run_command(
}

junk = system(psyscmd);
if (junk)
{
;
}

clean_up(0);
}
Expand Down
4 changes: 2 additions & 2 deletions src/daemon_client/trq_auth_daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ int daemonize_trqauthd(char *server_ip, int server_port, void *(*process_meth)(v
{
openlog("daemonize_trqauthd", LOG_PID | LOG_NOWAIT, LOG_DAEMON);
syslog(LOG_ALERT, "Failed to create client_logs directory: errno: %d", errno);
log_err(errno,"daemonize_trqauthd", "Failed to create client_logs directory");
log_err(errno,"daemonize_trqauthd", (char *)"Failed to create client_logs directory");
closelog();
}
pthread_mutex_lock(log_mutex);
Expand All @@ -177,7 +177,7 @@ int daemonize_trqauthd(char *server_ip, int server_port, void *(*process_meth)(v
{
openlog("daemonize_trqauthd", LOG_PID | LOG_NOWAIT, LOG_DAEMON);
syslog(LOG_ALERT, "trqauthd could not start: %d\n", rc);
log_err(rc, "daemonize_trqauthd", "trqauthd could not start");
log_err(rc, "daemonize_trqauthd", (char *)"trqauthd could not start");
pthread_mutex_lock(log_mutex);
log_close(1);
pthread_mutex_unlock(log_mutex);
Expand Down
8 changes: 5 additions & 3 deletions src/gui/Ccode/xpbs_datadump.c
Original file line number Diff line number Diff line change
Expand Up @@ -1186,8 +1186,7 @@ display_statserver(struct batch_status *status, int prtheader, int full, int nod
}

printf(format, name, max, tot, que, run, hld, wat, trn, ext, stats,

nod, p->name ? p->name : "");
nod, p->name ? p->name : (char *)"");
}

if (full) printf("\n");
Expand Down Expand Up @@ -1309,7 +1308,7 @@ int main( /* qstat */

struct attropl *select_list = 0;

static char destination[PBS_MAXQUEUENAME+1] = "";
static char destination[PBS_MAXQUEUENAME+1];

char *server_name_out;

Expand All @@ -1325,6 +1324,9 @@ int main( /* qstat */

struct sigaction act;

destination[0] = '\0';


#define GETOPT_ARGS "a:A:c:h:l:N:p:q:r:s:u:JTt:"

while ((c = getopt(argc, argv, GETOPT_ARGS)) != EOF)
Expand Down
2 changes: 1 addition & 1 deletion src/include/Makefile.am
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
include $(top_srcdir)/buildutils/config.mk

include_HEADERS = libcmds.h license_pbs.h pbs_constants.h pbs_cmds.h pbs_error.h \
pbs_error_db.h pbs_ifl.h rm.h rpp.h tm.h tm_.h u_hash_map_structs.h \
pbs_error_db.h pbs_ifl.h rm.h tm.h tm_.h u_hash_map_structs.h \
u_memmgr.h uthash.h tcp.h

noinst_HEADERS = acct.h array.h assertions.h attribute.h batch_request.h \
Expand Down
54 changes: 30 additions & 24 deletions src/include/array.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,34 @@ struct job_array_259
typedef struct job_array_259 job_array_259;


/* this info is saved in the array file */
struct array_info
{
/* NOTE, struct_version _must_ come first in the struct */
int struct_version; /* version of this struct */
int array_size; /* size of the array used to track the jobs */
int num_jobs; /* total number of jobs in the array */
int slot_limit; /* number of jobs in the array that can be run at one time */
int jobs_running; /* number of jobs in the array currently running */
int jobs_done; /* number of jobs that have been deleted, etc. */
int num_cloned; /* number of jobs out of the array that have been created */
int num_started; /* number of jobs that have begun execution */
int num_failed; /* number of jobs that exited with status != 0 */
int num_successful; /* number of jobs that exited with status == 0 */

/* dependency info */
tlist_head deps;

/* max user name, server name, 1 for the @, and one for the NULL */
char owner[PBS_MAXUSER + PBS_MAXSERVERNAME + 2];
char parent_id[PBS_MAXSVRJOBID + 1];
char fileprefix[PBS_JOBBASE + 1];
char submit_host[PBS_MAXSERVERNAME +1];
int num_purged; /* number of jobs which have called purge_job */
};

typedef struct array_info array_info;

/* pbs_server will keep a list of these structs, with one struct per job array*/

struct job_array
Expand All @@ -113,32 +141,10 @@ struct job_array
pthread_mutex_t *ai_mutex;

/* this info is saved in the array file */
struct array_info
{
/* NOTE, struct_version _must_ come first in the struct */
int struct_version; /* version of this struct */
int array_size; /* size of the array used to track the jobs */
int num_jobs; /* total number of jobs in the array */
int slot_limit; /* number of jobs in the array that can be run at one time */
int jobs_running; /* number of jobs in the array currently running */
int jobs_done; /* number of jobs that have been deleted, etc. */
int num_cloned; /* number of jobs out of the array that have been created */
int num_started; /* number of jobs that have begun execution */
int num_failed; /* number of jobs that exited with status != 0 */
int num_successful; /* number of jobs that exited with status == 0 */

/* dependency info */
tlist_head deps;

/* max user name, server name, 1 for the @, and one for the NULL */
char owner[PBS_MAXUSER + PBS_MAXSERVERNAME + 2];
char parent_id[PBS_MAXSVRJOBID + 1];
char fileprefix[PBS_JOBBASE + 1];
char submit_host[PBS_MAXSERVERNAME +1];
int num_purged; /* number of jobs which have called purge_job */
} ai_qs;
array_info ai_qs;
};


typedef struct job_array job_array;

struct all_arrays
Expand Down
2 changes: 1 addition & 1 deletion src/include/attribute.h
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ extern void free_unkn(pbs_attribute *);
extern int parse_equal_string(char *, char **, char **);
extern char *parse_comma_string(char *,char **);

#define NULL_FUNC (int (*)())0
#define NULL_FUNC '\0'

/* other associated funtions */
struct dynamic_string;
Expand Down
4 changes: 2 additions & 2 deletions src/include/list_link.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ typedef struct pidl
#define GET_NEXT(pe) (pe).ll_next->ll_struct
#define GET_PRIOR(pe) (pe).ll_prior->ll_struct
#else
#define GET_NEXT(pe) get_next(pe, __FILE__, __LINE__)
#define GET_PRIOR(pe) get_prior(pe, __FILE__, __LINE__)
#define GET_NEXT(pe) get_next(pe, (char *)__FILE__, __LINE__)
#define GET_PRIOR(pe) get_prior(pe,(char *) __FILE__, __LINE__)
#endif

/* function prototypes */
Expand Down
8 changes: 4 additions & 4 deletions src/include/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,12 +161,12 @@ extern int chk_file_sec_stderr;

/* extern void log_close (int); */
/* extern void job_log_close (int); */
void log_err (int, const char *, char *);
void log_ext (int, const char *,char *,int);
void log_event (int, int, const char *, char *);
void log_err (int, const char *, const char *);
void log_ext (int, const char *, const char *,int);
void log_event (int, int, const char *, const char *);
/* extern int log_open (char *, char *); */
/* extern int job_log_open (char *, char *); */
void log_record (int, int, const char *, char *);
void log_record (int, int, const char *, const char *);
/* extern void log_roll (int); */
/* extern long log_size (void); */
/* extern long job_log_size (void); */
Expand Down
Loading