Lines Matching refs:line
245 _cleanup_free_ char *line = NULL; in TEST() local
310 assert_se(get_process_cmdline(0, SIZE_MAX, 0, &line) == -ENOENT); in TEST()
312 assert_se(get_process_cmdline(0, SIZE_MAX, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
313 log_debug("'%s'", line); in TEST()
314 assert_se(streq(line, "[testa]")); in TEST()
315 line = mfree(line); in TEST()
317 …t_process_cmdline(0, SIZE_MAX, PROCESS_CMDLINE_COMM_FALLBACK | PROCESS_CMDLINE_QUOTE, &line) >= 0); in TEST()
318 log_debug("'%s'", line); in TEST()
319 assert_se(streq(line, "\"[testa]\"")); /* quoting is enabled here */ in TEST()
320 line = mfree(line); in TEST()
322 assert_se(get_process_cmdline(0, 0, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
323 log_debug("'%s'", line); in TEST()
324 assert_se(streq(line, "")); in TEST()
325 line = mfree(line); in TEST()
327 assert_se(get_process_cmdline(0, 1, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
328 assert_se(streq(line, "…")); in TEST()
329 line = mfree(line); in TEST()
331 assert_se(get_process_cmdline(0, 2, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
332 assert_se(streq(line, "[…")); in TEST()
333 line = mfree(line); in TEST()
335 assert_se(get_process_cmdline(0, 3, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
336 assert_se(streq(line, "[t…")); in TEST()
337 line = mfree(line); in TEST()
339 assert_se(get_process_cmdline(0, 4, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
340 assert_se(streq(line, "[te…")); in TEST()
341 line = mfree(line); in TEST()
343 assert_se(get_process_cmdline(0, 5, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
344 assert_se(streq(line, "[tes…")); in TEST()
345 line = mfree(line); in TEST()
347 assert_se(get_process_cmdline(0, 6, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
348 assert_se(streq(line, "[test…")); in TEST()
349 line = mfree(line); in TEST()
351 assert_se(get_process_cmdline(0, 7, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
352 assert_se(streq(line, "[testa]")); in TEST()
353 line = mfree(line); in TEST()
355 assert_se(get_process_cmdline(0, 8, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
356 assert_se(streq(line, "[testa]")); in TEST()
357 line = mfree(line); in TEST()
363 assert_se(get_process_cmdline(0, SIZE_MAX, 0, &line) >= 0); in TEST()
364 log_debug("'%s'", line); in TEST()
365 assert_se(streq(line, "foo bar")); in TEST()
366 line = mfree(line); in TEST()
368 assert_se(get_process_cmdline(0, SIZE_MAX, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
369 assert_se(streq(line, "foo bar")); in TEST()
370 line = mfree(line); in TEST()
373 assert_se(get_process_cmdline(0, SIZE_MAX, 0, &line) >= 0); in TEST()
374 log_debug("'%s'", line); in TEST()
375 assert_se(streq(line, "foo bar quux")); in TEST()
376 line = mfree(line); in TEST()
378 assert_se(get_process_cmdline(0, SIZE_MAX, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
379 log_debug("'%s'", line); in TEST()
380 assert_se(streq(line, "foo bar quux")); in TEST()
381 line = mfree(line); in TEST()
383 assert_se(get_process_cmdline(0, 1, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
384 log_debug("'%s'", line); in TEST()
385 assert_se(streq(line, "…")); in TEST()
386 line = mfree(line); in TEST()
388 assert_se(get_process_cmdline(0, 2, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
389 log_debug("'%s'", line); in TEST()
390 assert_se(streq(line, "f…")); in TEST()
391 line = mfree(line); in TEST()
393 assert_se(get_process_cmdline(0, 3, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
394 log_debug("'%s'", line); in TEST()
395 assert_se(streq(line, "fo…")); in TEST()
396 line = mfree(line); in TEST()
398 assert_se(get_process_cmdline(0, 4, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
399 log_debug("'%s'", line); in TEST()
400 assert_se(streq(line, "foo…")); in TEST()
401 line = mfree(line); in TEST()
403 assert_se(get_process_cmdline(0, 5, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
404 log_debug("'%s'", line); in TEST()
405 assert_se(streq(line, "foo …")); in TEST()
406 line = mfree(line); in TEST()
408 assert_se(get_process_cmdline(0, 6, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
409 log_debug("'%s'", line); in TEST()
410 assert_se(streq(line, "foo b…")); in TEST()
411 line = mfree(line); in TEST()
413 assert_se(get_process_cmdline(0, 7, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
414 log_debug("'%s'", line); in TEST()
415 assert_se(streq(line, "foo ba…")); in TEST()
416 line = mfree(line); in TEST()
418 assert_se(get_process_cmdline(0, 8, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
419 log_debug("'%s'", line); in TEST()
420 assert_se(streq(line, "foo bar…")); in TEST()
421 line = mfree(line); in TEST()
423 assert_se(get_process_cmdline(0, 9, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
424 log_debug("'%s'", line); in TEST()
425 assert_se(streq(line, "foo bar …")); in TEST()
426 line = mfree(line); in TEST()
428 assert_se(get_process_cmdline(0, 10, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
429 log_debug("'%s'", line); in TEST()
430 assert_se(streq(line, "foo bar q…")); in TEST()
431 line = mfree(line); in TEST()
433 assert_se(get_process_cmdline(0, 11, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
434 log_debug("'%s'", line); in TEST()
435 assert_se(streq(line, "foo bar qu…")); in TEST()
436 line = mfree(line); in TEST()
438 assert_se(get_process_cmdline(0, 12, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
439 log_debug("'%s'", line); in TEST()
440 assert_se(streq(line, "foo bar quux")); in TEST()
441 line = mfree(line); in TEST()
443 assert_se(get_process_cmdline(0, 13, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
444 log_debug("'%s'", line); in TEST()
445 assert_se(streq(line, "foo bar quux")); in TEST()
446 line = mfree(line); in TEST()
448 assert_se(get_process_cmdline(0, 14, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
449 log_debug("'%s'", line); in TEST()
450 assert_se(streq(line, "foo bar quux")); in TEST()
451 line = mfree(line); in TEST()
453 assert_se(get_process_cmdline(0, 1000, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
454 log_debug("'%s'", line); in TEST()
455 assert_se(streq(line, "foo bar quux")); in TEST()
456 line = mfree(line); in TEST()
461 assert_se(get_process_cmdline(0, SIZE_MAX, 0, &line) == -ENOENT); in TEST()
463 assert_se(get_process_cmdline(0, SIZE_MAX, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
464 log_debug("'%s'", line); in TEST()
465 assert_se(streq(line, "[aaaa bbbb cccc]")); in TEST()
466 line = mfree(line); in TEST()
468 assert_se(get_process_cmdline(0, 10, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
469 log_debug("'%s'", line); in TEST()
470 assert_se(streq(line, "[aaaa bbb…")); in TEST()
471 line = mfree(line); in TEST()
473 assert_se(get_process_cmdline(0, 11, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
474 log_debug("'%s'", line); in TEST()
475 assert_se(streq(line, "[aaaa bbbb…")); in TEST()
476 line = mfree(line); in TEST()
478 assert_se(get_process_cmdline(0, 12, PROCESS_CMDLINE_COMM_FALLBACK, &line) >= 0); in TEST()
479 log_debug("'%s'", line); in TEST()
480 assert_se(streq(line, "[aaaa bbbb …")); in TEST()
481 line = mfree(line); in TEST()
492 assert_se(get_process_cmdline(0, SIZE_MAX, PROCESS_CMDLINE_QUOTE, &line) >= 0); in TEST()
493 log_debug("got: ==%s==", line); in TEST()
495 assert_se(streq(line, EXPECT1)); in TEST()
496 line = mfree(line); in TEST()
498 assert_se(get_process_cmdline(0, SIZE_MAX, PROCESS_CMDLINE_QUOTE_POSIX, &line) >= 0); in TEST()
499 log_debug("got: ==%s==", line); in TEST()
501 assert_se(streq(line, EXPECT1p)); in TEST()
502 line = mfree(line); in TEST()
511 assert_se(get_process_cmdline(0, SIZE_MAX, PROCESS_CMDLINE_QUOTE, &line) >= 0); in TEST()
512 log_debug("got: ==%s==", line); in TEST()
514 assert_se(streq(line, EXPECT2)); in TEST()
515 line = mfree(line); in TEST()
517 assert_se(get_process_cmdline(0, SIZE_MAX, PROCESS_CMDLINE_QUOTE_POSIX, &line) >= 0); in TEST()
518 log_debug("got: ==%s==", line); in TEST()
520 assert_se(streq(line, EXPECT2p)); in TEST()
521 line = mfree(line); in TEST()